add one shared templated agent policy and name each agent's bao entity after it
This commit is contained in:
parent
d893097ffe
commit
4cdf807afc
9 changed files with 777 additions and 13 deletions
|
|
@ -380,6 +380,16 @@ let
|
|||
# The agent PKI grant is its only path on that mount: it can ask the one role
|
||||
# for a certificate, not write that role or reach the issuer.
|
||||
|
||||
# The identity grants name each agent's login entity after the agent
|
||||
# (`agent_entity.rs`). `sys/auth/cert` carries `sudo` because a plain `read`
|
||||
# of an auth mount is refused, and it is that one mount: it yields the
|
||||
# accessor an entity alias names the mount by. Every identity stanza lists the
|
||||
# request keys it takes, so the grants cannot set an entity's `policies`, which
|
||||
# would attach any policy to a login. The entity and alias names are not
|
||||
# scoped further, by accessor or by entity: an agent's name is not known at
|
||||
# deploy time, so the guard in `agent_entity.rs` (rename only a name the store
|
||||
# generated, never move an alias) is what prevents an identity swap.
|
||||
|
||||
# The two `list` paths end in `/`: bao checks a LIST against the directory
|
||||
# with a trailing slash, where `+` matches the empty last segment, so a
|
||||
# slashless list path loses that request to the `+/matrix/+` and `+/forge/+`
|
||||
|
|
@ -401,6 +411,41 @@ let
|
|||
capabilities = ["list"]
|
||||
}
|
||||
|
||||
path "sys/auth/cert" {
|
||||
capabilities = ["read", "sudo"]
|
||||
}
|
||||
|
||||
path "identity/lookup/entity" {
|
||||
capabilities = ["update"]
|
||||
allowed_parameters = {
|
||||
"alias_name" = []
|
||||
"alias_mount_accessor" = []
|
||||
}
|
||||
}
|
||||
|
||||
path "identity/entity/name/+" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
allowed_parameters = {
|
||||
"name" = []
|
||||
}
|
||||
}
|
||||
|
||||
path "identity/entity/id/+" {
|
||||
capabilities = ["update"]
|
||||
allowed_parameters = {
|
||||
"name" = []
|
||||
}
|
||||
}
|
||||
|
||||
path "identity/entity-alias" {
|
||||
capabilities = ["create", "update"]
|
||||
allowed_parameters = {
|
||||
"name" = []
|
||||
"mount_accessor" = []
|
||||
"canonical_id" = []
|
||||
}
|
||||
}
|
||||
|
||||
path "${credentialMountPath}/data/swarm/agents/*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue