feat(tools/hash-password): Add a wrapper script for slappasswd
This wrapper script correctly invokes slappasswd for generating ARGON2 hashes. People without Nix will need to figure this out on their own. Change-Id: I264715ba4932855b868bef70cc9102515b3d129e Reviewed-on: https://cl.tvl.fyi/c/depot/+/833 Tested-by: BuildkiteCI Reviewed-by: BuildkiteCI Reviewed-by: Kane York <rikingcoding@gmail.com>
This commit is contained in:
parent
a1556d71e6
commit
29984bb6f9
3 changed files with 11 additions and 0 deletions
|
@ -49,6 +49,9 @@ case "${TARGET_TOOL}" in
|
|||
gerrit)
|
||||
attr="tools.gerrit-cli"
|
||||
;;
|
||||
hash-password)
|
||||
attr="tools.hash-password"
|
||||
;;
|
||||
*)
|
||||
echo "The tool '${TARGET_TOOL}' is currently not installed in this repository."
|
||||
exit 1
|
||||
|
|
1
bin/hash-password
Symbolic link
1
bin/hash-password
Symbolic link
|
@ -0,0 +1 @@
|
|||
__dispatch.sh
|
7
tools/hash-password.nix
Normal file
7
tools/hash-password.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Utility for invoking slappasswd with the correct options for
|
||||
# creating an ARGON2 password hash.
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "hash-password" ''
|
||||
${pkgs.openldap}/bin/slappasswd -o module-load=pw-argon2 -h '{ARGON2}'
|
||||
''
|
Loading…
Reference in a new issue