authcmd

package
v0.11.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPToken

func GetHTTPToken(
	mmaker manipcli.ManipulatorMaker,
	user string,
	pass string,
	totp string,
	sourceNamespace string,
	sourceName string,
	audience []string,
	cloak []string,
	validity time.Duration,
	refresh bool,
	restrictions *permissions.Restrictions,
) (string, error)

GetHTTPToken retrieves a token using the provided HTTP source.

func GetLDAPToken

func GetLDAPToken(
	mmaker manipcli.ManipulatorMaker,
	user string,
	pas string,
	sourceNamespace string,
	sourceName string,
	audience []string,
	cloak []string,
	validity time.Duration,
	refresh bool,
	restrictions *permissions.Restrictions,
) (string, error)

GetLDAPToken retrieves a token using the provided LDAP source.

func GetMTLSToken

func GetMTLSToken(
	mmaker manipcli.ManipulatorMaker,
	certPath string,
	keyPath string,
	keyPass string,
	sourceNamespace string,
	sourceName string,
	audience []string,
	cloak []string,
	validity time.Duration,
	refresh bool,
	restrictions *permissions.Restrictions,
) (string, error)

GetMTLSToken retrieves a token using the provided MTLS source information.

func HandleAutoAuth

func HandleAutoAuth(
	mmaker manipcli.ManipulatorMaker,
	method string,
	overrideAudience []string,
	overrideCloak []string,
	refresh bool,
	renewCached bool,
) error

HandleAutoAuth handles automatic retrieval of tokens based on the current config file. If will check for `autoauth.enable` to retrieve desired auto auth method. Setting it to empty will disable auto auth. Support:

autoauth.enable: mtls

autoauth.mtls.cert: path to the client certificate
autoauth.mtls.key: path to the client certificate key
autoauth.mtls.pass: optional passphrase to the certificate.
autoauth.mtls.source.name: the name of the MTLS source to use.
autoauth.mtls.source.namespace: the namespace of the MTLS source to use.

autoauth.enable: ldap

autoauth.ldap.user: the username.
autoauth.ldap.pass: the password.
autoauth.ldap.source.name: the name of the LDAP source to use.
autoauth.ldap.source.namespace: the namespace of the LDAP source to use.

autoauth.enable: http

autoauth.http.user: the username.
autoauth.http.pass: the password.
autoauth.http.source.name: the name of the HTTP source to use.
autoauth.http.source.namespace: the namespace of the HTTP source to use.

func New

New returns a new auth command.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL