Documentation ¶
Overview ¶
package config stores configuration around user onboarding to granted used to display friendly CLI hints and save progress in multi-step workflows, such as deploying Granted services to a user's cloud environment.
Index ¶
- func GrantedCacheFolder() (string, error)
- func GrantedConfigFilePath() (string, error)
- func GrantedConfigFolder() (string, error)
- func GrantedFolders() ([]string, error)
- func GrantedStateFolder() (string, error)
- func SetupConfigFolder() error
- func SetupZSHAutoCompleteFolderAssume() (string, error)
- func SetupZSHAutoCompleteFolderGranted() (string, error)
- type AWSSSOConfiguration
- type BrowserLaunchTemplate
- type Config
- type KeyringConfig
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrantedCacheFolder ¶ added in v0.33.0
func GrantedConfigFilePath ¶ added in v0.23.0
func GrantedConfigFolder ¶
func GrantedFolders ¶ added in v0.33.0
GrantedFolders creates a slice of directories created during installation and removes duplicates
func GrantedStateFolder ¶ added in v0.33.0
func SetupConfigFolder ¶
func SetupConfigFolder() error
checks and or creates the config folder on startup
func SetupZSHAutoCompleteFolderAssume ¶ added in v0.2.1
checks and or creates the config folder on startup
func SetupZSHAutoCompleteFolderGranted ¶ added in v0.2.1
checks and or creates the config folder on startup
Types ¶
type AWSSSOConfiguration ¶ added in v0.25.0
type BrowserLaunchTemplate ¶ added in v0.33.0
type BrowserLaunchTemplate struct { // UseForkProcess specifies whether to use forkprocess to launch the browser. // // If the launch template command uses 'open', this should be false, // as the forkprocess library causes the following error to appear: // fork/exec open: no such file or directory UseForkProcess bool `toml:",omitempty"` // Template to use for launching a browser. // // For example: '/usr/bin/firefox --new-tab --profile={{.Profile}} --url={{.URL}}' Command string }
type Config ¶
type Config struct { DefaultBrowser string // used to override the builtin filepaths for custom installation locations CustomBrowserPath string CustomSSOBrowserPath string // AWSConsoleBrowserLaunchTemplate is an optional launch template to use // for opening the AWS console. If specified it overrides the DefaultBrowser // and CustomBrowserPath fields. AWSConsoleBrowserLaunchTemplate *BrowserLaunchTemplate `toml:",omitempty"` // SSOBrowserLaunchTemplate is an optional launch template to use // for opening the SSO auth flow. If specified it overrides the DefaultBrowser // and CustomSSOBrowserPath fields. SSOBrowserLaunchTemplate *BrowserLaunchTemplate `toml:",omitempty"` Keyring *KeyringConfig `toml:",omitempty"` Ordering string ExportCredentialSuffix string // AccessRequestURL is a Granted Approvals URL that users can visit // to request access, in the event that we receive a ForbiddenException // denying access to assume a particular role. //Set this to true to set `--export` to ~/.aws/credentials as default ExportCredsToAWS bool `toml:",omitempty"` // Set to true to export sso tokens to ~/.aws/sso/cache ExportSSOToken bool `toml:",omitempty"` AccessRequestURL string `toml:",omitempty"` CommonFateDefaultSSOStartURL string `toml:",omitempty"` CommonFateDefaultSSORegion string `toml:",omitempty"` // Set this to true to disable usage tips like `To assume this profile again later without needing to select it, run this command:` DisableUsageTips bool `toml:",omitempty"` // Set this to true to disable credential caching feature when using credential process DisableCredentialProcessCache bool `toml:",omitempty"` // Set this to true to set `--export-all-env-vars` as default DefaultExportAllEnvVar bool `toml:",omitempty"` // deprecated in favor of ProfileRegistry ProfileRegistryURLS []string `toml:",omitempty"` ProfileRegistry struct { // add any global configuration to profile registry here. PrefixAllProfiles bool PrefixDuplicateProfiles bool SessionName string `toml:",omitempty"` RequiredKeys map[string]string `toml:",omitempty"` Variables map[string]string `toml:",omitempty"` Registries []Registry `toml:",omitempty"` } `toml:",omitempty"` // CredentialProcessAutoLogin, if 'true', will automatically attempt to // authenticate to IAM Identity Center if your AWS SSO // access token is expired. // // Do not set this to 'true' on headless systems, as it // will cause Granted to hang during the login process. CredentialProcessAutoLogin bool `toml:",omitempty"` SSO map[string]AWSSSOConfiguration `toml:",omitempty"` }
func NewDefaultConfig ¶ added in v0.2.3
func NewDefaultConfig() Config
NewDefaultConfig returns a config with OS specific defaults populated
type KeyringConfig ¶ added in v0.1.11
type KeyringConfig struct { Backend *string `toml:",omitempty"` KeychainName *string `toml:",omitempty"` FileDir *string `toml:",omitempty"` LibSecretCollectionName *string `toml:",omitempty"` PassDir *string `toml:",omitempty"` // PassDir is the pass password-store directory, ~/ is resolved to the users' home dir }
type Registry ¶ added in v0.6.0
type Registry struct { Name string `toml:"name"` URL string `toml:"url"` Path string `toml:"path,omitempty"` Filename string `toml:"filename,omitempty"` Ref string `toml:"ref,omitempty"` Priority int `toml:"priority,omitempty"` PrefixDuplicateProfiles bool `toml:"prefixDuplicateProfiles,omitempty"` PrefixAllProfiles bool `toml:"prefixAllProfiles,omitempty"` Type string `toml:"type,omitempty"` }
Click to show internal directories.
Click to hide internal directories.