Documentation ¶
Index ¶
- Constants
- func AssumeRole(stsClient stscreds.AssumeRoleAPIClient, roleSessionName string, roleArn string) (aws.Credentials, error)
- func AssumeRoleSequence(seedClient stscreds.AssumeRoleAPIClient, ...) (aws.Credentials, error)
- func AssumeRoleWithJWT(jwt string, roleArn string, ...) (aws.Credentials, error)
- func GetConsoleURL(signinToken string, region string) (*url.URL, error)
- func StsClient(proxyURL *string) (*sts.Client, error)
- type AWSFederatedSessionData
- type AWSSigninTokenResponse
- type IdentityTokenValue
- type RoleArnSession
- type STSClientProviderFunc
Constants ¶
View Source
const ( AwsFederatedSigninEndpointTemplate = "https://%v.signin.aws.amazon.com/federation" AwsConsoleURLTemplate = "https://%v.console.aws.amazon.com/" DefaultIssuer = "Red Hat SRE" )
Variables ¶
This section is empty.
Functions ¶
func AssumeRole ¶
func AssumeRole(stsClient stscreds.AssumeRoleAPIClient, roleSessionName string, roleArn string) (aws.Credentials, error)
func AssumeRoleSequence ¶
func AssumeRoleSequence(seedClient stscreds.AssumeRoleAPIClient, roleArnSessionSequence []RoleArnSession, proxyURL *string, stsClientProviderFunc STSClientProviderFunc) (aws.Credentials, error)
func AssumeRoleWithJWT ¶
func AssumeRoleWithJWT(jwt string, roleArn string, stsClient stscreds.AssumeRoleWithWebIdentityAPIClient) (aws.Credentials, error)
Types ¶
type AWSFederatedSessionData ¶
type AWSSigninTokenResponse ¶
type AWSSigninTokenResponse struct {
SigninToken string
}
func GetSigninToken ¶
func GetSigninToken(awsCredentials aws.Credentials, region string) (*AWSSigninTokenResponse, error)
type IdentityTokenValue ¶
type IdentityTokenValue string
IdentityTokenValue is for retrieving an identity token from the given file name
func (IdentityTokenValue) GetIdentityToken ¶
func (j IdentityTokenValue) GetIdentityToken() ([]byte, error)
GetIdentityToken retrieves the JWT token from the file and returns the contents as a []byte
type RoleArnSession ¶
type STSClientProviderFunc ¶
type STSClientProviderFunc func(optFns ...func(*config.LoadOptions) error) (stscreds.AssumeRoleAPIClient, error)
var DefaultSTSClientProviderFunc STSClientProviderFunc = func(optnFns ...func(options *config.LoadOptions) error) (stscreds.AssumeRoleAPIClient, error) { cfg, err := config.LoadDefaultConfig(context.TODO(), optnFns...) if err != nil { return nil, fmt.Errorf("failed to load default AWS config: %w", err) } return sts.NewFromConfig(cfg), nil }
Click to show internal directories.
Click to hide internal directories.