Do not log password
Describe the bug
When running opencloud init the password of the admin user is logged which is bad practise due to security implications.
Steps to reproduce
- Using the container
opencloudeu/opencloud-rolling:2.3.0 /etc/opencloudbeing empty- Environment variable
IDM_ADMIN_PASSWORDset tomypassword - In the container run
opencloud init
Expected behavior
The password is not logged.
Actual behavior
The log contains:
=========================================
generated OpenCloud Config
=========================================
configpath : /etc/opencloud/opencloud.yaml
user : admin
password : mypassword
Setup
Additional context
@windsource I do not agree with your analysis.
We are creating a random password, if none is given. This is important, we should be always "Secure by default".
We need some method to inform the admin during the first startup of opencloud.
NOTE: This is only when using the internal IDM. Normal deployments are using external IDM.
@micbar I get your point. But you can see in my example, that I provide a password via the environment variable IDM_ADMIN_PASSWORD. What about logging the password only when has been generated?
@rhafer i am not sure if we can distinguish that case.