pub struct LfsGrantProvider { /* private fields */ }Expand description
The wired ownership provider — alkgit’s registry composed onto the
ops ACL (the batch’s authorization posture: lfs.md §1 — the
per-repo grant governs batch access, the ADR-011 posture composed
onto the ops ACL). The alkblobs ops specs gate on blob-namespace
resources whose id is the payload’s namespace — the repo id; this
provider answers with the same authorize
policy function the git surface composes: read granted (or
anonymous-public — the door’s synthesized anon identity rides
the public-repo flag here), write per the grant monotonicity
(manage ⊃ write ⊃ read). Unknown repos deny by default —
the unknown ≡ unauthorized posture. Served through the cached
read provider’s sync resolve (the hot path — no await, no round
trip; a stale cache delays revocation until the next refresh, the
same posture the git serving path takes).
Implementations§
Source§impl LfsGrantProvider
impl LfsGrantProvider
Sourcepub fn new(provider: Arc<CachedRegistryProvider>) -> Self
pub fn new(provider: Arc<CachedRegistryProvider>) -> Self
The provider over a cached read provider (the assembly’s —
SubstrateAssembly::provider).
Trait Implementations§
Source§impl OwnershipProvider for LfsGrantProvider
impl OwnershipProvider for LfsGrantProvider
Source§fn owns(
&self,
identity: &Identity,
resource_type: &str,
resource_id: &str,
action: &str,
) -> bool
fn owns( &self, identity: &Identity, resource_type: &str, resource_id: &str, action: &str, ) -> bool
identity own resource_type/resource_id with action?
The action parameter is accepted but not gated on — the base model
is “owner can do anything they own.” Per-action grants are a future
extension; this preserves the door without building the mechanism.