stop writing and attaching per-agent and per-hive bao policies
This commit is contained in:
parent
eac7f2a7c1
commit
139007e656
1 changed files with 253 additions and 419 deletions
|
|
@ -18,7 +18,7 @@ use crate::{
|
|||
///
|
||||
/// A flat leaf under the agent's prefix, like
|
||||
/// [`crate::forge::agent_token_path`], so the agent's own read stanza
|
||||
/// ([`crate::policy::render_agent`]) already covers it.
|
||||
/// ([`crate::policy::render_shared_agent`]) already covers it.
|
||||
///
|
||||
/// # Errors
|
||||
/// [`Error::PathSegment`] when `agent` contains anything but `[A-Za-z0-9_-]`,
|
||||
|
|
@ -84,13 +84,13 @@ mod tests {
|
|||
#[test]
|
||||
fn the_agents_own_read_grant_covers_the_path() {
|
||||
let path = account_path("atlas").expect("legal");
|
||||
let own = crate::policy::render_agent("atlas").expect("legal");
|
||||
let own = crate::policy::effective_agent("atlas");
|
||||
assert!(
|
||||
covered_by(&own, &path),
|
||||
"no stanza in\n{own}\ncovers {path}"
|
||||
);
|
||||
// The control: another agent's grant does not reach it.
|
||||
let other = crate::policy::render_agent("argus").expect("legal");
|
||||
let other = crate::policy::effective_agent("argus");
|
||||
assert!(!covered_by(&other, &path), "argus's policy reaches {path}");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue