nuts-foundation / nuts-foundation/nuts-node
Key resolver: check expires/revoked against reference time
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
Parent PRD
#4079
What to build
Extend DIDKeyResolver.ResolveKeyByID() to check Expires and Revoked fields on the verification method against the reference time (ResolveMetadata.ResolveTime) before returning the key.
Per PSA 10.4.3, key resolution selects the correct key and validates:
- The reference time must be before the
Expiresdate (if set) - The key must not be marked as
Revokedwith a revocation date before the reference time
If the key was expired or revoked at the reference time, it should not be returned (return an appropriate error).
This is a generic mechanism — it works for any DID method that sets Expires/Revoked on its verification methods, not just did:x509.
Acceptance criteria
-
ResolveKeyByIDchecksExpiresagainstResolveMetadata.ResolveTime— rejects if key was expired at reference time -
ResolveKeyByIDchecksRevokedagainstResolveMetadata.ResolveTime— rejects if key was revoked before reference time - A key that was valid at the reference time but later expired/revoked is accepted (PSA 10.4.3)
- When
ResolveTimeis nil (current time), standard time-based checks apply - Existing key resolution behavior is unchanged for DID methods that don't set these fields
- Unit tests for: expired key rejected, revoked key rejected, key valid at issuance but later revoked accepted, key without expires/revoked accepted
Blocked by
- Blocked by #4082 (
expires/revokedfields on VerificationMethod in go-did) - Can be done in parallel with #4083 (did:x509 resolver changes)
User stories addressed
- User story 6: key validity checked at credential's issuance time
- User story 8: layered validation model follows PSA spec
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with DIDKeyResolver.ResolveKeyByID() and the ResolveMetadata.ResolveTime and verification method fields described in the issue; review blocked issue #4082 first. Add checks and unit tests for expiry, revocation, historical validity, and unset fields, while preserving behavior for methods that do not set them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100