Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entrypoint needed to create the user on the database #2

Open
j1cs opened this issue Jul 14, 2021 · 3 comments
Open

Entrypoint needed to create the user on the database #2

j1cs opened this issue Jul 14, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@j1cs
Copy link

j1cs commented Jul 14, 2021

Is't possible to create an entrypoint to create the database initialization as it's done in docker-mailserver-postfix?

@technicalguru
Copy link
Owner

Yes, I guess this could be done. But the installation procedure is complicated for Roundcube. That's why there was no effort put there in yet.

Also: Postfix does not contain any web component. That's why having an environment or secret with the database root password would be less risky (still it is recommended to remove this after initial setup). But Roundcube is faced via webserver. So people might forget about the root password and attackers would be able to steal it as the vector with PHP is pretty big.

@j1cs
Copy link
Author

j1cs commented Jul 14, 2021

I understand.
What do you think about something very simple like create the user to avoid this:
DSN (write): NOT OK(SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'172.22.0.5' (using password: YES))
in the first start (installer step)

@technicalguru
Copy link
Owner

I will need some time to think about it. A solution could be to setup the database user when it's not there, using the root password - but when the user exists and the root password is still available then fail the container. this would avoid the vulnarability after setup.

@technicalguru technicalguru self-assigned this Jul 14, 2021
@technicalguru technicalguru added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants