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

Stefan Seifert commented on SLING-13282:
----------------------------------------

thanks for starting this - i had a first look, this is my current view on it:
 * i agree the encryption should be part if the caconfig impl as well, and not 
part of [https://github.com/wcm-io/io.wcm.caconfig.editor/pull/81]
 * ideally, the editor implementation is only responsible for the UI - and to 
make sure the encrypted values are not accidentally exposed there in the HTML 
widgets.
 * the DeycrptService should be rather en EncryptionService that supports both 
encryption and decryption then.
 * we need the option to replace the actual crypto implementation with 
something else. so the EncryptionService interface should be moved to the SPI 
package and be exposed
 * we can add a default implementation based on Sling Crypto Service in the 
impl - with a documented service ranking, so it's possible to add a custom 
implementation with higher ranking

> Support automatic decryption in Context-Aware Configurations
> ------------------------------------------------------------
>
>                 Key: SLING-13282
>                 URL: https://issues.apache.org/jira/browse/SLING-13282
>             Project: Sling
>          Issue Type: Improvement
>    Affects Versions: Context-Aware Configuration API 1.3.0, Context-Aware 
> Configuration Impl 1.7.2
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> The high-level API described at 
> https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html#context-aware-configurations
>  relies on annotations to map a property to an underlying resource property: 
> https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html#describe-configurations-via-annotation-classes.
> Those should allow to optionally decrypt the underlying resource property 
> while reading from the resource through 
> https://sling.apache.org/documentation/bundles/commons-crypto.html#crypto-service.
>  Either the annotation 
> https://github.com/apache/sling-org-apache-sling-caconfig-api/blob/master/src/main/java/org/apache/sling/caconfig/annotation/Property.java
>  could be extended with an additional boolean flag or one could use the 
> existing {{properties}} element to use that.
> This is useful for sensitive data (like passwords, API keys, ...) which is 
> site specific (and therefore hard to store inside OSGi configurations) but 
> should nevertheless not be stored in clear text in the underlying repository.



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

Reply via email to