You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2023/02/18 06:38:00 UTC

[jira] [Commented] (AMQ-9064) Encryptionnotpossibleexception

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

Jean-Baptiste Onofré commented on AMQ-9064:
-------------------------------------------

Do you mean you need help on your client application ? In ActiveMQ we are using Jasypt to deal with enc/dec.

> Encryptionnotpossibleexception
> ------------------------------
>
>                 Key: AMQ-9064
>                 URL: https://issues.apache.org/jira/browse/AMQ-9064
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Security/JAAS
>    Affects Versions: 5.16.4, 5.17.0, 5.16.5
>            Reporter: Sureshkumar Jayapal
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 5.18.0, 5.17.4
>
>
> I tried configuring the encryption algorithm  PBEWithMD5AndDES as given. When I try to change the algorithm to anyone of the below, and try encrypt and decrypt command it is working good. I am able to encrypt and add it to the credentials-enc  file with ENC(encryptedvalue). When I try bringing the application up we are getting encryption not possibleexception. I need an help to resolve this issue
>  
>    PBEWITHHMACSHA224ANDAES_128
>    PBEWITHHMACSHA224ANDAES_256
>    PBEWITHHMACSHA256ANDAES_128
>    PBEWITHHMACSHA256ANDAES_256
>    PBEWITHHMACSHA384ANDAES_128
>    PBEWITHHMACSHA384ANDAES_256
>    PBEWITHHMACSHA512ANDAES_128
>    PBEWITHHMACSHA512ANDAES_256
>  
>  
> <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
>     <property name="algorithm" value="PBEWithMD5AndDES" />
>     <property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" /> 
>   </bean>
>                                                                      
>   <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
>     <property name="config" ref="environmentVariablesConfiguration" />  
>   </bean>  
>     
>   <bean id="propertyConfigurer" class="org.jasypt.spring4.properties.EncryptablePropertyPlaceholderConfigurer">
>       <constructor-arg ref="configurationEncryptor" /> 
>       <property name="location" value="file:${activemq.conf}/credentials-enc.properties"/> 
>   </bean> 
>   
>  
> <simpleAuthenticationPlugin>
>             <users>
>         <authenticationUser username="${admin.username}" password="${admin.password}"
>             groups="users,admins"/>
>                 <authenticationUser username="${activemq.username}" password="${activemq.password}"
>                     groups="users,admins"/>
>                 <authenticationUser username="${testuser.username}" password="${testuser.password}"
>                     groups="users"/>
>                 <authenticationUser username="${testguest.username}" password="${testguest.password}" groups="guests"/>
>      
>             </users>
>         </simpleAuthenticationPlugin>
>  
> credentials-enc
> activemq.username=system
> activemq.password=ENC(DCpgizp1wVsWUfpxct1/zQ==)
> admin.username=admin
> admin.password=ENC(UFUkexkcukvQdh298wVR2w==)
> testuser.username=testuser
> testuser.password=ENC(DCpgizp1wVsWUfpxct1/zQ==)
> testguest.username=testguest
> testguest.password=ENC(DCpgizp1wVsWUfpxct1/zQ==)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)