sso

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

func Init

func Init(parser *flags.Parser)

func NewAwsConfig

func NewAwsConfig(ctx context.Context, creds *aws.Credentials, opts ...func(*config.LoadOptions) error) (aws.Config, error)

func NewSecureSSOTokenStorage added in v0.16.0

func NewSecureSSOTokenStorage() securestorage.SSOTokensSecureStorage

func NewSsoProfiles

func NewSsoProfiles() map[string]AwsProfile

func WriteSsoProfiles

func WriteSsoProfiles(profiles map[string]AwsProfile) error

Types

type AwsProfile

type AwsProfile struct {
	StartUrl          string `ini:"granted_sso_start_url"`
	Region            string `ini:"granted_sso_region"`
	AccountId         string `ini:"granted_sso_account_id"`
	Role              string `ini:"granted_sso_role_name"`
	CredentialProcess string `ini:"credential_process"`
}

type Browser added in v0.12.0

type Browser struct {
	Browser string `short:"b" long:"browser" description:"Specify a default browser without prompts, e.g '-b firefox', '-b chrome'"`
	Verbose bool   `short:"v" long:"verbose" description:"Enable verbose messages"`
}

func (*Browser) Execute added in v0.12.0

func (p *Browser) Execute(args []string) error

type Configure added in v0.12.0

type Configure struct {
	Verbose bool `short:"v" long:"verbose" description:"Enable verbose messages"`
}

func (*Configure) ConfigureProfiles added in v0.12.0

func (p *Configure) ConfigureProfiles(ctx context.Context) error

func (*Configure) Execute added in v0.12.0

func (p *Configure) Execute(args []string) error

func (*Configure) GetAccountAccess added in v0.12.0

func (p *Configure) GetAccountAccess(ctx context.Context, startURL string, region string) (map[string]AwsProfile, error)

type Console added in v0.12.0

type Console struct {
	Profile string `short:"p" long:"profile" env:"AWS_PROFILE" default:"default" description:"What profile to use"`
	Region  string `short:"r" long:"region" env:"AWS_REGION" default:"us-east-1" description:"What region to use"`
	Service string `short:"s" long:"service" description:"Open console at specific service"`
	Url     bool   `short:"u" long:"url" description:"Only print login url"`
	Verbose bool   `short:"v" long:"verbose" description:"Enable verbose messages"`
}

func (*Console) Execute added in v0.12.0

func (p *Console) Execute(args []string) error

func (*Console) LaunchConsoleSession added in v0.16.0

func (p *Console) LaunchConsoleSession(con string) error

func (*Console) OpenBrowser added in v0.12.0

func (p *Console) OpenBrowser(ctx context.Context) error

type CredentialProcess added in v0.16.0

type CredentialProcess struct {
	Profile string `short:"p" long:"profile" env:"AWS_PROFILE" default:"default" description:"What profile to use"`
	MFATOTP string `short:"t" long:"token" description:"MFA TOTP if using IAM authentication with MFA"`
	Verbose bool   `short:"v" long:"verbose" description:"Enable verbose messages"`
}

func (*CredentialProcess) Execute added in v0.16.0

func (p *CredentialProcess) Execute(args []string) error

type Login added in v0.12.0

type Login struct {
	Profile string `short:"p" long:"profile" env:"AWS_PROFILE" default:"default" description:"What profile to use"`
	Ask     bool   `long:"ask" env:"AWSFUZZY_ASK" description:"Ask before continuing"`
	MFATOTP string `short:"t" long:"token" description:"MFA TOTP if using IAM authentication with MFA"`
	Verbose bool   `short:"v" long:"verbose" description:"Enable verbose messages"`
	Url     bool   `short:"u" long:"url" description:"Only print login url"`
	NoCache bool   `short:"n" long:"no-cache" description:"Dont use cached credentials"`
	// contains filtered or unexported fields
}

func (*Login) AskAuth added in v0.15.0

func (p *Login) AskAuth() bool

func (*Login) AssumeRoleWithCreds added in v0.15.0

func (p *Login) AssumeRoleWithCreds(ctx context.Context, parentcreds *aws.Credentials) (aws.Credentials, error)

func (*Login) Execute added in v0.12.0

func (p *Login) Execute(args []string) error

func (*Login) GetCredentials added in v0.12.0

func (p *Login) GetCredentials(ctx context.Context) (*aws.Credentials, error)

func (*Login) GetProfile added in v0.12.0

func (p *Login) GetProfile(profile string) (*cfaws.Profile, error)

func (*Login) GetProfileFromID added in v0.12.0

func (p *Login) GetProfileFromID(id string) (*cfaws.Profile, error)

func (*Login) LoadProfiles added in v0.12.0

func (p *Login) LoadProfiles()

func (*Login) LoginMFA added in v0.13.0

func (p *Login) LoginMFA(ctx context.Context) (aws.Credentials, error)

func (*Login) PrintCredentials added in v0.12.0

func (p *Login) PrintCredentials(creds *aws.Credentials)

Jump to

Keyboard shortcuts

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