Documentation ¶
Index ¶
- Constants
- func AuthenticateRequest(authnURL string, account string, username string, jwtToken string) (*http.Request, error)
- type Authenticator
- type Config
- func (config *Config) GetContainerMode() string
- func (config *Config) GetDefaultValues() map[string]string
- func (config *Config) GetEnvVariables() []string
- func (config *Config) GetRequiredVariables() []string
- func (config *Config) GetTokenFilePath() string
- func (config *Config) GetTokenTimeout() time.Duration
- func (config *Config) LoadConfig(settings map[string]string)
Constants ¶
View Source
const ( DefaultClientCertPath = "/etc/conjur/ssl/client.pem" DefaultTokenFilePath = "/run/conjur/access-token" // DefaultTokenRefreshTimeout is the default time the system waits to reauthenticate on error DefaultTokenRefreshTimeout = "6m0s" // DefaultClientCertRetryCountLimit is the amount of times we wait after successful // login for the client certificate file to exist, where each time we wait for a second. DefaultClientCertRetryCountLimit = "10" DefaultJWTTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" AuthnType = "authn-jwt" )
Default settings (this comment added to satisfy linter)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Authenticator ¶
type Authenticator struct { Config *Config // contains filtered or unexported fields }
Authenticator contains the configuration and client for the authentication connection to Conjur
func NewWithAccessToken ¶
func NewWithAccessToken(config Config, accessToken access_token.AccessToken) (*Authenticator, error)
NewWithAccessToken creates a new authenticator instance from a given access token
func (*Authenticator) Authenticate ¶
func (auth *Authenticator) Authenticate() error
Authenticate sends Conjur an authenticate request and writes the response to the token file (after decrypting it if needed). It also manages state of certificates. @deprecated Use AuthenticateWithContext instead
func (*Authenticator) AuthenticateWithContext ¶
func (auth *Authenticator) AuthenticateWithContext(ctx context.Context) error
func (*Authenticator) GetAccessToken ¶
func (auth *Authenticator) GetAccessToken() access_token.AccessToken
GetAccessToken is getter for accessToken
type Config ¶
Config defines the configuration parameters for the authentication requests
func (*Config) GetContainerMode ¶
func (*Config) GetDefaultValues ¶
func (*Config) GetEnvVariables ¶
func (*Config) GetRequiredVariables ¶
func (*Config) GetTokenFilePath ¶
func (*Config) GetTokenTimeout ¶
func (*Config) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.