-
-
Notifications
You must be signed in to change notification settings - Fork 185
conformance 1.7.20 4 #531
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
Merged
Merged
conformance 1.7.20 4 #531
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ecf0e1f
FIDO Conformance Tools v1.7.15 fixes
d3efd7d
Json serialization fix
de20e66
Unit test fix
46d291e
tokenbindig, AppId, UVP
googyi 2045075
unit test fix (tokenbinding dto parsing)
googyi 49a795c
fix azure pipeline
googyi f8f019d
Improve trustanchor test coverage
googyi a3d8bd0
TestPackedttestationAsyncFailTrustAnchorOnRootCertInTrustPath only wo…
googyi 6d968c2
Do not make this private
abergs 03b3069
Keep Tokenbinding around
abergs da092ba
Update AuthenticatorAssertionResponse.cs
abergs c840c77
Added XML comments to requestTokenBinding
abergs 9b04ce1
Added comment about UVM
abergs f7e6e70
Simplify UVP
abergs 11121e6
format
abergs 8a65ee0
Reverting some changes (#554)
abergs 5aa4881
Ignores Demo/Conformance
abergs dfa6f72
Refactored away from bool to enum.
abergs ee95bd4
File based namespace
abergs 97762f6
format
abergs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,3 +334,5 @@ ASALocalRun/ | |
/Test/coverage.netcoreapp3.1.cobertura.xml | ||
.DS_Store | ||
/testEnvironments.json | ||
|
||
Demo/Conformance/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public enum FidoValidationMode | ||
{ | ||
WebAuthNLevel3, | ||
FidoConformance2024, | ||
Default = WebAuthNLevel3 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Text.Json.Serialization; | ||
namespace Fido2NetLib; | ||
|
||
public class TokenBindingDto | ||
{ | ||
/// <summary> | ||
/// Either "present" or "supported". https://www.w3.org/TR/webauthn/#enumdef-tokenbindingstatus | ||
/// supported: Indicates the client supports token binding, but it was not negotiated when communicating with the Relying Party. | ||
/// present: Indicates token binding was used when communicating with the Relying Party. In this case, the id member MUST be present | ||
/// </summary> | ||
[JsonPropertyName("status")] | ||
public string? Status { get; set; } | ||
|
||
/// <summary> | ||
/// This member MUST be present if status is present, and MUST a base64url encoding of the Token Binding ID that was used when communicating with the Relying Party. | ||
/// </summary> | ||
[JsonPropertyName("id")] | ||
public string? Id { get; set; } | ||
|
||
public void Verify(byte[]? requestTokenbinding) | ||
{ | ||
// validation by the FIDO conformance tool (more than spec says) | ||
switch (Status) | ||
{ | ||
case "present": | ||
if (string.IsNullOrEmpty(Id)) | ||
throw new Fido2VerificationException("TokenBinding status was present but Id is missing"); | ||
var b64 = Base64Url.Encode(requestTokenbinding); | ||
if (Id != b64) | ||
throw new Fido2VerificationException("Tokenbinding Id does not match"); | ||
break; | ||
case "supported": | ||
case "not-supported": | ||
break; | ||
default: | ||
throw new Fido2VerificationException("Malformed tokenbinding status field"); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.