prometheus: add helper script for pw hash
This commit is contained in:
parent
4564d1afe4
commit
b80e34070b
9
monitoring/prometheus/gen-pass.py
Normal file
9
monitoring/prometheus/gen-pass.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# nix-shell -p python310Packages.bcrypt --run 'python gen-pass.py'
|
||||
# https://prometheus.io/docs/guides/basic-auth/
|
||||
|
||||
import getpass
|
||||
import bcrypt
|
||||
|
||||
password = getpass.getpass("password: ")
|
||||
hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt())
|
||||
print(hashed_password.decode())
|
Loading…
Reference in a new issue