feat(web/pwcrypt): little web application for creating LDAP accounts

This generates the format expected in `//ops/users`.

Note that as of this commit I have not actually tested whether the
generated hashes work, as OpenLDAP doesn't ship with a tool to do that
and I have to actually use it, spin up an LDAP server and bind to it.

The plan is to host this at something like `tvl.fyi/signup`. There is
no plan to automatically submit the generated stuff to the repo,
people still have to email us (and display their street cred).

Note that currently the generated hashes have slightly different
parameters than what //tools/hash-password creates. This might not
matter, but it's probably still a good idea to try and explicitly set
Argon2 parameters.

Change-Id: Ic162afbf7fb0e05ca6efc131b3bb0a4187e28029
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8776
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2023-06-14 18:38:00 +03:00 committed by tazjin
parent 0f71d8f813
commit 8b637521c6
7 changed files with 1299 additions and 0 deletions

13
web/pwcrypt/Cargo.toml Normal file
View file

@ -0,0 +1,13 @@
[package]
name = "pwcrypt"
version = "0.1.0"
edition = "2021"
[dependencies]
argon2 = "0.5.0"
getrandom = { version = "0.2.10", features = ["js"] }
gloo = "0.8.0"
rand_core = { version = "0.6.4", features = ["getrandom"] }
wasm-bindgen = "= 0.2.84"
web-sys = "0.3"
yew = { version = "0.20.0", features = [ "csr" ]}