Documentation ¶
Overview ¶
Package auth collects structures and functions around the generation and processing of credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertificate ¶ added in v0.0.16
func CreateCertificate( ctx context.Context, cluster *kubernetes.Cluster, cert CertParam, owner *metav1.OwnerReference, ) error
CreateCertificate creates a certificate resource, for the given cluster issuer
func ExtendLocalTrust ¶ added in v0.0.16
func ExtendLocalTrust(certs string)
ExtendLocalTrust makes the certs found in specified PEM string available as root CA certs, beyond the standard certs. It does this by creating an in-memory pool of certs filled from both the system pool and the argument, and setting this as the cert origin for net/http's default transport. Ditto for the websocket's default dialer.
func HashBcrypt ¶
HashBcrypt generates an Bcrypt hash for a password. See https://github.com/foomo/htpasswd for the origin of this code. MIT licensed, as per `blob/master/LICENSE.txt`
Types ¶
type CertParam ¶ added in v0.0.19
CertParam describes the cert-manager certificate CRD. It's passed to CreateCertificate to create the cert-manager certificate CR.
type PasswordAuth ¶
PasswordAuth wraps a set of password-based credentials
func RandomPasswordAuth ¶
func RandomPasswordAuth() (*PasswordAuth, error)
RandomPasswordAuth generates a random user+password combination. Both elements are random 16-character hex strings.
func (*PasswordAuth) Htpassword ¶
func (auth *PasswordAuth) Htpassword() (string, error)
Htpasswd returns user+hash string suitable for use by Traefik's BasicAuth module.