Files
cozystack/pkg/registry/core
Andrei KvapilandTimofei Larkin d65f86277c feat(api): serve Credentials with mint and revoke
A Credential is a view over a CredentialTemplate's status, so a list or
a get never reads a Secret. A mint builds the whole account Secret from
the template and writes it under the Secret resourceVersion the
template's status mirrors, so a concurrent mint or a seed in between
fails with a conflict instead of silently replacing a password someone
just received, and returns the plaintext once. A revoke stores a random
password and discards it. A dry-run writes nothing.

Each mint and revoke records an Event on the application naming the
account and the caller, never the value, which needs create on events.
The API review gate now captures a subresource registration such as
credentials/mint as a resource of its own rather than dropping it.

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
..