Documentation ¶
Index ¶
- Constants
- Variables
- func EnvFileOrDefault() (string, error)
- func NewConfigFromFile(file string) (config, error)
- func Prompt(prompt string, sensitive bool) (string, error)
- func PromptMulti(choices []string) (string, int)
- func PromptMultiMatch(choices []string, match matcher) (string, int)
- func PromptMultiMatchRole(choices []string, opt string) (string, int)
- type Aliases
- type AwsProvider
- type AwsProviderIf
- type KeycloakCreds
- type KeycloakProvider
- type KeycloakProviderIf
- type KeycloakUserAuthn
- type Provider
Constants ¶
View Source
const ( DefaultRegion = "us-east-1" DefaultKeycloak = "id" DefaultSAMLSessionDuration = 3600 )
View Source
const ( DefaultEnv = "KEYCLOAK_CONFIG_FILE" DefaultConf = "/.aws/keycloak-config" )
Variables ¶
View Source
var ( ProviderIn io.Reader = os.Stdin ProviderOut io.Writer = os.Stdout ProviderErr io.Writer = os.Stderr )
Package level vars
Functions ¶
func EnvFileOrDefault ¶
func NewConfigFromFile ¶
func PromptMulti ¶
func PromptMultiMatch ¶
Types ¶
type AwsProvider ¶
type AwsProvider struct { Keyring keyring.Keyring Region string Duration int64 // this sets the maximum request, not necessarily what will be granted }
func (*AwsProvider) AssumeRoleWithSAML ¶
func (a *AwsProvider) AssumeRoleWithSAML(rp saml.RolePrincipal, assertion string) (sts.Credentials, error)
func (*AwsProvider) CheckAlreadyAuthd ¶
func (a *AwsProvider) CheckAlreadyAuthd(awsrole string) (sts.Credentials, error)
func (*AwsProvider) StoreAwsCreds ¶
func (a *AwsProvider) StoreAwsCreds(creds sts.Credentials, awsrole string)
type AwsProviderIf ¶
type AwsProviderIf interface { AssumeRoleWithSAML(saml.RolePrincipal, string) (sts.Credentials, error) CheckAlreadyAuthd(string) (sts.Credentials, error) StoreAwsCreds(sts.Credentials, string) }
type KeycloakCreds ¶
type KeycloakProvider ¶
type KeycloakProvider struct { Keyring keyring.Keyring ProfileName string ApiBase string SamlPath string AwsClient string AwsClientSecret string // contains filtered or unexported fields }
func NewKeycloakProvider ¶
func (*KeycloakProvider) BasicAuth ¶
func (k *KeycloakProvider) BasicAuth() error
*
- Deprecated
- Must populate kcCreds before calling (eg. by calling RetrieveKeycloakCreds)
func (*KeycloakProvider) BrowserAuth ¶
func (k *KeycloakProvider) BrowserAuth() error
*
- Initiate OAuth2 Authorization Grant flow
func (*KeycloakProvider) GetSamlAssertion ¶
func (k *KeycloakProvider) GetSamlAssertion() (samlStruct saml.SAMLStruct, err error)
func (*KeycloakProvider) RetrieveKeycloakCreds ¶
func (k *KeycloakProvider) RetrieveKeycloakCreds() bool
*
- return bool is whether the creds should be stored in keyring if they work
func (*KeycloakProvider) StoreKeycloakCreds ¶
func (k *KeycloakProvider) StoreKeycloakCreds()
type KeycloakProviderIf ¶
type KeycloakUserAuthn ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_provider is a generated GoMock package.
|
Package mock_provider is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.