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 HandleToken(w http.ResponseWriter, r *http.Request, deps TokenDependencies)
- 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 RegistryMountSource(r *http.Request) string
- func RegistryPathScope(r *http.Request) (string, bool)
- func RegistryRepoFromPath(rest string) string
- type AuthzConfig
- type CredentialDependencies
- type Dependencies
- type PullAuthenticator
- type PullScope
- type RegistryCredentialAuthenticator
- type TokenDependencies
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 HandleToken ¶
func HandleToken(w http.ResponseWriter, r *http.Request, deps TokenDependencies)
HandleToken issues Distribution tokens from server-authorized repository scopes. Forwarded path/method headers never participate in this decision.
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 RegistryMountSource ¶
RegistryMountSource preserves the source repository query for cross-repository blob mounts. Both source pull and destination push must be authorized.
func RegistryRepoFromPath ¶
Types ¶
type AuthzConfig ¶
type AuthzConfig struct {
// contains filtered or unexported fields
}
func NewAuthzConfigFromEnv ¶
func NewAuthzConfigFromEnv() *AuthzConfig
NewAuthzConfigFromEnv builds registry authorization from the shared mode rules.
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 ¶
type PullAuthenticator ¶
type PullScope ¶
type PullScope = registryauth.PullScope
type TokenDependencies ¶
type TokenDependencies struct {
AuthenticateRequest func(*http.Request) (apiauth.Principal, bool, error)
Config *AuthzConfig
Signer *registryauth.Signer
Pull PullAuthenticator
}
Click to show internal directories.
Click to hide internal directories.