grafana: fix the sso.md admin claim, deny the publisher the admin password
docs/swarm/sso.md still said Grafana ships admin/admin and that a dead provider locks out the built-in admin. The password is minted into the store and the API still takes basic auth for it, so the paragraph now says where an operator reads it in an emergency. secrets.md says how to rotate the password and to deploy the store's host first, and no longer calls SSO the only way in. The secret publisher's `services/*` write covered the admin-password leaf, so a file-copier could set the password Grafana applies at its next start. The leaf gets the same exact-path deny as the callout seeds, with an arm in module-eval-bao-grants.
This commit is contained in:
parent
993f5fd99d
commit
eecd2b62e8
4 changed files with 71 additions and 30 deletions
|
|
@ -462,6 +462,23 @@ let
|
|||
"update"
|
||||
];
|
||||
}
|
||||
{
|
||||
# Grafana's admin password sits under the publisher's `services/*` write
|
||||
# too, and a planted value is the password the next Grafana start applies
|
||||
# to the server-admin account. The OIDC leaf beside it is the control:
|
||||
# still the prefix's.
|
||||
name = "the publisher may not write Grafana's admin password";
|
||||
ok =
|
||||
let
|
||||
grants = grantsIn baoGrantHere.systemd.services.swarm-bao-secret-publisher-policy.script;
|
||||
in
|
||||
(grantFor grants "secret/data/swarm/services/swarm-grafana/admin/password").caps == [ "deny" ]
|
||||
&&
|
||||
(grantFor grants "secret/data/swarm/services/swarm-grafana/oidc/client").caps == [
|
||||
"create"
|
||||
"update"
|
||||
];
|
||||
}
|
||||
{
|
||||
# The ordering is load-bearing and invisible at runtime: the controller's
|
||||
# unit creates the KV and cert-auth mounts this one writes into, so
|
||||
|
|
|
|||
Loading…
Reference in a new issue