Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: track credential state in DB #344

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented May 8, 2024

What this PR changes/adds

This PR removes the following states to a VerifiableCredentialResource:

  • REISSUE_REQUESTING
  • REISSUE_REQUESTED
  • TERMINATED

and in their place adds the following ones:

  • EXPIRED: when the credential has passed its expirationDate (if present). Non-reversible.
  • REVOKED: when the credential is marked as "revoked" by the status list credential.
  • SUSPENDED: when the credential is marked as "suspended" by the status list credential
  • NOT_YET_VALID: when the credentials issuanceDate is in the future.

Credentials marked as EXPIRED or REVOKED will be filtered out at the database layer, as their status can not change anymore.
All other credentials are filtered down on egress by the CredentialQueryResolver, as their status could have changed meanwhile.

Why it does that

The Presentation API should never return "invalid" (expired, suspended...) credentials.

Further notes

Note that this does not directly affect the Credential Management API

Linked Issue(s)

Closes #339

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@paullatzelsperger paullatzelsperger added enhancement New feature or request dcp api labels May 8, 2024
@paullatzelsperger paullatzelsperger marked this pull request as draft May 8, 2024 12:27
@paullatzelsperger paullatzelsperger marked this pull request as ready for review May 8, 2024 12:57
@paullatzelsperger paullatzelsperger merged commit f3a413e into eclipse-edc:main May 8, 2024
15 of 16 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/339_track_credential_status_in_db branch May 8, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api dcp enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Track revocation/suspension/expiry status of credentials in the database
2 participants