Documentation ¶
Index ¶
Constants ¶
const ( // GenManual is the "manual" (type-OTP-in) generator GenManual = "manual" // GenYubikey is the native Yubikey generator GenYubikey = "yubikey" )
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(cfg *config.Config) (*credentials.Credentials, error)
Apply applies all configured strategy, depending on the given Config
Types ¶
type AssumeRole ¶
AssumeRole is a strategy that assumes IAM roles
func (*AssumeRole) Credentials ¶
func (a *AssumeRole) Credentials(sess *session.Session) (*credentials.Credentials, error)
Credentials aquires actual credentials
func (*AssumeRole) IsCacheable ¶
func (a *AssumeRole) IsCacheable() bool
IsCacheable indicates the output of this strategy can be cached (always true)
func (*AssumeRole) Profile ¶
func (a *AssumeRole) Profile() *config.Profile
Profile returns the name of the profile used (if applicable, otherwise nil)
type LongTerm ¶
LongTerm is a strategy that uses long-term credentials (IAM user keypairs)
func (*LongTerm) Credentials ¶
func (l *LongTerm) Credentials(sess *session.Session) (*credentials.Credentials, error)
Credentials aquires actual credentials
func (*LongTerm) IsCacheable ¶
IsCacheable indicates the output of this strategy can be cached (always false)
type SessionToken ¶
type SessionToken struct { Duration time.Duration Generator string Grace time.Duration MFASerial string Profiles []*config.Profile // contains filtered or unexported fields }
SessionToken is a strategy that gets session tokens using long-term credentials
func (*SessionToken) Credentials ¶
func (s *SessionToken) Credentials(sess *session.Session) (*credentials.Credentials, error)
Credentials aquires actual credentials
func (*SessionToken) IsCacheable ¶
func (s *SessionToken) IsCacheable() bool
IsCacheable indicates the output of this strategy can be cached (always true)
func (*SessionToken) Name ¶
func (s *SessionToken) Name() string
Name returns the name of this strategy
func (*SessionToken) Profile ¶
func (s *SessionToken) Profile() *config.Profile
Profile returns the name of the profile used (if applicable, otherwise nil)
type Strategy ¶
type Strategy interface { // Credentials acquires actual credentials Credentials(*session.Session) (*credentials.Credentials, error) // IsCacheable indicates the output of this strategy can be cached IsCacheable() bool // Name returns the name of this strategy Name() string // Profile returns the name of the profile used (if applicable, otherwise nil) Profile() *config.Profile }
Strategy identifies a way of aquiring short-term, cacheable credentials