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

Automatic hashing password #96

Open
MikyWoW opened this issue Feb 8, 2019 · 1 comment
Open

Automatic hashing password #96

MikyWoW opened this issue Feb 8, 2019 · 1 comment

Comments

@MikyWoW
Copy link

MikyWoW commented Feb 8, 2019

There should be password in plain text in docker-compose.yml
Using hash is inconvenient.

environment:
            - PHPREDMIN_AUTH_USERNAME=UserName
            - PHPREDMIN_AUTH_PASSWORD=PlainPassword

You can hash it and save somewhere on first run index.php

$hash = GetHash();
if(!$hash){
$pwd = getenv('PHPREDMIN_AUTH_PASSWORD');
$hash = password_hash($pwd, PASSWORD_DEFAULT);
SaveHash($hash);
}
// login method
@luongvm
Copy link
Contributor

luongvm commented Feb 8, 2019

Tbh, that could work, because I suppose that's a safe place and it can't leak, also you still have the options to inject secret variables in ci/cd.
And you don't have to try to save it in the first run; hash it and store it while building your docker images instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants