aws

package
v3.19.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

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

func DeleteAccessKey(accessKey string, secretAccessKey string, sessionToken string) error

DeleteAccessKey deleted an access key.

func DisableAccessKey

func DisableAccessKey(accessKey string, secretAccessKey string, sessionToken string) error

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

func RetrieveSecret(secretID string) (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳