Abstract
As an AEM developer developing for the AEMaaCS SDK, it’s essential to have a local environment properly set up for development purposes. You may encounter environment-specific and secret variables in your OSGI configuration files. As an AEM developer trying to familiarize new features of the AEMaaCS SDK development environment, setting up environment-specific and secret variables is non-trivial at first. Once you have done it once, it will be much easier to move forward.
In this article, I will show you how to set up environment-specific and secret variables. If you would like to understand when to use environment-specific and secret variables effectively, check out the official AEM Adobe git documentation. At the end of this article, you are equipped to run your AEM local development environment with environment-specific and secret variables!
One last thing, it looks like only AEMaaCS SDK has environment-specific and secret variables feature enabled for OSGI configurations.
Examples of what OSGI configurations would look like with environment and secret variables set in your code base:
Environment-specific variable
high-level use-case: Values that are specific to a particular environment and may vary between different development environments cannot be targeted accurately by run mode, as AEMaaCS only has a single development run mode. For instance:
{
"url": "$[env:SERVER_API_URL]"
}
Secret variable
high-level use-case: Sensitive information, such as confidential data or authentication credentials, should not be stored in Git repositories due to security concerns. For instance:
{
"api-key": "$[secret:SERVER_API_KEY]"
}
Example of an OSGI configuration with the combination of the environment-specific and secret variables being used:
{
"connection.timeout": 1000,
"api-key": "$[secret:SERVER_API_KEY]",
"url": "$[env:SERVER_API_URL]"
}
Read Full Blog
Q&A
Please use this thread to ask the related questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.