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
|
|
@ -300,12 +300,18 @@ gateway refuses its token too. See [`swarmctl/README.md`](../../swarmctl/README.
|
|||
with two ways in, and making authelia the only path there is a separate,
|
||||
reversible switch (tuwunel's `login_with_password`, forgejo's own setting).
|
||||
⚠️ **Grafana is the exception, and not a reversible one.** Its module sets
|
||||
`auth.disable_login_form` unconditionally, because Grafana ships an
|
||||
`admin`/`admin` account and its vhost is on the public gateway — so a
|
||||
password box there is a way in whatever the deployment. SSO is the only
|
||||
door, and a dead provider locks everyone out, the built-in admin
|
||||
included. That's why `swarm.grafana.oidc.role` defaults to `Admin`; see
|
||||
[`services.md`](services.md#metrics-victoriametrics--grafana).
|
||||
`auth.disable_login_form` unconditionally: its vhost is on the public
|
||||
gateway, so a password box there would be a way in whatever the
|
||||
deployment. The form is all this hides. Grafana's API still takes HTTP
|
||||
basic auth for the built-in `admin` account, whose password is a random
|
||||
one minted into the swarm secret store, not the upstream `admin`. A
|
||||
dead provider locks out the SSO accounts but not that one: an operator
|
||||
reads the password from `swarm/services/<grafana client id>/admin/password`
|
||||
in the store (or, as root on the Grafana host, from
|
||||
`/var/lib/grafana-admin/password` inside the `swarm-grafana` container)
|
||||
and calls the API with it. See [`services.md`](services.md#metrics-victoriametrics--grafana)
|
||||
and [`secrets.md`](secrets.md). SSO logins are the everyday way in, which
|
||||
is why `swarm.grafana.oidc.role` defaults to `Admin`.
|
||||
- **It doesn't provision users.** `swarmctl` creates and destroys agents
|
||||
continuously today, so the subject set belongs to a program rather
|
||||
than to a config file.
|
||||
|
|
|
|||
Loading…
Reference in a new issue