swarm-controller: stop minting the per-hive matrix sender account and token nothing reads
This commit is contained in:
parent
cb5fb3c730
commit
c66832febf
1 changed files with 40 additions and 556 deletions
|
|
@ -1862,21 +1862,19 @@ let
|
|||
covers "hive-hives" && covers "hive-agent" && !(covers "swarm-hives");
|
||||
}
|
||||
{
|
||||
# `matrix_account::hive_sender` writes every hive's sender token and
|
||||
# `forge::hive_token` every hive's forge token, and nothing else under
|
||||
# `hives/`, where each hive's queue credential also lives. `proxy_credential`
|
||||
# `forge::hive_token` writes every hive's forge token, and nothing else
|
||||
# under `hives/`, where each hive's queue credential also lives. `proxy_credential`
|
||||
# creates each hive's squid self-check credential and reads it back, and
|
||||
# has no `update`, so it cannot replace one. `+` is one
|
||||
# segment, which keeps each stanza to its one leaf; a `*` is a glob only
|
||||
# at the end of a path. Pinned as whole stanzas, so an added capability
|
||||
# fails.
|
||||
name = "the controller writes each hive's sender and forge tokens, creates its squid self-check credential, manages its archive grants, and nothing else under hives";
|
||||
name = "the controller writes each hive's forge token, creates its squid self-check credential, manages its archive grants, and nothing else under hives";
|
||||
ok =
|
||||
let
|
||||
s = baoGrantHere.systemd.services.swarm-bao-controller-policy.script;
|
||||
in
|
||||
lib.hasInfix "path \"secret/data/swarm/hives/+/matrix/sender-token\" {\n capabilities = [\"create\", \"read\", \"update\"]\n}" s
|
||||
&& lib.hasInfix "path \"secret/data/swarm/hives/+/forge/token\" {\n capabilities = [\"create\", \"read\", \"update\"]\n}" s
|
||||
lib.hasInfix "path \"secret/data/swarm/hives/+/forge/token\" {\n capabilities = [\"create\", \"read\", \"update\"]\n}" s
|
||||
&& lib.hasInfix "path \"secret/data/swarm/hives/+/squid-selfcheck\" {\n capabilities = [\"create\", \"read\"]\n}" s
|
||||
&& !(lib.hasInfix "secret/data/swarm/hives/*" s)
|
||||
# The only metadata it reaches under hives is the archive grants: list and delete.
|
||||
|
|
|
|||
Loading…
Reference in a new issue