aws_keyhub

package
v0.0.0-...-121d86e Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssureAwsKeyHubConfigDirectoryExists

func AssureAwsKeyHubConfigDirectoryExists()

func CheckIfAwsConfigFileExists

func CheckIfAwsConfigFileExists()

func CheckIfAwsKeyHubConfigFileExists

func CheckIfAwsKeyHubConfigFileExists()

func ConfigureAwsKeyhub

func ConfigureAwsKeyhub()

func DecodeSAMLResponse

func DecodeSAMLResponse(samlResponse string) []byte

func RolesAndPrincipalsFromSamlResponse

func RolesAndPrincipalsFromSamlResponse(samlResponseDecoded []byte) map[string]RolesAndPrincipals

func StsAssumeRoleWithSAML

func StsAssumeRoleWithSAML(principalArn string, roleArn string, samlAssertion string) *sts.AssumeRoleWithSAMLOutput

func VerifyIfLoginWasSuccessful

func VerifyIfLoginWasSuccessful(profile string, roleArn string)

func WriteCredentialFile

func WriteCredentialFile(profile string, credentials *sts.Credentials)

Types

type Assertion

type Assertion struct {
	XMLName            xml.Name             `xml:"Assertion"`
	AttributeStatement []AttributeStatement `xml:"AttributeStatement"`
}

type Attribute

type Attribute struct {
	XMLName        xml.Name `xml:"Attribute"`
	Name           string   `xml:"Name,attr"`
	AttributeValue []string `xml:"AttributeValue"`
}

type AttributeStatement

type AttributeStatement struct {
	XMLName   xml.Name    `xml:"AttributeStatement"`
	Attribute []Attribute `xml:"Attribute"`
}

type AuthorizeDeviceResponse

type AuthorizeDeviceResponse struct {
	UserCode                string `json:"user_code"`
	DeviceCode              string `json:"device_code"`
	Interval                int    `json:"interval"`
	VerificationUriComplete string `json:"verification_uri_complete"`
	VerificationUri         string `json:"verification_uri"`
	ExpiresIn               int    `json:"expires_in"`
}

func AuthorizeDevice

func AuthorizeDevice() AuthorizeDeviceResponse

type ExchangeResponse

type ExchangeResponse struct {
	AccessToken     string `json:"access_token"`
	TokenType       string `json:"token_type"`
	IssuedTokenType string `json:"issued_token_type"`
	ExpiresIn       int    `json:"expires_in"`
}

func ExchangeToken

func ExchangeToken(loginResponse LoginResponse) ExchangeResponse

type GroupsMetadata

type GroupsMetadata struct {
	Description string `json:"description"`
	Arn         string `json:"arn"`
}

type KeyhubAwsConfig

type KeyhubAwsConfig struct {
	AssumeDuration int64 `json:"assumeDuration"`
}

type KeyhubConfig

type KeyhubConfig struct {
	Url              string `json:"url"`
	ClientId         string `json:"clientId"`
	AwsSamlClientId  string `json:"awsSamlClientId"`
	AllowInsecureTLS bool   `json:"allowInsecureTLS"` // We do not prompt for this flag, but it is configurable for development purposes.
}

type KeyhubConfigFile

type KeyhubConfigFile struct {
	Keyhub KeyhubConfig    `json:"keyhub"`
	Aws    KeyhubAwsConfig `json:"aws"`
}

type LoginResponse

type LoginResponse struct {
	AccessToken string `json:"access_token"`
	Scope       string `json:"scope"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

func PollForAccessToken

func PollForAccessToken(authorizeDeviceresponse AuthorizeDeviceResponse, noOfTimesPolled int) LoginResponse

type Response

type Response struct {
	XMLName   xml.Name    `xml:"Response"`
	Assertion []Assertion `xml:"Assertion"`
}

type RolesAndPrincipals

type RolesAndPrincipals struct {
	Role        string
	Principal   string
	Description string
}

func SelectRoleAndPrincipal

func SelectRoleAndPrincipal(roleArn string, rolesAndPrincipals map[string]RolesAndPrincipals) RolesAndPrincipals

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL