Commit Graph
2 Commits
Author SHA1 Message Date
Andrei KvapilandTimofei Larkin 3c547721fa feat(credentials): add the account package
The Cozystack API, the CredentialTemplate controller and the migration
tooling must agree on an account Secret's name, its labels, the record
of who set the password and when, and the valuesFrom entry that carries
a stored value into a chart that reads no Secret. One package holds all
of it so the three cannot drift apart.

The values key of an account is the SHA-256 of its user name, which fits
a valuesFrom targetPath whatever characters the name holds.

Co-authored-by: Timofei Larkin <lllamnyp@gmail.com>
Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-24 23:06:02 +01:00
Timofei Larkin 0cd89dc1c8 feat(credentials): add the built-in password formats
The platform stores what an engine checks a password against, not the
password: a SCRAM-SHA-256 verifier for PostgreSQL, the
mysql_native_password hash for MariaDB, the SHA-256 hex for ClickHouse,
and the plaintext only for an engine whose operator computes its own
verifier. The migration tooling imports the same package, so a converted
release and a mint store the same form.

CodeQL flags the SHA-1 and SHA-256 of a password as weak hashing of
sensitive data. Both are the forms the engines store and check against
and accept in no other form, and the design relies on the 32-character
random password rather than on the digest for strength, so the code says
that where the hashing happens.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-24 23:06:02 +01:00