appsody / stacks

Appsody application stacks. This repo will be archived soon.
https://appsody.dev
Apache License 2.0
90 stars 120 forks source link

java-openliberty: Use environment variables for username and password in appsody build image #750

Open awisniew90 opened 4 years ago

awisniew90 commented 4 years ago

By design, the Open Liberty stack removes the quick-start-security configuration from the build image produced via appsody build. This is to prevent accidentally deploying an image with a default user/password which is available for local development.

However, the removal of quick-start-security is not obvious and requires additional configuration to make the deployment useable (i.e. connecting to Prometheus in OpenShift)

Suggested solution We can enhance this by using environment variables for the username/password in the Liberty config. We can configure defaults for these variables in a separate config file and delete THAT rather than the whole quick-start-security config. When the app is deployed, a user can add a secret to the deployment and expose the username/password of that secret as ENV vars to the deployment.