karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Antinori (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4567) ENC( not working in ConfigAdmin
Date Wed, 22 Jun 2016 12:36:57 GMT

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

Paolo Antinori commented on KARAF-4567:
---------------------------------------

I have spoken with Guillaume and it turned out that the issue was the order of definition
of my sibling nodes.

{{cm:}}  node needs to be defined bedore {{enc:}} node, otherwise it won't affect the behavior.

The unit test still looks to be wrong though, not really testing what is supposed to test.

> ENC(  not working in ConfigAdmin
> --------------------------------
>
>                 Key: KARAF-4567
>                 URL: https://issues.apache.org/jira/browse/KARAF-4567
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.4.4, 4.0.5
>            Reporter: Paolo Antinori
>            Priority: Minor
>
> I'm trying to make support for encrypted properties in in ConfigAdmin and I cannot make
it.
> My suspect is that the functionality is not really working and that the unit test is
indeed not testing the functionality.
> The test is https://github.com/apache/karaf/blob/master/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
and I think it should not assert for the correct value of {{foo}} but it should check the
correct value of {{encoded}}, coming from https://github.com/apache/karaf/blob/master/jaas/blueprint/jasypt/src/test/resources/org/apache/karaf/jaas/blueprint/jasypt/handler/configadmin-test.xml
> I'm still on this and I might be wrong, but for what I can see, tokens like {{ENC($\{prop})}}
fail to be replaced because {{org.apache.karaf.jaas.jasypt.handler.EncryptablePropertyPlaceholder}}
always try to encrypt strings like {{$\{prop\}}} that have not been correctly replaced.



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

Mime
View raw message