package internal
import "github.com/vmware/govmomi/sts/internal"
Index ¶
- Constants
- func Marshal(val interface{}) string
- func Unmarshal(data []byte, v interface{}) error
- type Assertion
- type Attribute
- type AttributeStatement
- type AttributeValue
- type AuthnStatement
- type BaseCondition
- type BinarySecurityToken
- type Condition
- type Conditions
- type Delegate
- type DelegateRestriction
- type InclusiveNamespaces
- type Issuer
- type KeyIdentifier
- type KeyInfo
- type Lifetime
- type Method
- type NameID
- type ProxyRestriction
- type Reference
- type RenewRestriction
- type RenewSecurityTokenBody
- func (b *RenewSecurityTokenBody) Fault() *soap.Fault
- func (b *RenewSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken
- type Renewing
- type RequestSecurityToken
- func (r *RequestSecurityToken) Action() string
- func (r *RequestSecurityToken) C14N() string
- func (r *RequestSecurityToken) String() string
- type RequestSecurityTokenBody
- func (b *RequestSecurityTokenBody) Fault() *soap.Fault
- func (b *RequestSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken
- type RequestSecurityTokenResponse
- type RequestSecurityTokenResponseCollection
- type RequestedSecurityToken
- type Security
- type SecurityReference
- type SecurityTokenReference
- type Signature
- type SignedInfo
- type Subject
- type SubjectConfirmation
- type SubjectConfirmationData
- type Target
- type Timestamp
- type Transform
- type Transforms
- type UseKey
- type UsernameToken
- type Value
- type X509Data
Constants ¶
const ( XSI = "http://www.w3.org/2001/XMLSchema-instance" WSU = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" DSIG = "http://www.w3.org/2000/09/xmldsig#" SHA256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" Time = "2006-01-02T15:04:05.000Z" )
Functions ¶
func Marshal ¶
func Marshal(val interface{}) string
Marshal panics if xml.Marshal returns an error
func Unmarshal ¶
Types ¶
type Assertion ¶
type Assertion struct { XMLName xml.Name ID string `xml:",attr"` IssueInstant string `xml:",attr"` Version string `xml:",attr"` Issuer Issuer Signature Signature Subject Subject Conditions Conditions AuthnStatement AuthnStatement AttributeStatement AttributeStatement }
func (*Assertion) C14N ¶
type Attribute ¶
type Attribute struct { XMLName xml.Name FriendlyName string `xml:",attr"` Name string `xml:",attr"` NameFormat string `xml:",attr"` AttributeValue []AttributeValue }
func (*Attribute) C14N ¶
type AttributeStatement ¶
func (*AttributeStatement) C14N ¶
func (a *AttributeStatement) C14N() string
type AttributeValue ¶
type AttributeValue struct { XMLName xml.Name Type string `xml:"type,attr,typeattr"` Value string `xml:",innerxml"` }
func (*AttributeValue) C14N ¶
func (a *AttributeValue) C14N() string
type AuthnStatement ¶
type AuthnStatement struct { XMLName xml.Name AuthnInstant string `xml:",attr"` AuthnContext struct { XMLName xml.Name AuthnContextClassRef struct { XMLName xml.Name Value string `xml:",innerxml"` } } }
func (*AuthnStatement) C14N ¶
func (a *AuthnStatement) C14N() string
type BaseCondition ¶
type BaseCondition interface { GetCondition() *Condition }
type BinarySecurityToken ¶
type BinarySecurityToken struct { XMLName xml.Name `xml:"wsse:BinarySecurityToken"` EncodingType string `xml:"EncodingType,attr"` ValueType string `xml:"ValueType,attr"` ID string `xml:"wsu:Id,attr"` Value string `xml:",chardata"` }
type Condition ¶
type Condition struct { Type string `xml:"xsi:type,attr,omitempty"` }
func (*Condition) GetCondition ¶
type Conditions ¶
type Conditions struct { XMLName xml.Name NotBefore string `xml:",attr"` NotOnOrAfter string `xml:",attr"` ProxyRestriction *ProxyRestriction `xml:",omitempty"` Condition []BaseCondition `xml:",omitempty"` }
func (*Conditions) C14N ¶
func (c *Conditions) C14N() string
type Delegate ¶
type Delegate struct { XMLName xml.Name NS string `xml:"xmlns:del,attr,omitempty"` DelegationInstant string `xml:",attr"` NameID NameID }
type DelegateRestriction ¶
type DelegateRestriction struct { XMLName xml.Name NS string `xml:"xmlns:xsi,attr,omitempty"` Condition Delegate Delegate }
type InclusiveNamespaces ¶
type InclusiveNamespaces struct { XMLName xml.Name NS string `xml:"xmlns:ec,attr,omitempty"` PrefixList string `xml:",attr"` }
type Issuer ¶
func (*Issuer) C14N ¶
type KeyIdentifier ¶
type KeyIdentifier struct { XMLName xml.Name `xml:"wsse:KeyIdentifier"` ID string `xml:",innerxml"` ValueType string `xml:",attr"` }
type KeyInfo ¶
type KeyInfo struct { XMLName xml.Name NS string `xml:"xmlns:ds,attr,omitempty"` SecurityTokenReference *SecurityTokenReference `xml:",omitempty"` X509Data *X509Data `xml:",omitempty"` }
func (*KeyInfo) C14N ¶
type Lifetime ¶
type Lifetime struct { Created string `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd Created"` Expires string `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd Expires"` }
func (*Lifetime) C14N ¶
type Method ¶
func (*Method) C14N ¶
type NameID ¶
type ProxyRestriction ¶
type Reference ¶
type Reference struct { XMLName xml.Name URI string `xml:",attr"` Transforms Transforms DigestMethod Method DigestValue Value }
func NewReference ¶
func (Reference) C14N ¶
type RenewRestriction ¶
type RenewRestriction struct { XMLName xml.Name NS string `xml:"xmlns:xsi,attr,omitempty"` Count int32 `xml:",attr"` Condition }
type RenewSecurityTokenBody ¶
type RenewSecurityTokenBody struct { Req *RequestSecurityToken `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityToken,omitempty"` Res *RequestSecurityTokenResponse `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityTokenResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` }
func (*RenewSecurityTokenBody) Fault ¶
func (b *RenewSecurityTokenBody) Fault() *soap.Fault
func (*RenewSecurityTokenBody) RequestSecurityToken ¶
func (b *RenewSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken
type Renewing ¶
type RequestSecurityToken ¶
type RequestSecurityToken struct { TokenType string `xml:",omitempty"` RequestType string `xml:",omitempty"` Lifetime *Lifetime `xml:",omitempty"` Renewing *Renewing `xml:",omitempty"` Delegatable bool `xml:",omitempty"` KeyType string `xml:",omitempty"` SignatureAlgorithm string `xml:",omitempty"` UseKey *UseKey `xml:",omitempty"` ActAs *Target `xml:",omitempty"` ValidateTarget *Target `xml:",omitempty"` RenewTarget *Target `xml:",omitempty"` }
func (*RequestSecurityToken) Action ¶
func (r *RequestSecurityToken) Action() string
func (*RequestSecurityToken) C14N ¶
func (r *RequestSecurityToken) C14N() string
func (*RequestSecurityToken) String ¶
func (r *RequestSecurityToken) String() string
type RequestSecurityTokenBody ¶
type RequestSecurityTokenBody struct { Req *RequestSecurityToken `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityToken,omitempty"` Res *RequestSecurityTokenResponseCollection `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityTokenResponseCollection,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` }
func (*RequestSecurityTokenBody) Fault ¶
func (b *RequestSecurityTokenBody) Fault() *soap.Fault
func (*RequestSecurityTokenBody) RequestSecurityToken ¶
func (b *RequestSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken
type RequestSecurityTokenResponse ¶
type RequestSecurityTokenResponse struct { RequestedSecurityToken RequestedSecurityToken Lifetime *Lifetime `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 Lifetime"` }
func Renew ¶
func Renew(ctx context.Context, r soap.RoundTripper, req *RequestSecurityToken) (*RequestSecurityTokenResponse, error)
type RequestSecurityTokenResponseCollection ¶
type RequestSecurityTokenResponseCollection struct { RequestSecurityTokenResponse RequestSecurityTokenResponse }
func Issue ¶
func Issue(ctx context.Context, r soap.RoundTripper, req *RequestSecurityToken) (*RequestSecurityTokenResponseCollection, error)
type RequestedSecurityToken ¶
type RequestedSecurityToken struct { Assertion string `xml:",innerxml"` }
type Security ¶
type Security struct { XMLName xml.Name `xml:"wsse:Security"` WSSE string `xml:"xmlns:wsse,attr"` WSU string `xml:"xmlns:wsu,attr"` Timestamp Timestamp BinarySecurityToken *BinarySecurityToken `xml:",omitempty"` UsernameToken *UsernameToken `xml:",omitempty"` Assertion string `xml:",innerxml"` Signature *Signature `xml:",omitempty"` }
Security is used as soap.Envelope.Header.Security when signing requests.
type SecurityReference ¶
type SecurityReference struct { XMLName xml.Name `xml:"wsse:Reference"` URI string `xml:",attr"` ValueType string `xml:",attr"` }
type SecurityTokenReference ¶
type SecurityTokenReference struct { XMLName xml.Name `xml:"wsse:SecurityTokenReference"` WSSE11 string `xml:"xmlns:wsse11,attr,omitempty"` TokenType string `xml:"wsse11:TokenType,attr,omitempty"` Reference *SecurityReference `xml:",omitempty"` KeyIdentifier *KeyIdentifier `xml:",omitempty"` }
type Signature ¶
type Signature struct { XMLName xml.Name NS string `xml:"xmlns:ds,attr"` ID string `xml:"Id,attr"` SignedInfo SignedInfo SignatureValue Value KeyInfo KeyInfo }
func (*Signature) C14N ¶
type SignedInfo ¶
type SignedInfo struct { XMLName xml.Name NS string `xml:"xmlns:ds,attr,omitempty"` CanonicalizationMethod Method SignatureMethod Method Reference []Reference }
func (SignedInfo) C14N ¶
func (s SignedInfo) C14N() string
type Subject ¶
type Subject struct { XMLName xml.Name NameID NameID SubjectConfirmation SubjectConfirmation }
func (*Subject) C14N ¶
type SubjectConfirmation ¶
type SubjectConfirmation struct { XMLName xml.Name Method string `xml:",attr"` NameID *NameID SubjectConfirmationData SubjectConfirmationData }
type SubjectConfirmationData ¶
type SubjectConfirmationData struct { XMLName xml.Name NS string `xml:"xmlns:xsi,attr,omitempty"` Type string `xml:"xsi:type,attr,omitempty"` NotOnOrAfter string `xml:",attr,omitempty"` KeyInfo *KeyInfo }
type Target ¶
type Target struct { Token string `xml:",innerxml"` }
type Timestamp ¶
type Timestamp struct { XMLName xml.Name `xml:"wsu:Timestamp"` NS string `xml:"xmlns:wsu,attr"` ID string `xml:"wsu:Id,attr"` Created string `xml:"wsu:Created"` Expires string `xml:"wsu:Expires"` }
func (*Timestamp) C14N ¶
type Transform ¶
type Transform struct { XMLName xml.Name Algorithm string `xml:",attr"` InclusiveNamespaces *InclusiveNamespaces `xml:",omitempty"` }
type Transforms ¶
func (*Transforms) C14N ¶
func (t *Transforms) C14N() string
type UseKey ¶
type UseKey struct { Sig string `xml:",attr"` }
type UsernameToken ¶
type UsernameToken struct { XMLName xml.Name `xml:"wsse:UsernameToken"` Username string `xml:"wsse:Username"` Password string `xml:"wsse:Password"` }
type Value ¶
func (*Value) C14N ¶
type X509Data ¶
Source Files ¶
- Version
- v0.48.1 (latest)
- Published
- Feb 11, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 2 months ago –
Tools for package owners.