Skip to content

feat(iam): index proof stores by tenant and principal - #134

Closed
pyropy wants to merge 1 commit into
srdjan/feat/iam-enforce-actionsfrom
srdjan/feat/iam-principal-index
Closed

pyropy wants to merge 1 commit into
srdjan/feat/iam-enforce-actionsfrom
srdjan/feat/iam-principal-index

Conversation

@pyropy

@pyropy pyropy commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

A firehose principal revocation names a tenant and a principal rather than a delegation CID, so the revoker needs a way from that pair to the access keys it covers. KeyProofs.Bind records the pair for a key and InvalidatePrincipal drops every store bound to it. Nothing binds keys yet. Part of the Forge S3 tenant IAM work (RFC).

Change log

  • PrincipalRef, Bind, InvalidatePrincipal, eviction-driven unbind on KeyProofs
  • Revoker.InvalidatePrincipal; clearKeys shared with Revoke
  • Tests: pair drops both stores, sibling survives, re-delivery and unknown pair are no-ops, rebind moves, stale eviction hook keeps a live rebinding

🤖 Generated with Claude Code

@pyropy
pyropy added this pull request to stack #135 September 10, 2026 16:21
A firehose principal event names a tenant and a userId, not a delegation
CID, so the revoker needs a way from that pair to the access keys it
covers. KeyProofs.Bind records the pair for a key and
InvalidatePrincipal drops every store bound to it;
Revoker.InvalidatePrincipal clears the verification key and tenant
alongside, sharing the helper with Revoke.

The index has its own mutex. go-cache runs the store eviction hook
synchronously from Delete, and InvalidateHolders deletes while holding
the registry mutex, so a hook reusing it would deadlock.

Nothing binds keys yet; the authorize path does that once hilt reports
the principal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pyropy
pyropy force-pushed the srdjan/feat/iam-enforce-actions branch from c756269 to a2a886d Compare September 11, 2026 12:42
@pyropy
pyropy force-pushed the srdjan/feat/iam-principal-index branch from c7aeaa3 to 76b5ec3 Compare September 11, 2026 12:42
@pyropy

pyropy commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the per-key marker design in fil-one/RFC#30 (f61f474): no principal invalidation record; markers are revoked through the existing /ucan/revoke. Branch kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant