Expand description
SCRAM (RFC 5802) with support for SHA-256 and SHA-512.
Structs§
- PgScram
Verifier - A
PostgreSQLpg_authid.rolpasswordSCRAM-SHA-256 verifier. - Scram
Client Exchange - RFC 5802 SCRAM client-side handshake, initial phase.
- Scram
Client First - A parsed SCRAM client-first message.
- Scram
Credential - Scram
Iterations - Broker-valid PBKDF2 iteration count for a SCRAM credential.
Enums§
- Scram
Error - Errors returned by the
PostgreSQLSCRAM verifier codec. - Scram
Server Exchange - RFC 5802 SCRAM server-side handshake, one type per negotiation phase.
- Step
Result
Constants§
- DEFAULT_
SCRAM_ ITERATIONS - Default PBKDF2 iteration count for new Kafka SCRAM credentials.
- MAX_
SCRAM_ ITERATIONS - Maximum PBKDF2 iteration count accepted by the broker.
- MIN_
SCRAM_ ITERATIONS - Minimum PBKDF2 iteration count accepted by the broker.
- TOKEN_
AUTH_ EXTENSION - The SCRAM extension that marks a KIP-48 delegation-token authentication.
Its value is
truewhen the SCRAM username is a token id.
Functions§
- decode_
saslname - Decode an RFC 5802
saslname, as Kafka’sScramFormatter.usernamedoes. - derive_
keys_ from_ salted - Reconstruct
(stored_key, server_key)from the salted-password output the client sends in anAlterUserScramCredentialsRequestper KIP-554. - encode_
saslname - Encode a username as an RFC 5802
saslname:=becomes=3Dand,becomes=2C, as Kafka’sScramFormatter.saslNamedoes. - hash_
scram_ password - Hash
passwordinto a SCRAM credential with a fresh random 16-byte salt. - hash_
scram_ password_ with_ salt - Test-only entry that lets callers fix the salt for golden vectors.
- pbkdf2_
salted - Compute the PBKDF2 output for a SCRAM mechanism.
- scram_
hash_ len - Output byte length of the underlying hash function for a SCRAM mechanism.