Documentation
¶
Index ¶
- func HandleAuthz(w http.ResponseWriter, r *http.Request, deps Dependencies)
- func HandleRegistryCredentialItem(w http.ResponseWriter, r *http.Request, deps CredentialDependencies)
- func HandleRegistryCredentials(w http.ResponseWriter, r *http.Request, deps CredentialDependencies)
- func PrincipalCanAccessRegistryPath(p apiauth.Principal, r *http.Request, cfg *AuthzConfig) bool
- func PrincipalCanAccessRegistryScope(p apiauth.Principal, scope string, cfg *AuthzConfig) bool
- func RegistryForwardedPath(r *http.Request) string
- func RegistryPathScope(r *http.Request) (string, bool)
- func RegistryRepoFromPath(rest string) string
- type AuthzConfig
- type CredentialDependencies
- type Dependencies
- type RegistryCredentialAuthenticator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleAuthz ¶
func HandleAuthz(w http.ResponseWriter, r *http.Request, deps Dependencies)
func HandleRegistryCredentialItem ¶
func HandleRegistryCredentialItem(w http.ResponseWriter, r *http.Request, deps CredentialDependencies)
func HandleRegistryCredentials ¶
func HandleRegistryCredentials(w http.ResponseWriter, r *http.Request, deps CredentialDependencies)
func PrincipalCanAccessRegistryPath ¶
PrincipalCanAccessRegistryPath resolves the repository scope from the forwarded registry path.
func PrincipalCanAccessRegistryScope ¶
func PrincipalCanAccessRegistryScope(p apiauth.Principal, scope string, cfg *AuthzConfig) bool
func RegistryForwardedPath ¶
func RegistryRepoFromPath ¶
Types ¶
type AuthzConfig ¶
type AuthzConfig struct {
// contains filtered or unexported fields
}
func NewAuthzConfigFromEnv ¶
func NewAuthzConfigFromEnv() *AuthzConfig
NewAuthzConfigFromEnv builds registry Traefik forward-auth settings from platform env.
type CredentialDependencies ¶
type CredentialDependencies struct {
Platform *platformstore.Store
PrincipalFromContext func(context.Context) (apiauth.Principal, bool)
WriteJSON func(http.ResponseWriter, int, any)
WriteBodyDecodeError func(http.ResponseWriter, error)
RequestIP func(*http.Request) string
AuditSource func(*http.Request, apiauth.Principal) string
AuditIdentityLabel func(apiauth.Principal) string
}
type Dependencies ¶
Click to show internal directories.
Click to hide internal directories.