stscreds

package
v0.0.0-...-453e680 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ExpiresKey = "temp_credentials_expire"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCommand

type AuthCommand struct {
	Expiry              time.Duration
	OutputAsEnvVariable bool
	Profile             string
	TokenReader         TokenReader
}

func DefaultAuthCommand

func DefaultAuthCommand() *AuthCommand

creates an auth command suitable for reading from stdin with a prompt

func (*AuthCommand) Execute

func (cmd *AuthCommand) Execute() error

type Credentials

type Credentials struct {
	AccessKey    string
	SecretKey    string
	SessionToken string
	Expiry       time.Time
}

func (*Credentials) String

func (c *Credentials) String() string

type ExpiredCredentialsErr

type ExpiredCredentialsErr string

func (ExpiredCredentialsErr) Error

func (e ExpiredCredentialsErr) Error() string

type InitCommand

type InitCommand struct {
	Profile string
}

func (*InitCommand) Execute

func (cmd *InitCommand) Execute() error

type Keys

type Keys struct {
	AccessKey string
	SecretKey string
}

func (*Keys) Valid

func (k *Keys) Valid() (bool, error)

type LimitedAccessCredentials

type LimitedAccessCredentials struct {
	// contains filtered or unexported fields
}

these are the credentials used by the program to request credentials through STS and retrieve user info through IAM etc.

func DefaultLimitedAccessCredentials

func DefaultLimitedAccessCredentials(profile string) (*LimitedAccessCredentials, error)

func (*LimitedAccessCredentials) Exist

func (c *LimitedAccessCredentials) Exist() (bool, error)

func (*LimitedAccessCredentials) Initialise

func (c *LimitedAccessCredentials) Initialise(keys *Keys) error

func (*LimitedAccessCredentials) IsTemporaryCredentialsExpired

func (c *LimitedAccessCredentials) IsTemporaryCredentialsExpired(now time.Time) (bool, error)

func (*LimitedAccessCredentials) NewSession

func (c *LimitedAccessCredentials) NewSession() (*session.Session, error)

func (*LimitedAccessCredentials) RecordExpiry

func (c *LimitedAccessCredentials) RecordExpiry(expiresAt time.Time) error

type ReadCommand

type ReadCommand struct {
	Key     string
	Profile string
}

func (*ReadCommand) Execute

func (cmd *ReadCommand) Execute() error

type StdioTokenReader

type StdioTokenReader struct {
}

func (*StdioTokenReader) Read

func (f *StdioTokenReader) Read() (string, error)

type TemporaryCredentials

type TemporaryCredentials struct {
	// contains filtered or unexported fields
}

credentials managed by stscreds that are requested through STS

func DefaultTemporaryCredentials

func DefaultTemporaryCredentials(profile string) (*TemporaryCredentials, error)

func (*TemporaryCredentials) Read

func (c *TemporaryCredentials) Read(key string) (interface{}, error)

func (*TemporaryCredentials) Save

func (c *TemporaryCredentials) Save() error

func (*TemporaryCredentials) UpdateCredentials

func (c *TemporaryCredentials) UpdateCredentials(credentials *Credentials)

type TokenReader

type TokenReader interface {
	Read() (string, error)
}

interface to allow other things to provide tokens

type WhoAmI

type WhoAmI struct {
	Profile string
}

func (*WhoAmI) Execute

func (w *WhoAmI) Execute() error

Jump to

Keyboard shortcuts

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