Documentation ¶
Overview ¶
A minimal UI for simple testing via a UI without Vault
Index ¶
- Constants
- func Factory(ctx context.Context, c *logical.BackendConfig) (logical.Backend, error)
- func ProviderMap() map[string]CustomProvider
- type AzureProvider
- type CLIHandler
- type CustomProvider
- type GSuiteProvider
- func (g *GSuiteProvider) FetchGroups(ctx context.Context, b *jwtAuthBackend, allClaims map[string]interface{}, ...) (interface{}, error)
- func (g *GSuiteProvider) FetchUserInfo(ctx context.Context, b *jwtAuthBackend, allClaims map[string]interface{}, ...) error
- func (g *GSuiteProvider) Initialize(ctx context.Context, jc *jwtConfig) error
- func (g *GSuiteProvider) SensitiveKeys() []string
- type GSuiteProviderConfig
- type GroupsFetcher
- type UserInfoFetcher
Constants ¶
const ( StaticKeys = iota JWKS OIDCDiscovery OIDCFlow )
Variables ¶
This section is empty.
Functions ¶
func ProviderMap ¶ added in v0.7.0
func ProviderMap() map[string]CustomProvider
ProviderMap returns a map of provider names to custom types
Types ¶
type AzureProvider ¶ added in v0.7.0
type AzureProvider struct {
// contains filtered or unexported fields
}
AzureProvider is used for Azure-specific configuration
func (*AzureProvider) FetchGroups ¶ added in v0.7.0
func (a *AzureProvider) FetchGroups(_ context.Context, b *jwtAuthBackend, allClaims map[string]interface{}, role *jwtRole, tokenSource oauth2.TokenSource) (interface{}, error)
FetchGroups - custom groups fetching for azure - satisfying GroupsFetcher interface
func (*AzureProvider) Initialize ¶ added in v0.7.0
func (a *AzureProvider) Initialize(_ context.Context, _ *jwtConfig) error
Initialize anything in the AzureProvider struct - satisfying the CustomProvider interface
func (*AzureProvider) SensitiveKeys ¶ added in v0.7.0
func (a *AzureProvider) SensitiveKeys() []string
SensitiveKeys - satisfying the CustomProvider interface
type CustomProvider ¶ added in v0.7.0
type CustomProvider interface { // Initialize should validate jwtConfig.ProviderConfig, set internal values // and run any initialization necessary for subsequent calls to interface // functions the provider implements Initialize(context.Context, *jwtConfig) error // SensitiveKeys returns any fields in a provider's jwtConfig.ProviderConfig // that should be masked or omitted when output SensitiveKeys() []string }
CustomProvider - Any custom provider must implement this interface
func NewProviderConfig ¶ added in v0.7.0
func NewProviderConfig(ctx context.Context, jc *jwtConfig, providerMap map[string]CustomProvider) (CustomProvider, error)
NewProviderConfig - returns appropriate provider struct if provider_config is specified in jwtConfig. The provider map is provider name -to- instance of a CustomProvider.
type GSuiteProvider ¶ added in v0.7.1
type GSuiteProvider struct {
// contains filtered or unexported fields
}
GSuiteProvider provides G Suite-specific configuration and behavior.
func (*GSuiteProvider) FetchGroups ¶ added in v0.7.1
func (g *GSuiteProvider) FetchGroups(ctx context.Context, b *jwtAuthBackend, allClaims map[string]interface{}, role *jwtRole, _ oauth2.TokenSource) (interface{}, error)
FetchGroups fetches and returns groups from G Suite.
func (*GSuiteProvider) FetchUserInfo ¶ added in v0.7.1
func (g *GSuiteProvider) FetchUserInfo(ctx context.Context, b *jwtAuthBackend, allClaims map[string]interface{}, role *jwtRole) error
FetchUserInfo fetches additional user information from G Suite using custom schemas.
func (*GSuiteProvider) Initialize ¶ added in v0.7.1
func (g *GSuiteProvider) Initialize(ctx context.Context, jc *jwtConfig) error
Initialize initializes the GSuiteProvider by validating and creating configuration.
func (*GSuiteProvider) SensitiveKeys ¶ added in v0.7.1
func (g *GSuiteProvider) SensitiveKeys() []string
SensitiveKeys returns keys that should be redacted when reading the config of this provider
type GSuiteProviderConfig ¶ added in v0.7.1
type GSuiteProviderConfig struct { // The path to or contents of a Google service account key file. Required. ServiceAccount string `mapstructure:"gsuite_service_account"` // Email address of a G Suite admin to impersonate. Required. AdminImpersonateEmail string `mapstructure:"gsuite_admin_impersonate"` // If set to true, groups will be fetched from G Suite. FetchGroups bool `mapstructure:"fetch_groups"` // If set to true, user info will be fetched from G Suite using UserCustomSchemas. FetchUserInfo bool `mapstructure:"fetch_user_info"` // Group membership recursion max depth (0 = do not recurse). GroupsRecurseMaxDepth int `mapstructure:"groups_recurse_max_depth"` // Comma-separated list of G Suite custom schemas to fetch as claims. UserCustomSchemas string `mapstructure:"user_custom_schemas"` }
GSuiteProviderConfig represents the configuration for a GSuiteProvider.
type GroupsFetcher ¶ added in v0.7.0
type GroupsFetcher interface { // FetchGroups queries for groups claims during login FetchGroups(context.Context, *jwtAuthBackend, map[string]interface{}, *jwtRole, oauth2.TokenSource) (interface{}, error) }
GroupsFetcher - Optional support for custom groups handling