FilOzone / FilOzone/SessionKeyRegistry

Revoke a signer as a whole, not permission by permission

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Solidity
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Description

The registry has no way to revoke a signer as a whole. Storage is `authorizationExpiry[user][signer][permission]`, and `revoke` writes zero only into the permissions the caller names. Nothing enumerates a signer's permissions on chain, so a client can only revoke the permissions it knows about, and any permission granted through another client, or added to the protocol later, stays live.

The same shape means expiries are per permission. A `login` that names a subset of permissions leaves the others on their old expiry, so shortening or renewing a key needs the full permission list too.

### Impact

A user who revokes a key in the console, or with `filecoin-pin session revoke`, cannot be sure the key is dead. Raised during review of the console's session keys page in FilOzone/filecoin-pay-explorer#346 (https://github.com/FilOzone/filecoin-pay-explorer/pull/346#discussion_r3971152844). The console's workaround is to send every permission it knows on revoke, which covers today's four FWSS permissions and nothing added later.

### Expected behavior

A caller can end a signer's authorization for every permission in one call, without knowing the list. Two shapes that fit the current storage:

1. A per-signer epoch: `authorizationExpiry` reads return zero when `signerEpoch[user][signer]` is newer than the grant. `revokeAll(signer)` bumps the epoch.
2. A stored permission set per signer that `login` appends to and `revokeAll` iterates.

Either also gives clients a way to read what a signer holds, which the console reconstructs from events today.

### Additional context

Spec discussion: FilOzone/filecoin-services#455. Contract: `src/SessionKeyRegistry.sol`, `_setAuthorizations`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/SessionKeyRegistry.sol, especially authorizationExpiry and _setAuthorizations, then read the linked spec discussion for the intended storage model. Define completion around revoking every authorization for a signer without a caller-supplied permission list, preserving correct login expiry behavior, and exposing what a signer holds.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
authorization, blockchain, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.