bao-grants: allow the hive forge token delete in the hives metadata check
This commit is contained in:
parent
b6dc46d315
commit
e9e71a09ac
1 changed files with 6 additions and 4 deletions
|
|
@ -1911,12 +1911,14 @@ let
|
||||||
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 "path \"secret/data/swarm/hives/+/squid-selfcheck\" {\n capabilities = [\"create\", \"read\"]\n}" s
|
||||||
&& !(lib.hasInfix "secret/data/swarm/hives/*" s)
|
&& !(lib.hasInfix "secret/data/swarm/hives/*" s)
|
||||||
# The only metadata it reaches under hives is the archive grants: list and delete.
|
# The only metadata it reaches under hives is the archive grants (list
|
||||||
|
# and delete) and the forge token's delete.
|
||||||
&& lib.hasInfix "path \"secret/metadata/swarm/hives/+/archive/\" {\n capabilities = [\"list\"]\n}" s
|
&& lib.hasInfix "path \"secret/metadata/swarm/hives/+/archive/\" {\n capabilities = [\"list\"]\n}" s
|
||||||
&& lib.hasInfix "path \"secret/metadata/swarm/hives/+/archive/+\" {\n capabilities = [\"delete\"]\n}" s
|
&& lib.hasInfix "path \"secret/metadata/swarm/hives/+/archive/+\" {\n capabilities = [\"delete\"]\n}" s
|
||||||
&& lib.all (g: lib.hasInfix "/archive/" g.path) (
|
&& lib.hasInfix "path \"secret/metadata/swarm/hives/+/forge/token\" {\n capabilities = [\"delete\"]\n}" s
|
||||||
lib.filter (g: lib.hasPrefix "secret/metadata/swarm/hives" g.path) (grantsIn s)
|
&& lib.all (
|
||||||
);
|
g: lib.hasInfix "/archive/" g.path || g.path == "secret/metadata/swarm/hives/+/forge/token"
|
||||||
|
) (lib.filter (g: lib.hasPrefix "secret/metadata/swarm/hives" g.path) (grantsIn s));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
# `attic_copy` reads the cache's four facts and writes each into every
|
# `attic_copy` reads the cache's four facts and writes each into every
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue