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

Jean-Baptiste Onofré edited comment on KARAF-3625 at 4/6/15 6:03 AM:
---------------------------------------------------------------------

Encryption sometimes works, but most of the time doesn't, due to the following 
exception:

{code}
Exception in thread "Timer-0" java.lang.IllegalStateException: No encryption 
service found. Please install the Karaf encryption feature and check that the 
encryption algorithm is supported..
        at 
org.apache.karaf.jaas.modules.encryption.EncryptionSupport.getEncryption(EncryptionSupport.java:88)
        at 
org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport.getEncryptedPassword(AutoEncryptionSupport.java:117)
        at 
org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport.encryptedPassword(AutoEncryptionSupport.java:92)
        at 
org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport$1.run(AutoEncryptionSupport.java:64)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

{code}

It looks like a race condition. I'm fixing that.


was (Author: jbonofre):
Even if the encryption works on karaf-3.0.x, we can see the following exception 
in the console:

{code}
Exception in thread "Timer-0" java.lang.IllegalStateException: No encryption 
service found. Please install the Karaf encryption feature and check that the 
encryption algorithm is supported..
        at 
org.apache.karaf.jaas.modules.encryption.EncryptionSupport.getEncryption(EncryptionSupport.java:88)
        at 
org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport.getEncryptedPassword(AutoEncryptionSupport.java:117)
        at 
org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport.encryptedPassword(AutoEncryptionSupport.java:92)
        at 
org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport$1.run(AutoEncryptionSupport.java:64)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

{code}

> Password encryption doesn't work
> --------------------------------
>
>                 Key: KARAF-3625
>                 URL: https://issues.apache.org/jira/browse/KARAF-3625
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-security
>    Affects Versions: 3.0.3, 2.3.8, 2.3.9, 2.3.10, 4.0.0.M2
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Critical
>             Fix For: 2.4.2, 3.0.4, 2.3.11
>
>
> With encryption.enabled=true in etc/org.apache.karaf.jaas.cfg configuration 
> file, Karaf should encrypt the password in etc/users.properties (prefixing 
> and suffixing with {CRYPT} keyword).
> However, the password are not encrypted in the etc/users.properties.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to