[
https://issues.apache.org/jira/browse/SLING-13282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100717#comment-18100717
]
Konrad Windszus edited comment on SLING-13282 at 7/31/26 10:59 AM:
-------------------------------------------------------------------
The only write API is IMHO
https://github.com/apache/sling-org-apache-sling-caconfig-impl/blob/master/src/main/java/org/apache/sling/caconfig/management/ConfigurationManager.java
(which is surprisingly not part of the API bundle). I will look into adding
encryption support to it. There is also the related PR for the GUI at
https://github.com/wcm-io/io.wcm.caconfig.editor/issues/69.
was (Author: kwin):
The only write API is IMHO
https://github.com/apache/sling-org-apache-sling-caconfig-impl/blob/master/src/main/java/org/apache/sling/caconfig/management/ConfigurationManager.java
(which is surprisingly not part of the API bundle). I will look adding
encryption support to it. There is also the related PR for the GUI at
https://github.com/wcm-io/io.wcm.caconfig.editor/issues/69.
> 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)