Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConn ¶
type AuthConn interface { // SendAuthRequest send a request for authentication information. After // calling this, the authenticator needs to call GetPwdData() quickly, as the // connection's goroutine will be blocked on providing us the requested data. SendAuthRequest(authType int32, data []byte) error // GetPwdData returns authentication info that was previously requested with // SendAuthRequest. The call blocks until such data is available. // An error is returned if the client connection dropped or if the client // didn't respect the protocol. After an error has been returned, GetPwdData() // cannot be called any more. GetPwdData() ([]byte, error) // AuthOK declares that authentication succeeded and provides a // unqualifiedIntSizer, to be returned by authenticator.authResult(). Future // authenticator.sendPwdData() calls fail. AuthOK(unqualifiedIntSizer) // AuthFail declares that authentication has failed and provides an error to // be returned by authenticator.authResult(). Future // authenticator.sendPwdData() calls fail. The error has already been written // to the client connection. AuthFail(err error) // Logf logs a message on the authentication log, if auth logs // are enabled. Logf(ctx context.Context, format string, args ...interface{}) }
AuthConn is the interface used by the authenticator for interacting with the pgwire connection.
type AuthMethod ¶
type AuthMethod func( ctx context.Context, c AuthConn, tlsState tls.ConnectionState, pwRetrieveFn PasswordRetrievalFn, pwValidUntilFn PasswordValidUntilFn, execCfg *sql.ExecutorConfig, entry *hba.Entry, ) (security.UserAuthHook, error)
AuthMethod defines a method for authentication of a connection.
type PasswordRetrievalFn ¶
PasswordRetrievalFn defines a method to retrieve the hashed password for the user logging in.
type PasswordValidUntilFn ¶
type PasswordValidUntilFn = func(context.Context) (*ast.DTimestamp, error)
PasswordValidUntilFn defines a method to retrieve the expiration time of the user's password.
Directories ¶
Path | Synopsis |
---|---|
Package hba implements an hba.conf parser.
|
Package hba implements an hba.conf parser. |
Package pgcode defines the PostgreSQL 5-character support codes used throughout the CockroachDB source ast.
|
Package pgcode defines the PostgreSQL 5-character support codes used throughout the CockroachDB source ast. |
Package pgwirebase contains type definitions and very basic protocol structures to be used by both the pgwire package and by others (particularly by the sql package).
|
Package pgwirebase contains type definitions and very basic protocol structures to be used by both the pgwire package and by others (particularly by the sql package). |
Click to show internal directories.
Click to hide internal directories.