Module auth

Source
Expand description

Authentication backends.

The container-registry supports pluggable authentication, as anything that implements the AuthProvider trait can be used as an authentication (and authorization) backend. Included are implementations for the following types:

  • Permissions: The Permissions type itself is an auth provider, it will allow access with the given permissions to any non-anonymous client.
  • HashMap<String, Secret<String>>: A mapping of usernames to (unencrypted) passwords.
  • Secret<String>: Master password, ignores all usernames and just compares the password.
  • Anonymous: A decorator that wraps around another AuthProvider, will grant a fixed set of permissions to anonymous user, while deferring everything else to the inner provider.

All the above implementations deal with authentication only, once authorized, full write access to everything is granted.

To provide some safety against accidentally leaking passwords via stray Debug implementations, this crate uses the sec’s crate Secret type.

Structs§

Anonymous
Anonymous access auth provider.
MissingPermission
Error indicating a missing permission.
ValidCredentials
A set of credentials that has been validated.

Enums§

Permissions
A set of permissions granted on a specific image location to a given set of credentials.
Unverified
A set of credentials supplied that has not been verified.

Traits§

AuthProvider
An authentication and authorization provider.