Documentation ¶
Index ¶
- Variables
- func AssignPrincipals(awsRoles []*AWSRole, awsAccounts []*AWSAccount)
- func ExtractAwsRoles(data []byte) ([]string, error)
- func PromptForConfigurationDetails(idpAccount *cfg.IDPAccount) error
- func PromptForLoginDetails(loginDetails *creds.LoginDetails) error
- type AWSAccount
- type AWSRole
- type ConfigLoader
- func (p *ConfigLoader) LoadHostname() (string, error)
- func (p *ConfigLoader) LoadProvider(defaultValue string) (string, error)
- func (p *ConfigLoader) LoadUsername() (string, error)
- func (p *ConfigLoader) SaveHostname(hostname string) error
- func (p *ConfigLoader) SaveProvider(provider string) error
- func (p *ConfigLoader) SaveUsername(username string) error
- type ErrMissingElement
- type ProviderList
- type SAMLClient
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConfigHomeNotFound returned when a user home directory can't be located. ErrConfigHomeNotFound = errors.New("user home directory not found") // ErrConfigFileNotFound returned when the required aws credentials file doesn't exist. ErrConfigFileNotFound = errors.New("aws credentials file not found") )
var (
ErrMissingAssertion = ErrMissingElement{Tag: assertionTag}
)
ErrMissingAssertion indicates that an appropriate assertion element could not be found in the SAML Response
var MFAsByProvider = ProviderList{ "ADFS": []string{"Auto", "VIP"}, "ADFS2": []string{"Auto"}, "Ping": []string{"Auto"}, "JumpCloud": []string{"Auto"}, "Okta": []string{"Auto"}, "KeyCloak": []string{"Auto"}, }
MFAsByProvider a list of providers with their respective supported MFAs
Functions ¶
func AssignPrincipals ¶ added in v1.8.0
func AssignPrincipals(awsRoles []*AWSRole, awsAccounts []*AWSAccount)
AssignPrincipals assign principal from roles
func ExtractAwsRoles ¶
ExtractAwsRoles given an assertion document extract the aws roles
func PromptForConfigurationDetails ¶
func PromptForConfigurationDetails(idpAccount *cfg.IDPAccount) error
PromptForConfigurationDetails prompt the user to present their hostname, username and mfa
func PromptForLoginDetails ¶ added in v1.1.0
func PromptForLoginDetails(loginDetails *creds.LoginDetails) error
PromptForLoginDetails prompt the user to present their username, password and hostname
Types ¶
type AWSAccount ¶ added in v1.5.0
AWSAccount holds the AWS account name and roles
func ExtractAWSAccounts ¶ added in v1.5.0
func ExtractAWSAccounts(data []byte) ([]*AWSAccount, error)
ExtractAWSAccounts extract the accounts from the AWS html page
func ParseAWSAccounts ¶ added in v1.5.0
func ParseAWSAccounts(samlAssertion string) ([]*AWSAccount, error)
ParseAWSAccounts extract the aws accounts from the saml assertion
type AWSRole ¶
AWSRole aws role attributes
func LocateRole ¶ added in v1.8.0
LocateRole locate role by name
func ParseAWSRoles ¶ added in v1.3.0
ParseAWSRoles parses and splits the roles while also validating the contents
func PromptForAWSRoleSelection ¶
func PromptForAWSRoleSelection(accounts []*AWSAccount) (*AWSRole, error)
PromptForAWSRoleSelection present a list of roles to the user for selection
type ConfigLoader ¶ added in v1.1.0
ConfigLoader loads config options
func NewConfigLoader ¶ added in v1.1.0
func NewConfigLoader(profile string) *ConfigLoader
NewConfigLoader helper to create the config
func (*ConfigLoader) LoadHostname ¶ added in v1.1.0
func (p *ConfigLoader) LoadHostname() (string, error)
LoadHostname load the hostname
func (*ConfigLoader) LoadProvider ¶ added in v1.3.0
func (p *ConfigLoader) LoadProvider(defaultValue string) (string, error)
LoadProvider load the provider
func (*ConfigLoader) LoadUsername ¶ added in v1.1.0
func (p *ConfigLoader) LoadUsername() (string, error)
LoadUsername load the username
func (*ConfigLoader) SaveHostname ¶ added in v1.1.0
func (p *ConfigLoader) SaveHostname(hostname string) error
SaveHostname persist the hostname
func (*ConfigLoader) SaveProvider ¶ added in v1.3.0
func (p *ConfigLoader) SaveProvider(provider string) error
SaveProvider persist the provider
func (*ConfigLoader) SaveUsername ¶ added in v1.1.0
func (p *ConfigLoader) SaveUsername(username string) error
SaveUsername persist the username
type ErrMissingElement ¶
type ErrMissingElement struct {
Tag, Attribute string
}
ErrMissingElement is the error type that indicates an element and/or attribute is missing. It provides a structured error that can be more appropriately acted upon.
func (ErrMissingElement) Error ¶
func (e ErrMissingElement) Error() string
type ProviderList ¶
ProviderList list of providers with their MFAs
func (ProviderList) Mfas ¶
func (mfbp ProviderList) Mfas(provider string) []string
Mfas retrieve a sorted list of mfas from the provider list
func (ProviderList) Names ¶
func (mfbp ProviderList) Names() []string
Names get a list of provider names
type SAMLClient ¶ added in v1.3.0
type SAMLClient interface {
Authenticate(loginDetails *creds.LoginDetails) (string, error)
}
SAMLClient client interface
func NewSAMLClient ¶ added in v1.3.0
func NewSAMLClient(idpAccount *cfg.IDPAccount) (SAMLClient, error)
NewSAMLClient create a new SAML client
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
helper
|
|
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
pkg
|
|