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

Breakout development services & improve naming #427

Merged
merged 14 commits into from
Oct 3, 2023

Conversation

iamcarbon
Copy link
Contributor

@iamcarbon iamcarbon commented Aug 30, 2023

  • Moves the DevelopmentInMemoryStore, StoredCredential, and ConformanceMetadataService into a new Fido2.Development project.

  • Renames a few properties on StoredCredential for clarity.

  • Removes duplicate properties on StoredCredential (preferring specification name)

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2023

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

Codecov Report

Attention: Patch coverage is 91.11111% with 4 lines in your changes missing coverage. Please review.

Project coverage is 77.50%. Comparing base (6655af9) to head (7d88636).
Report is 47 commits behind head on master.

Files with missing lines Patch % Lines
...o2.Models/Objects/RegisteredPublicKeyCredential.cs 92.30% 1 Missing ⚠️
Src/Fido2/AttestationFormat/AppleAppAttest.cs 0.00% 0 Missing and 1 partial ⚠️
Src/Fido2/AuthenticatorAssertionResponse.cs 83.33% 1 Missing ⚠️
Src/Fido2/Objects/AttestedCredentialData.cs 87.50% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #427      +/-   ##
==========================================
+ Coverage   75.54%   77.50%   +1.95%     
==========================================
  Files         100       98       -2     
  Lines        2785     2716      -69     
  Branches      455      445      -10     
==========================================
+ Hits         2104     2105       +1     
+ Misses        562      492      -70     
  Partials      119      119              

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

@@ -4,6 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>11</LangVersion>
Copy link
Contributor

Choose a reason for hiding this comment

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

Better remove this property from all the projects and update the one in the global Directory.Build.props instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@iamcarbon Agreed, but could be separate PR.


public byte[] UserHandle { get; set; }

public string CredType { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Could rename this to AttestationFormat, see #426.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed that AttestationFormat is a better name here. Updated.

@Regenhardt
Copy link
Contributor

This will definitely complete 3) from #426, nice.

@iamcarbon iamcarbon changed the title Breakout development services into their own project Breakout development services & improve naming Aug 31, 2023
@iamcarbon
Copy link
Contributor Author

@abergs Ready for review. This partially addresses the feedback received in #427

@abergs
Copy link
Collaborator

abergs commented Sep 6, 2023

Thanks @iamcarbon and @Regenhardt - I've done a first pass, but will need more time to review this as it's extensive changes. Combined with a busy schedule, it make take some extra time before I'm able to merge. Thanks for the contributions and patience.

@abergs
Copy link
Collaborator

abergs commented Sep 28, 2023

Just an update, I will start work on this.

@iamcarbon
Copy link
Contributor Author

iamcarbon commented Sep 29, 2023

@abergs I think we have two options on CredentialId.

  1. Drop it from AttestationVerificationSuccess (it was never set)
  2. Rename Id to CredentialId.

My thinking on keeping Id (and dropping CredentialId) in this PR is explained in #428. The meaning of Id could also be clarified by renaming the type to something ending in Credential.

@@ -4,6 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>11</LangVersion>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@iamcarbon Agreed, but could be separate PR.

@@ -79,7 +79,7 @@ public AuthenticatorData(byte[] rpIdHash, AuthenticatorFlags flags, uint signCou
/// Backup state is signaled in authenticator data's flags and can change over time.
/// <see cref="https://w3c.github.io/webauthn/#backup-state"/>
/// </summary>
public bool BackupState => _flags.HasFlag(AuthenticatorFlags.BS);
public bool IsBackedUp => _flags.HasFlag(AuthenticatorFlags.BS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was contemplating if we should always keep using Spec terms on places you added IsBackedUp.

I decided the readability is worth not aligning to spec (as long as we mention BS/BE in XML).

@abergs
Copy link
Collaborator

abergs commented Oct 2, 2023

@iamcarbon While this PR is accepted as is - It would be nice to change the name of AttestationVerificationSuccess to RegisteredPublicKeyCredential - it would make DX a bit better I think. Could you make that change in this PR and I'm ready for merging.

@abergs abergs mentioned this pull request Oct 2, 2023
@iamcarbon
Copy link
Contributor Author

@abergs All set.

@abergs abergs merged commit 15263ca into passwordless-lib:master Oct 3, 2023
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.

5 participants