// Authenticate via SASL EXTERNAL mechanism using client X.509
// certificate contained in JVM keystore
ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION, "simple");
ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, getUserDN(inBenutzer));
ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, inPasswort);
ctx.reconnect(null);
return true;
// Perform search for privileged attributes under authenticated context
} catch (IOException e) {
myLogger.error("TLS negotiation error:", e);