Package org.apache.zookeeper.util.scram
Class ScramSaslServer
java.lang.Object
org.apache.zookeeper.util.scram.ScramSaslServer
- All Implemented Interfaces:
SaslServer
SCRAM-SHA-256 server per RFC 5802/7677, without channel binding or a
security layer. Credentials come from the standard SASL callbacks: the
password produced by
PasswordCallback is salted per session, so the
same callback handler serves DIGEST-MD5 and SCRAM (including delegation
token validation and the token session marker).
Because the credential source is the callback-provided password (static JAAS entries, HMAC-derived token passwords), the server re-derives the salted credential per authentication instead of storing salted verifiers. SCRAM here upgrades the wire (no password transmitted, mutual authentication, FIPS-approved primitives); it does not add stored-credential-compromise resistance over what the JAAS/token model already has.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()byte[]evaluateResponse(byte[] response) getNegotiatedProperty(String propName) booleanbyte[]unwrap(byte[] incoming, int offset, int len) byte[]wrap(byte[] outgoing, int offset, int len)
-
Constructor Details
-
ScramSaslServer
-
-
Method Details
-
getMechanismName
- Specified by:
getMechanismNamein interfaceSaslServer
-
evaluateResponse
- Specified by:
evaluateResponsein interfaceSaslServer- Throws:
SaslException
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfaceSaslServer
-
getAuthorizationID
- Specified by:
getAuthorizationIDin interfaceSaslServer
-
unwrap
public byte[] unwrap(byte[] incoming, int offset, int len) - Specified by:
unwrapin interfaceSaslServer
-
wrap
public byte[] wrap(byte[] outgoing, int offset, int len) - Specified by:
wrapin interfaceSaslServer
-
getNegotiatedProperty
- Specified by:
getNegotiatedPropertyin interfaceSaslServer
-
dispose
public void dispose()- Specified by:
disposein interfaceSaslServer
-