How to use secret keys/variables in Cloud configurations like Captcha.
Tried saving the property as $[env:SITE_KEY], but it didn't work. PFA screenshot.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
No, you cannot do that.
@Rohan0794 You can store these as configuration entries in the cloud manager and then use the same in the OSGI configs. More details here -
Hello @Rohan0794
1. We need to store the variable as a Secret in Cloud Manager for that specific environment.
2. We need to specifiy that its a secret, in OSGi config.
${secret.VARIABLE_NAME}
3. Make sure that the OSGi configuration is picked up in the environment. Verify the active configuration via Developer console in CM.
I am aware that we can store in Cloud manager and retrieve in OSGI using the above syntax but can we access the environment variable or secret in JCR properties directly using $[env:<variable_name>]?
No, you cannot do that.
Can we get OSGI values in JCR properties with some syntax?
Views
Replies
Total Likes
you cannot read OSGI properties via the JCR API. Also I am not aware that you can access OSGI properties directly in HTL.
You always have to go via an OSGI service, which can OSGI properties as service properties.
Views
Likes
Replies