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

DCKM-435: remove optional attributes from pex proof requests #238

Conversation

maycon-mello
Copy link
Collaborator

No description provided.

},
{
path: ['$.expirationDate'],
optional: true,
optional: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

should we have tests with both scenarios? Also, do we have tests that ensure the field isn't returned in the presentation if it's optional and the user deselects it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added better tests and also documentation about this function. For now, the optional attribute is used to reveal the attribute automatically and the user can't deselect it since there is no UI implication. For example, in the expiration date. But I can see potential issues with an attribute from the credential subject being marked as optional, since it will be always revealed and the user can't see that. I've just created a jira for it https://dock-team.atlassian.net/browse/DCKA-2504

Two scenarios I can think about:

  • Expiration date being shared automatically:
    The user can't see that it will be shared

  • Credential subject attributes being shared automatically
    The user can't override that

We can handle that in the DCKM-439

* @sphereon/pex is not able to handle optional attributes in the presentation definition
* Any optional attribute in the presentation definition will cause the library to throw an error
* This function removes the optional attribute from the presentation definition
* This is a temporary workaround until the issue is fixed in the @sphereon/pex library
Copy link
Contributor

Choose a reason for hiding this comment

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

is there an issue in that repository we can link to/track?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've created an issue for that Sphereon-Opensource/PEX#150

@maycon-mello maycon-mello merged commit 17f27b0 into master Apr 8, 2024
1 check passed
@maycon-mello maycon-mello deleted the DCKM-435-wallet-679-expiry-date-when-present-in-vc-is-not-supported-in-the-wallet branch April 8, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants