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

Add "derivationOrigin" to id_alias credential #2664

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

lmuntaner
Copy link
Collaborator

@lmuntaner lmuntaner commented Oct 22, 2024

Motivation

Fix issue raised here: https://dfinity.atlassian.net/browse/FOLLOW-1651

Changes

  • Add the derivationOrigin field to the id_alias credential.
  • Do not import AliasTuple from vc-sdk. It created a dependency when I wanted to change it. Therefore, I assumed it should not come from the sdk because it's just a helper type within the II implementation.

I will add derivationOrigin to the AliasTuple in the sdk as well, but I believe those two types shouldn't be reused because it creates this dependency where the SDK needs to change for II to use the change, and then the SDK needs to use the new change again. There is no need for this flow with this shared type because it's just a helper type here.

Testing

I deployed locally and checked with the dummy relying party and issuer that the new field is added.

However, the integration tests rely on the VC SDK which still doesn't validate the new field. As soon as we add this validation, we should upgrade the dependency in II and the new field would be validated as well.


🟡 Some screens were changed

@lmuntaner lmuntaner marked this pull request as ready for review October 22, 2024 12:45
@lmuntaner lmuntaner requested a review from a team as a code owner October 22, 2024 12:45
@lmuntaner
Copy link
Collaborator Author

@frederikrothenberger please review

@lmuntaner lmuntaner force-pushed the lm-add-origin-vc-id-alias branch from fd1809b to a69e19a Compare October 22, 2024 12:48
Copy link
Contributor

@frederikrothenberger frederikrothenberger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@lmuntaner lmuntaner added this pull request to the merge queue Oct 23, 2024
Merged via the queue into main with commit f07f569 Oct 23, 2024
66 checks passed
@lmuntaner lmuntaner deleted the lm-add-origin-vc-id-alias branch October 23, 2024 07:51
lmuntaner added a commit to dfinity/verifiable-credentials-sdk that referenced this pull request Oct 24, 2024
# Motivation

Fix issue raised here: https://dfinity.atlassian.net/browse/FOLLOW-1651
which is already merged in II:
dfinity/internet-identity#2664

# Changes

* Add parameter `expected_derivation_origin` to `AliasTuple` and to
verify functions. Use the new param to check the claims of the id alias
credential.

# Tests

There were some hidden dependencies among tests and constants used. For
example, the expiration was the same in all the credentials.
* I created new variables and scoped the dependencies within the test if
possible.
* I kept some JWS because they are hard to replicate and there was no
need to redo again. Those are the ones that use a local IC root key.
* I added new JWS with the new id_alias used for most of the tests.
* I added two new tests. One to check that a wrong derivation origin
raises an error and another one that the verification fails with the old
JWS.

# Todos

- [x] Add entry to changelog (if necessary).
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