You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Domenico Francesco Bruscino (Jira)" <ji...@apache.org> on 2021/02/03 12:13:00 UTC

[jira] [Comment Edited] (ARTEMIS-3081) Cannot override the default Java key/truststore properties

    [ https://issues.apache.org/jira/browse/ARTEMIS-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17277930#comment-17277930 ] 

Domenico Francesco Bruscino edited comment on ARTEMIS-3081 at 2/3/21, 12:12 PM:
--------------------------------------------------------------------------------

ATM the javax.net.ssl properties have precedence on ActiveMQ-specific properties.

Supposing a user is using the javax.net.ssl properties he is not using ActiveMQ-specific properties because ActiveMQ-specific properties would not affect the configuration. 

Supposing a user is using the ActiveMQ-specific properties he is not using javax.net.ssl properties because javax.net.ssl properties would override the ActiveMQ-specific properties.

Supposing users are not using both ActiveMQ-specific and javax.net.ssl properties at the same time reverting the original precedence order should not cause any backward compatibility issues.


was (Author: brusdev):
ATM the javax.net.ssl properties have precedence on ActiveMQ-specific properties.

Supposing a user is using the javax.net.ssl properties he is not using ActiveMQ-specific properties because ActiveMQ-specific properties would not affect the configuration. 

Supposing a user is using the ActiveMQ-specific properties he is not using javax.net.ssl properties because javax.net.ssl properties would override the ActiveMQ-specific properties.

Supposing users are not using both ActiveMQ-specific and javax.net.ssl properties reverting the original precedence order should not cause any backward compatibility issues.

> Cannot override the default Java key/truststore properties
> ----------------------------------------------------------
>
>                 Key: ARTEMIS-3081
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3081
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.5.0, 2.16.0
>         Environment: In our case the application uses the default Java truststore location at {{$JAVA_HOME/lib/security/jssecacerts}}, and only supplies its password in {{javax.net.ssl.trustStorePassword}}, and then uses a dedicated truststore for Artemis. Defining both {{org.apache.activemq.ssl.trustStore}} and {{org.apache.activemq.ssl.trustStorePassword}} now makes Artemis use the dedicated truststore ({{javax.net.ssl.trustStore}} is not set as we use the
>  default location, so the second choice {{org.apache.activemq.ssl.trustStore}} applies), but with the Java default truststore password (first choice {{javax.net.ssl.trustStorePassword}} applies  instead of the second choice because it is set for the default truststore). Obviously, this does  not work unless both passwords are identical!
>            Reporter: Ingo Karkat
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> If an application wants to use a special key/truststore for Artemis but have the remainder of the application use the default Java store, the
> {code:java}
> org.apache.activemq.ssl.keyStore{code}
> needs to take precedence over Java's
> {code:java}
> javax.net.ssl.keyStore{code}
> However, the current implementation takes the first non-null value from
> {code:java}
> System.getProperty(JAVAX_KEYSTORE_PATH_PROP_NAME)
> System.getProperty(ACTIVEMQ_KEYSTORE_PATH_PROP_NAME)
> keyStorePath{code}
> So if the default Java property is set, no override is possible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)