public class SaslServer
extends java.lang.Object
implements javax.security.sasl.SaslServer
SecurityProvider that this SASL server should use. If the provider.classname propery is not supplied, the default provider is jespa.ntlm.NtlmSecurityProvider. If a property is prefixed with "jespa.", the prefix will be removed and passed through to the provider constructor properties map.
The NtlmSecurityProvider requires the following properties to act as an acceptor in a SASL server:
| Name | Description | Example |
|---|---|---|
| jespa.bindstr | The fully qualified DNS hostname of the Active Directory server against which clients will be authenticated. | dc05.example.com |
| jepsa.service.acctname | The qualified Computer account name. | JESPA1$@EXAMPLE.COM |
| jepsa.service.password | The password for the above account | a89609c53443ce1c72e59275a8a1e1ce |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
mechanismName |
protected SecurityProvider |
provider |
| Constructor and Description |
|---|
SaslServer(java.lang.String mechanismName,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map props,
javax.security.auth.callback.CallbackHandler cbh)
Create a SaslServer that supports NTLM authentication, integrity and confidentiality.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
byte[] |
evaluateResponse(byte[] response) |
java.lang.String |
getAuthorizationID() |
java.lang.String |
getMechanismName() |
java.lang.Object |
getNegotiatedProperty(java.lang.String propName) |
boolean |
isComplete() |
byte[] |
unwrap(byte[] incoming,
int offset,
int len) |
byte[] |
wrap(byte[] outgoing,
int offset,
int len) |
protected java.lang.String mechanismName
protected SecurityProvider provider
public SaslServer(java.lang.String mechanismName,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map props,
javax.security.auth.callback.CallbackHandler cbh)
throws javax.security.sasl.SaslException
Currently this SASL server only supports an NTLM security provider and therefore the mechanismName should be "NTLM". The props parameter indicates which security provider should be used with the provider.classname property. Any properties prefixed with "jespa." will be stripped of the prefix and passed to the security provider constructor in a new map. The protocol, serverName and cbh parameters are currently ignored and should be null.
mechanismName - the mechanism which currently must be "NTLM"props - the properties that define which security provider is used and it's propertiesjavax.security.sasl.SaslException - if the underlying security provider could not be instantiatedpublic java.lang.String getMechanismName()
getMechanismName in interface javax.security.sasl.SaslServerpublic byte[] evaluateResponse(byte[] response)
throws javax.security.sasl.SaslException
evaluateResponse in interface javax.security.sasl.SaslServerjavax.security.sasl.SaslExceptionpublic boolean isComplete()
isComplete in interface javax.security.sasl.SaslServerpublic java.lang.String getAuthorizationID()
getAuthorizationID in interface javax.security.sasl.SaslServerpublic byte[] unwrap(byte[] incoming,
int offset,
int len)
throws javax.security.sasl.SaslException
unwrap in interface javax.security.sasl.SaslServerjavax.security.sasl.SaslExceptionpublic byte[] wrap(byte[] outgoing,
int offset,
int len)
throws javax.security.sasl.SaslException
wrap in interface javax.security.sasl.SaslServerjavax.security.sasl.SaslExceptionpublic java.lang.Object getNegotiatedProperty(java.lang.String propName)
getNegotiatedProperty in interface javax.security.sasl.SaslServerpublic void dispose()
throws javax.security.sasl.SaslException
dispose in interface javax.security.sasl.SaslServerjavax.security.sasl.SaslException