Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCredentialsHomeNotFound returned when a user home directory can't be located. ErrCredentialsHomeNotFound = errors.New("user home directory not found") // ErrCredentialsFileNotFound returned when the required aws credentials file doesn't exist. ErrCredentialsFileNotFound = errors.New("aws credentials file not found") )
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
Functions ¶
func ExtractAwsRoles ¶
Types ¶
type ADFSClient ¶
type ADFSClient struct {
// contains filtered or unexported fields
}
ADFSClient wrapper around ADFS enabling authentication and retrieval of assertions
func NewADFSClient ¶
func NewADFSClient(skipVerify bool) (*ADFSClient, error)
NewADFSClient create a new ADFS client
func (*ADFSClient) Authenticate ¶
func (ac *ADFSClient) Authenticate(loginDetails *LoginDetails) (string, error)
Authenticate authenticate to ADFS and return the data from the body of the SAML assertion.
type AWSRole ¶
AWSRole aws role attributes
func PromptForAWSRoleSelection ¶
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) 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) SaveUsername ¶ added in v1.1.0
func (p *ConfigLoader) SaveUsername(username string) error
SaveUsername persist the username
type CredentialsProvider ¶
CredentialsProvider loads aws credentials file
func NewSharedCredentials ¶
func NewSharedCredentials(profile string) *CredentialsProvider
NewSharedCredentials helper to create the credentials provider
func (*CredentialsProvider) Exists ¶
func (p *CredentialsProvider) Exists() error
Exists verify that the credentials file exists
func (*CredentialsProvider) Save ¶
func (p *CredentialsProvider) Save(id, secret, token string) error
Save persist the credentials
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 LoginDetails ¶ added in v1.1.0
LoginDetails used to authenticate to ADFS
func PromptForLoginDetails ¶ added in v1.1.0
func PromptForLoginDetails(username, hostname string) (*LoginDetails, error)
PromptForLoginDetails prompt the user to present their username, password and hostname