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

Refresh Token and Re-Issuance Flows + Deferred Endpoint #566

Open
wants to merge 28 commits into
base: versione-corrente
Choose a base branch
from

Conversation

fmarino-ipzs
Copy link
Collaborator

This PR resolves #538

In particular:

  • Introduces the Refresh Token Flow and Re-Issuance Flow

  • Specifies how to use the RT flow when the Access Token is expired in order to:

    • re-issue a new refreshed Digital Credential
    • use the notification endpoint when a Digital Credential is deleted by the User
    • properly use the deferred endpoint
  • Aligns the deferred endpoint with OID4VCI draft 15

  • Updates Low-Level Flow according to the new functionalities

@fmarino-ipzs fmarino-ipzs added this to the 0.9.2 milestone Feb 19, 2025
Co-authored-by: Giuseppe De Marco <[email protected]>
Co-authored-by: Giuseppe De Marco <[email protected]>
Host: eaa-provider.example.org
Content-Type: application/json
Authorization: DPoP Kz~8mXK1EalYznwH-LC-1fBAo.4Ljp~zsPE_NeO.gxU
DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6Ik
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memento review jwts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems ok. Do you see any issues here?

Co-authored-by: Giuseppe De Marco <[email protected]>
Host: eaa-provider.example.org
Content-Type: application/x-www-form-urlencoded
DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwieCI6IjR2dDhNdEFISmlsMzBDNnpUTmt2c0VVcnlHTEUtQW5BNkc5LV8xa3l5Rk0iLCJ5IjoiTWdiNTFfbjNSRjNtbHNtS3dMd0xtRUFqVmlJM3Q1bTVWNTI2MFA5MzR3RSIsImNydiI6IlAtMjU2In19.eyJqdGkiOiItQndDM0VTYzZhY2MybFRjIiwiaHRtIjoiR0VUIiwiaHR1IjoiaHR0cHM6Ly9yZXNvdXJjZS5leGFtcGxlLm9yZy9wcm90ZWN0ZWRyZXNvdXJjZSIsImlhdCI6MTU2MjI2MjYxOH0.3Tp1ZlZ05PQYeZUHhiZwaQ1etqnwYwoiJHFR_JHb32381lMJL-8o2rE3VZ8X3yuqrGFfCVeP90Ln4J5r8ASIBg
OAuth-Client-Attestation: eyJhbGciOiJFUzI1NiIsImtpZCI6IjBiNDk4ZGRlMDkxNzJhZGE3MDFkMDdlYjZmOTg2N2FkIn0.eyJpc3MiOiJodHRwczovL2NsaWVudC5leGFtcGxlLmNvbSIsInN1YiI6IjQ3Yjk4MjM2OTc5MWQwODAwM2E3MjgzZjA1OWNiMGQxIiwibmJmIjoxMzAwODE1NzgwLCJleHAiOjEzMDA4MTkzODAsImNuZiI6eyJqd2siOnsia3R5IjoiRUMiLCJ4IjoiZ1YzSDI0WGQyakhfaWFBd3hkbWlmMm5oeG9uUDhpZTQyQmE5UFhxR0RBcyIsInkiOiJpckZ3b0xabVNZd1FBWHpkZzUxcElPVDdtQ1R3RGtKQWUtdEctVUttYndrIiwiY3J2IjoiUC0yNTYifX19.qlYrkSCkrSDmmQNbbbi6Vj5BHJogOS-y2UErKinhmVUKLLDcBp3C_wasArEHiLnzykLi3hURNJEAAU7v798O6w
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing typ

Content-Type: application/x-www-form-urlencoded
DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwieCI6IjR2dDhNdEFISmlsMzBDNnpUTmt2c0VVcnlHTEUtQW5BNkc5LV8xa3l5Rk0iLCJ5IjoiTWdiNTFfbjNSRjNtbHNtS3dMd0xtRUFqVmlJM3Q1bTVWNTI2MFA5MzR3RSIsImNydiI6IlAtMjU2In19.eyJqdGkiOiItQndDM0VTYzZh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comment

The reason will be displayed to describe this comment to others. Learn more.

missing typ

iat and exp have the same value, they must be one minor than the other

Comment on lines +563 to +569
In the first case, the new Digital Credential's Users attribute set will match the original one. For example, a Credential Issuer may need to update the Digital Credential metadata or data format without changing the User's attribute set. In this case, the direct involvement of the User is not mandatory for the replacement and storage of a Digital Credential.

In the second case, Credential Issuers may also need to modify one or more User's attribute values during re-issuance. In this case, the Wallet Instance MUST inform the User that the attribute data set has been changed and MUST then request the User's authorization to store the new Digital Credential.

In both cases, the newly issued Digital Credential MUST have the same expiry date as the previous one.

Re-issuance after Digital Credential expiration MUST always require User authentication.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmarino-ipzs there are points for IA WG

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an important requirement for us. If we allow indefinite Credential renewals without proper User authentication, any security problem that occurred during the first-issuance would propagate indefinitely. This is one of the reasons why documents expire in the physical world and new identity proofing is required to issue a new document. Probably, we could relax this requirement in case a Digital Credential doesn't require User authentication during the first-issuance.

@giadas ^^

Copy link
Collaborator Author

@fmarino-ipzs fmarino-ipzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peppelinux we made a revision of non-normative example. Now they look good to me.

@fmarino-ipzs
Copy link
Collaborator Author

@peppelinux we also decided to remove ath claim in the Refresh Token as we don't see any benefit in having it.
Moreover, we removed Token Rotation as well. As we have client authentication and DPoP tokens, the token rotation is not needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
4 participants