Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortByPriority ¶
func SortByPriority(userTypes []UserTypeConfig)
SortByPriority sorts user type configurations by priority (lower = higher priority)
func ValidateConfig ¶
func ValidateConfig(userTypes []UserTypeConfig) error
ValidateConfig validates an array of user type configurations
Types ¶
type AuthMechanismConfig ¶
type AuthMechanismConfig struct {
Type string `yaml:"type" json:"type"` // Authentication mechanism type (e.g., "jwt", "oauth2", "api_key")
Entitlement EntitlementConfig `yaml:"entitlement" json:"entitlement"` // Entitlement configuration for this mechanism
}
AuthMechanismConfig represents configuration for a specific authentication mechanism
type EntitlementConfig ¶
type EntitlementConfig struct {
Claim string `yaml:"claim" json:"claim"` // Claim name for detection and entitlement (e.g., "groups", "scopes")
DisplayName string `yaml:"display_name" json:"displayName"` // Human-readable name for the claim
}
EntitlementConfig defines how to extract entitlement claims from authentication tokens
type Resolver ¶
type Resolver interface {
// ResolveUserType analyzes an authentication token and returns the SubjectContext
ResolveUserType(authToken string) (*auth.SubjectContext, error)
}
Resolver is responsible for resolving user types from authentication tokens Each authentication mechanism (JWT, OAuth2, API Key, etc.) should implement this interface
type UserTypeConfig ¶
type UserTypeConfig struct {
Type string `yaml:"type" json:"type"` // "user" or "service_account"
DisplayName string `yaml:"display_name" json:"displayName"` // Human-readable name for user type
Priority int `yaml:"priority" json:"priority"` // Check order (lower = higher priority)
AuthMechanisms []AuthMechanismConfig `yaml:"auth_mechanisms" json:"authMechanisms"` // Supported authentication mechanisms
}
UserTypeConfig represents configuration for a single user type
Click to show internal directories.
Click to hide internal directories.