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

Base64Url Id instead of byte[] #586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Regenhardt
Copy link
Contributor

@Regenhardt Regenhardt commented Dec 30, 2024

#513

Not sure if any of the places that now use RawId should be changed to use Id instead, like CredentialId being returned from a successful assertion. This basically just changes the model and makes everything use the RawId, so minimal breaking changes hopefully.

@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.04%. Comparing base (b6102f0) to head (74bc4f1).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #586   +/-   ##
=======================================
  Coverage   76.04%   76.04%           
=======================================
  Files         101      101           
  Lines        2601     2601           
  Branches      432      432           
=======================================
  Hits         1978     1978           
  Misses        513      513           
  Partials      110      110           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abergs abergs self-requested a review January 10, 2025 16:10
Copy link
Collaborator

@abergs abergs left a comment

Choose a reason for hiding this comment

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

I've been reviewing this, as well has reading some of the related WebAuthn discussions. like: w3c/webauthn#2119

Although this will introduce lots of "won't-compile"-errors when people upgrade to 4.0, I agree it's probably the right thing to do.

The current set of changes look good, however I think we also need to change the Id-prop on AuthenticatorAttestationRawResponse, so I will request changes.

@Regenhardt
Copy link
Contributor Author

Changed the Id of AuthenticatorAttestationRawResponse to string too.

This might also be the right time to make the RawId be sent raw according to the comment in AuthenticatorAssertionRawResponse, although b64url is indeed a way nicer and also a widely expected way to send that kind of data:

// might be wrong to base64url encode this...
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("rawId"), Required]
public byte[] RawId { get; init; }

RawId is decoded to the raw byte value, while Id is the same value in base64url-encoded form.
@Regenhardt
Copy link
Contributor Author

Looks like for some reason the upload artifats github action is deprecated. Should I just update it here or would your prefer it in its own branch?

@abergs
Copy link
Collaborator

abergs commented Feb 17, 2025

@Regenhardt It's own branch please!

@abergs
Copy link
Collaborator

abergs commented Feb 17, 2025

Is this ready for review again?

@Regenhardt
Copy link
Contributor Author

Yes it's ready for review, although the failed pipeline has to wait for the new artifacts action to be updated.

@Regenhardt
Copy link
Contributor Author

This needs #590 to fix the pipeline.

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.

3 participants