Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close(c Closer)
Close is a convenience function to close a object that has a Close() method, ignoring any errors Used to satisfy errcheck lint
func HashPassword ¶
HashPassword hashes against the current preferred hasher.
func VerifyPassword ¶
VerifyPassword verifies an entered password against a hashed password and returns whether the hash is "stale" (i.e., was verified using the FIRST preferred hasher above).
Types ¶
type ArgoCDSettings ¶
type ArgoCDSettings struct { // LocalUsers holds users local to (stored on) the server. This is to be distinguished from any potential alternative future login providers (LDAP, SAML, etc.) that might ever be added. LocalUsers map[string]string }
ArgoCDSettings holds in-memory runtime configuration options.
type BcryptPasswordHasher ¶
type BcryptPasswordHasher struct {
Cost int
}
BcryptPasswordHasher handles password hashing with Bcrypt. Create with `0` as the work factor to default to bcrypt.DefaultCost at hashing time. The Cost field represents work factor.
func (BcryptPasswordHasher) HashPassword ¶
func (h BcryptPasswordHasher) HashPassword(password string) (string, error)
HashPassword creates a one-way digest ("hash") of a password. In the case of Bcrypt, a pseudorandom salt is included automatically by the underlying library. For security reasons, the work factor is always at _least_ bcrypt.DefaultCost.
func (BcryptPasswordHasher) VerifyPassword ¶
func (h BcryptPasswordHasher) VerifyPassword(password, hashedPassword string) bool
VerifyPassword validates whether a one-way digest ("hash") of a password was created from a given plaintext password.
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
ConfigManager holds config info for a new manager with which to access Kubernetes ConfigMaps.
func NewConfigManager ¶
func NewConfigManager(clientset kubernetes.Interface, namespace, configMapName string) (mgr *ConfigManager)
NewConfigManager generates a new ConfigManager pointer and returns it
func (*ConfigManager) GetSettings ¶
func (mgr *ConfigManager) GetSettings() (ArgoCDSettings, error)
GetSettings retrieves settings from the ConfigManager.
func (*ConfigManager) SetRootUserCredentials ¶
func (mgr *ConfigManager) SetRootUserCredentials(username string, password string) error
type DummyPasswordHasher ¶
type DummyPasswordHasher struct{}
DummyPasswordHasher is for testing ONLY. DO NOT USE in a production context.
func (DummyPasswordHasher) HashPassword ¶
func (h DummyPasswordHasher) HashPassword(password string) (string, error)
HashPassword creates a one-way digest ("hash") of a password. In the case of Bcrypt, a pseudorandom salt is included automatically by the underlying library.
func (DummyPasswordHasher) VerifyPassword ¶
func (h DummyPasswordHasher) VerifyPassword(password, hashedPassword string) bool
VerifyPassword validates whether a one-way digest ("hash") of a password was created from a given plaintext password.