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 additional fields to AuthenticatorAttestationResponse #221

Closed
mitar opened this issue Feb 19, 2024 · 2 comments
Closed

Add additional fields to AuthenticatorAttestationResponse #221

mitar opened this issue Feb 19, 2024 · 2 comments
Labels
status/needs-triage Issues that need to be triaged. type/feature-request Feature Requests

Comments

@mitar
Copy link
Contributor

mitar commented Feb 19, 2024

Description

So AuthenticatorAttestationResponse struct contains only minimal fields which might be sent in JSON, but it looks the spec allows additional fields (which are just extracted from attestationOjbect):

To remove the need to parse CBOR at all in many cases, getAuthenticatorData() returns the authenticator data from attestationObject. The authenticator data contains other fields that are encoded in a binary format. However, helper functions are not provided to access them because Relying Parties already need to extract those fields when getting an assertion.

The issue I have is that I send AuthenticatorAttestationResponse over the wire in JSON from the client. And client adds those fields. But on the server I want to use JSON unmarshal with DisallowUnknownFields set (primarily to detect changes in API I should check and possibly adapt to). And this is then currently not possible.

So I wonder if struct should define those additional optional fields, but not use them/ignore them?

Use Case

No response

Documentation

No response

@mitar mitar added status/needs-triage Issues that need to be triaged. type/feature-request Feature Requests labels Feb 19, 2024
@james-d-elliott
Copy link
Member

We will add the specific fields mentioned, but will purposefully decline to officially support DisallowUnknownFields due to the extensible and evolving nature of the specification itself.

@mitar
Copy link
Contributor Author

mitar commented Apr 27, 2024

Thanks, this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/needs-triage Issues that need to be triaged. type/feature-request Feature Requests
Projects
None yet
Development

No branches or pull requests

2 participants