swarm-secret-client: write hive policies to the modern ACL path
`write_policy` called `vaultrs::sys::policy::set`, which targets `sys/policy/<name>` — the deprecated alias the store gates as a path of its own. Every grant in this tree names `sys/policies/acl/hive-*`, so a correctly-scoped controller was refused with a 403 and no hive read policy has ever been written, on any deployment. The doc comment three lines above the call already named the modern path; the code is what moves to meet it. vaultrs has no endpoint for that path (`grep policies/acl` over 0.8.0: zero hits, against 8 for `sys/policy`), so this defines one over its own endpoint machinery — which keeps the client's token header and `/v1` prefix middleware rather than re-deriving them. The alternative was to widen the grant to cover the legacy path. This way needs no policy change at all: the deployed grant already permits the write, so no store is re-bootstrapped and nothing is entrenched on an alias upstream has deprecated. Two tests pin the path and the body shape. The reason this survived deployment is that nothing in the tree ever asserted either one. Closes #4177.
This commit is contained in:
parent
61f60d0039
commit
560f727797
4 changed files with 69 additions and 1 deletions
|
|
@ -95,6 +95,11 @@ swarm-queue-client = { path = "swarm-queue-client" }
|
|||
swarm-secret-client = { path = "swarm-secret-client" }
|
||||
thiserror = "2"
|
||||
vaultrs = "0.8"
|
||||
# vaultrs's transport crates. Direct dependencies because one endpoint is
|
||||
# defined here rather than by it; both versions must stay the ones vaultrs
|
||||
# resolves, since its `exec_with_empty` takes *its* `Endpoint` trait.
|
||||
rustify = "0.7"
|
||||
rustify_derive = "0.5"
|
||||
tower-http = { version = "0.7", features = ["fs"] }
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
rmcp = { version = "2", default-features = false, features = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue