Documentation ¶
Index ¶
- func AuthWithSTS(roleArn, externalID string) (*sts.AssumeRoleOutput, error)
- func GetAWSSession(options session.Options) *session.Session
- func GetLoginURL(signinToken, issuerURL, destinationURL string) url.URL
- func GetSessionName(roleArn string) (string, error)
- func GetSessionString(creds *sts.AssumeRoleOutput) string
- func GetSigninToken(signinURL url.URL) (string, error)
- func GetSigninTokenURL(creds *sts.AssumeRoleOutput) url.URL
- func PrintCredsFromSTSOutput(out *sts.AssumeRoleOutput, outputJSON bool)
- func PrintLoginURLDetails(out *sts.AssumeRoleOutput, loginURL string, outputJSON bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthWithSTS ¶
func AuthWithSTS(roleArn, externalID string) (*sts.AssumeRoleOutput, error)
AuthWithSTS uses a role ARN and the session with the default creds to assume a role.
func GetAWSSession ¶
GetAWSSession returns a session that uses the currently configured AWS CLI credentials
func GetLoginURL ¶
GetLoginURL builds the console login URL after all of the federation is done and returns the URL object
func GetSessionName ¶
GetSessionName returns a session name appropriate for use as the AssumeRole role session name parameter
func GetSessionString ¶
func GetSessionString(creds *sts.AssumeRoleOutput) string
GetSessionString returns a JSON.stringified representation of the session object
func GetSigninToken ¶
GetSigninToken uses the signin URL and calls it to get the user a signin token
func GetSigninTokenURL ¶
func GetSigninTokenURL(creds *sts.AssumeRoleOutput) url.URL
GetSigninTokenURL builds a url.URL object using the particulars from the session string and the federation URL
func PrintCredsFromSTSOutput ¶
func PrintCredsFromSTSOutput(out *sts.AssumeRoleOutput, outputJSON bool)
PrintCredsFromSTSOutput prints out the credentials we got from the STS output in a way that the user can export them in to the shell as well as the expiration information about the session
func PrintLoginURLDetails ¶
func PrintLoginURLDetails(out *sts.AssumeRoleOutput, loginURL string, outputJSON bool)
PrintLoginURLDetails prints out the login URL as well as the expiration date of the session
Types ¶
This section is empty.