Documentation
¶
Index ¶
- func AssumeRole(accessKey string, secretAccessKey string, sessionToken string, roleArn string, ...) (*sts.Credentials, error)
- func CreateMFA(accessKey string, secretAccessKey string, username string, title string, ...) (string, error)
- func CreateNewAccessKey(accessKey string, secretAccessKey string, sessionToken string) (string, string, error)
- func DeleteAccessKey(accessKey string, secretAccessKey string, sessionToken string) error
- func DisableAccessKey(accessKey string, secretAccessKey string, sessionToken string) error
- func GetSessionToken(accessKey string, secretAccessKey string, serialNumber string, ...) (*sts.Credentials, error)
- func PerformSSOAuthentication(startURL string, accountID string, roleName string) (*sso.GetRoleCredentialsOutput, error)
- func RetrieveSecret(secretID string) (string, error)
- func VerifyCallerIdentity(accessKey string, secretAccessKey string, sessionToken string) (username string, awsAccountID string, accountAlias string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssumeRole ¶
func AssumeRole(accessKey string, secretAccessKey string, sessionToken string, roleArn string, region string) (*sts.Credentials, error)
AssumeRole will perform an sts:AssumeRole.
func CreateMFA ¶
func CreateMFA(accessKey string, secretAccessKey string, username string, title string, reader *bufio.Reader) (string, error)
CreateMFA creates a Virtual MFA.
func CreateNewAccessKey ¶
func CreateNewAccessKey(accessKey string, secretAccessKey string, sessionToken string) (string, string, error)
CreateNewAccessKey creates a new credential.
func DeleteAccessKey ¶
DeleteAccessKey deleted an access key.
func DisableAccessKey ¶
DisableAccessKey disables an old access key.
func GetSessionToken ¶
func GetSessionToken(accessKey string, secretAccessKey string, serialNumber string, tokenCode string, region string) (*sts.Credentials, error)
GetSessionToken performs an MFA authentication for the AWS API. It returns the new credentials to be used with the MFA token.
func PerformSSOAuthentication ¶
func PerformSSOAuthentication(startURL string, accountID string, roleName string) (*sso.GetRoleCredentialsOutput, error)
PerformSSOAuthentication follows the process described in https://docs.aws.amazon.com/cli/latest/reference/sso-oidc/index.html#description to perform an OIDC exchange for temporary a temporary token.
func RetrieveSecret ¶
RetrieveSecret creates a Virtual MFA.
func VerifyCallerIdentity ¶
func VerifyCallerIdentity(accessKey string, secretAccessKey string, sessionToken string) (username string, awsAccountID string, accountAlias string, err error)
VerifyCallerIdentity will verify the caller identity given creds, and return some useful information about the account.
Types ¶
This section is empty.