From 383ec0870e4e3d3a2f854a6bfc5c3841f3c73752 Mon Sep 17 00:00:00 2001 From: Domenico Francesco Bruscino Date: Wed, 2 Dec 2020 10:30:58 +0100 Subject: [PATCH] NO-JIRA Mask ssl context log passwords --- .../core/remoting/impl/ssl/DefaultSSLContextFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java index 133cc20159..46ce4507df 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java @@ -44,7 +44,7 @@ public class DefaultSSLContextFactory implements SSLContextFactory { String crlPath, String trustManagerFactoryPlugin, boolean trustAll) throws Exception { if (log.isDebugEnabled()) { final StringBuilder builder = new StringBuilder(); - configuration.forEach((k, v) -> builder.append("\r\n").append(k).append("=").append(v)); + configuration.forEach((k, v) -> builder.append("\r\n").append(k).append("=").append(k.toLowerCase().contains("password") ? "****" : v)); log.debugf("Creating SSL context with configuration %s", builder.toString()); } boolean useDefaultSslContext = ConfigurationHelper.getBooleanProperty(TransportConstants.USE_DEFAULT_SSL_CONTEXT_PROP_NAME, TransportConstants.DEFAULT_USE_DEFAULT_SSL_CONTEXT, configuration);