FilOzone / FilOzone/SessionKeyRegistry
Revoke a signer as a whole, not permission by permission
- Vorherrschende Sprache
- Solidity
- Sterne
- 0
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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`.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit src/SessionKeyRegistry.sol, insbesondere mit authorizationExpiry und _setAuthorizations, und lies anschließend die verlinkte Spec-Diskussion zur vorgesehenen Speicherstruktur. Definiere die Fertigstellung anhand des Widerrufs jeder Autorisierung für einen signer ohne eine vom Aufrufer bereitgestellte Berechtigungsliste, wobei das korrekte Ablaufverhalten des Logins erhalten bleibt und offengelegt wird, welche Berechtigungen ein signer besitzt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- solidity
- Bereich
- authorization, blockchain, security
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100