This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/encryption in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git
commit ca5d67f017184748621dc81287b350143ce18d6b Author: Konrad Windszus <[email protected]> AuthorDate: Thu Jul 30 18:14:07 2026 +0200 SLING-13282 Add encrypted element to Property annotation --- pom.xml | 2 +- src/main/java/org/apache/sling/caconfig/annotation/Property.java | 9 +++++++++ .../java/org/apache/sling/caconfig/annotation/package-info.java | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f2a7518..4571e12 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ </parent> <artifactId>org.apache.sling.caconfig.api</artifactId> - <version>1.3.1-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Apache Sling Context-Aware Configuration API</name> <description>Apache Sling Context-Aware Configuration API</description> diff --git a/src/main/java/org/apache/sling/caconfig/annotation/Property.java b/src/main/java/org/apache/sling/caconfig/annotation/Property.java index 3ccad1f..15ff6f0 100644 --- a/src/main/java/org/apache/sling/caconfig/annotation/Property.java +++ b/src/main/java/org/apache/sling/caconfig/annotation/Property.java @@ -49,4 +49,13 @@ public @interface Property { * @return Number to control property order in configuration editor. */ int order() default 0; + + /** + * Indicates whether the property value is encrypted in the underlying repository storage and should be automatically + * decrypted during reading. + * It also acts as a hint for configuration editor GUIs to write the property value in encrypted form. + * @return {@code true} if the property value is encrypted, {@code false} otherwise. + * @since 1.2.0 (Bundle version 1.4.0) + */ + boolean encrypted() default false; } diff --git a/src/main/java/org/apache/sling/caconfig/annotation/package-info.java b/src/main/java/org/apache/sling/caconfig/annotation/package-info.java index d4ef2b2..fdce80c 100644 --- a/src/main/java/org/apache/sling/caconfig/annotation/package-info.java +++ b/src/main/java/org/apache/sling/caconfig/annotation/package-info.java @@ -19,5 +19,5 @@ /** * Annotations for context-aware configurations. */ [email protected]("1.1.0") [email protected]("1.2.0") package org.apache.sling.caconfig.annotation;
