Documentation
¶
Index ¶
- Variables
- func BuildAuthorizationHeader(algorithm, serialNumber, scope, signedHeaders, signature string) string
- func CalculateSignature(stringToSign string, signer Signer) (string, error)
- func CreateStringToSign(algorithm, requestDateTime, credentialSCope, canonicalRequest string) (string, error)
- type AssumedRoleUser
- type CreateSessionRequest
- type CreateSessionResponse
- type CredentialProvider
- type CredentialProviderInput
- type CredentialSetItem
- type CredentialsItem
- type Signer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidKeyType = errors.New("invalid key type, expected an ECDSA public key")
Functions ¶
func CalculateSignature ¶
func CreateStringToSign ¶
Types ¶
type AssumedRoleUser ¶
type CreateSessionRequest ¶
type CreateSessionRequest struct {
DurationSeconds int `json:"durationSeconds,omitempty"`
ProfileArn string `json:"profileArn"`
RoleArn string `json:"roleArn"`
TrustAnchorArn string `json:"trustAnchorArn"`
RoleSessionName string `json:"roleSessionName,omitempty"`
// contains filtered or unexported fields
}
type CreateSessionResponse ¶
type CreateSessionResponse struct {
CredentialSet []CredentialSetItem `json:"credentialSet"`
SubjectArn string `json:"subjectArn"`
}
TODO: Marshal ARNs?
func CreateSession ¶
func CreateSession( ctx context.Context, client *retryablehttp.Client, region string, request *CreateSessionRequest, signer Signer, ) (*CreateSessionResponse, error)
type CredentialProvider ¶
type CredentialProvider struct {
// contains filtered or unexported fields
}
func NewCredentialProvider ¶
func NewCredentialProvider(ctx context.Context, authInput CredentialProviderInput) (*CredentialProvider, error)
func (*CredentialProvider) ChangeSigner ¶
func (c *CredentialProvider) ChangeSigner(signer Signer) error
func (*CredentialProvider) Retrieve ¶
func (c *CredentialProvider) Retrieve(ctx context.Context) (aws.Credentials, error)
type CredentialProviderInput ¶
type CredentialSetItem ¶
type CredentialSetItem struct {
AssumedRoleUser AssumedRoleUser `json:"assumedRoleUser"`
Credentials CredentialsItem `json:"credentials"`
PackedPolicySize int `json:"packedPolicySize"`
RoleArn string `json:"roleArn"`
SourceIdentity string `json:"sourceIdentity"`
}
type CredentialsItem ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
func NewSigner ¶
func NewSigner(cert *x509.Certificate, pkey *ecdsa.PrivateKey) Signer
NewSigner creates a new Signer from a leaf certificate and its private key. Currently only supporting ECDSA keys however this will change.
func NewSignerWithChain ¶
func NewSignerWithChain(cert *x509.Certificate, chain []*x509.Certificate, pkey *ecdsa.PrivateKey) Signer
NewSignerWithChain creates a Signer that, in addition to the leaf certificate, presents the intermediate CA certificates to IAM Roles Anywhere via the X-Amz-X509-Chain header. This lets the leaf be validated against a trust anchor registered higher in the chain (e.g. the root) rather than the immediate issuer.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.