no log ldap credentials

This commit is contained in:
MaxKey
2022-01-26 08:37:22 +08:00
parent c544b8b266
commit c3d2a4b94a
4 changed files with 16 additions and 14 deletions

View File

@@ -68,9 +68,10 @@ public class ActiveDirectoryUtils extends LdapUtils {
@Override
protected void initEnvironment() {
if(props == null) {
_logger.info("PROVIDER_URL:" + providerUrl);
_logger.info("SECURITY_PRINCIPAL:" + principal);
_logger.info("SECURITY_CREDENTIALS:" + credentials);
_logger.debug("PROVIDER_URL {}" , providerUrl);
_logger.debug("SECURITY_PRINCIPAL {}" , principal);
//no log credentials
//_logger.trace("SECURITY_CREDENTIALS {}" , credentials);
// LDAP
props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");

View File

@@ -112,9 +112,10 @@ public class LdapUtils {
protected void initEnvironment() {
// LDAP
if(props == null) {
_logger.debug("PROVIDER_URL:" + providerUrl);
_logger.debug("SECURITY_PRINCIPAL:" + principal);
_logger.trace("SECURITY_CREDENTIALS:" + credentials);
_logger.debug("PROVIDER_URL {}" , providerUrl);
_logger.debug("SECURITY_PRINCIPAL {}" , principal);
//no log credentials
//_logger.trace("SECURITY_CREDENTIALS {}" , credentials);
props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
props.setProperty(Context.URL_PKG_PREFIXES, "com.sun.jndi.url");