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

ASF GitHub Bot commented on CLOUDSTACK-7242:
--------------------------------------------

GitHub user karuturi opened a pull request:

    https://github.com/apache/cloudstack/pull/35

    Fixed CLOUDSTACK-7242: Adding a securing config using configDepo doesnt ...

    In ConfigurationVo, changed the setter to do the encryption if required
    (like the getter). Called the setter in constructor as well.
    
    Removed references of encryption check in different places.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-7242

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/35.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #35
    
----
commit 561bf08175edf878f6568641c65f63cabf70d6b8
Author: Rajani Karuturi <rajanikarut...@gmail.com>
Date:   2014-11-04T12:46:50Z

    Fixed CLOUDSTACK-7242: Adding a securing config using configDepo doesnt work
    
    In ConfigurationVo, changed the setter to do the encryption if required
    like the getter. Called the setter in constructor as well.
    
    Removed references of encryption check in different places.

----


> adding a Secure config using the new ConfigDepot and ConfigKey breaks the 
> build when encryption is enabled
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7242
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7242
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>            Reporter: Rajani Karuturi
>            Assignee: Rajani Karuturi
>            Priority: Critical
>             Fix For: 4.5.0
>
>
> In the inner layers, when it get the value of the key it tries to do decrypt 
> if its a secure or hidden field. But, it doesn’t encrypt while adding the 
> config.
> Here is code snippet from ConfigurationVO
> {noformat}
>    @Override
>     public String getValue() {
>         return (("Hidden".equals(getCategory()) || 
> "Secure".equals(getCategory())) ? DBEncryptionUtil.decrypt(value) : value);
>     }
>     public void setValue(String value) {
>         this.value = value;
>     }
> {noformat}
> we should make the getter and setter consistent. Otherwise, you won’t be able 
> to introduce any new secure/hidden configs unless you put the encrypted value 
> in the db before. 



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

Reply via email to