swarm-bao: grant the bootstrap token the queue's pki role, policy and login role
swarm-bao-nats-tls-policy acts with the bootstrap token, and main's module-eval-bao-grants now fails any such unit whose calls the policy file does not grant. Adds its three paths and counts it among the units the check must see.
This commit is contained in:
parent
1d261b3fed
commit
0081d75c86
2 changed files with 18 additions and 3 deletions
|
|
@ -5,8 +5,8 @@
|
|||
# Each stanza was derived with `bao <cmd> -output-policy`, which prints what a
|
||||
# command requires without sending it. ../module-eval/bao-grants.nix reads
|
||||
# this file and fails when a unit that uses the token calls a path it does not
|
||||
# grant. The pki paths assume the default `servicesPkiMountPath` (`pki`) and
|
||||
# `servicesPkiRoleName` (`swarm-services`).
|
||||
# grant. The pki paths assume the default `servicesPkiMountPath` (`pki`),
|
||||
# `servicesPkiRoleName` (`swarm-services`) and `natsPkiRoleName` (`swarm-nats`).
|
||||
|
||||
# swarm-bao-controller-policy: the controller's own policy and role.
|
||||
path "sys/policies/acl/swarm-controller" {
|
||||
|
|
@ -116,6 +116,20 @@ path "auth/cert/certs/swarm-otel-oidc" {
|
|||
capabilities = ["create", "update"]
|
||||
}
|
||||
|
||||
# swarm-bao-nats-tls-policy: the queue's own pki role, beside
|
||||
# `swarm-services` above, and its policy and login role.
|
||||
path "pki/roles/swarm-nats" {
|
||||
capabilities = ["create", "update"]
|
||||
}
|
||||
|
||||
path "sys/policies/acl/swarm-nats" {
|
||||
capabilities = ["create", "update"]
|
||||
}
|
||||
|
||||
path "auth/cert/certs/swarm-nats" {
|
||||
capabilities = ["create", "update"]
|
||||
}
|
||||
|
||||
# swarm-bao-matrix-token-policy and swarm-bao-queue-agent-policy write one
|
||||
# policy and role per hive, `<prefix>-<hive>`, so these two are globs. Each
|
||||
# stops at its own prefix.
|
||||
|
|
|
|||
Loading…
Reference in a new issue