Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxSessionDuration = time.Hour * 24 * 90 MinSessionDuration = time.Minute * 15 DefaultSessionDuration = time.Hour * 4 // this is the implied default for the API // https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html DefaultRegion = "us-east-1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssumeRoleWithSAML ¶
type AssumeRoleWithSAML struct { OktaClient oktaclient.Client AWSSAMLURL string // Use this to choose an AssumableRole from a list TargetRoleARNChooser RoleChooser // Opts must have had ApplyDefaults and Validate called Opts Opts }
func (AssumeRoleWithSAML) Assume ¶
func (a AssumeRoleWithSAML) Assume() (Creds, error)
TODO: needs testing
type ErrRoleNotFound ¶
type ErrRoleNotFound struct {
RoleARN string
}
func (*ErrRoleNotFound) Error ¶
func (e *ErrRoleNotFound) Error() string
type ErrSessionDurationOOB ¶
func (*ErrSessionDurationOOB) Error ¶
func (e *ErrSessionDurationOOB) Error() string
type Opts ¶
type Opts struct { SessionDuration time.Duration // if unset, no session caching will be done SessionCache SessionCache Log *logrus.Logger // TODO: parse from SAML assertion? RoleSessionName string Region string }
func (*Opts) ApplyDefaults ¶
type RoleChooser ¶
type RoleChooser interface {
Choose([]awsokta.AssumableRole) (awsokta.AssumableRole, error)
}
type SessionCache ¶
type StaticChooser ¶
type StaticChooser struct {
RoleARN string
}
func (StaticChooser) Choose ¶
func (c StaticChooser) Choose(roles []awsokta.AssumableRole) (awsokta.AssumableRole, error)
Click to show internal directories.
Click to hide internal directories.