Skip to content

Conversation

@iinuwa
Copy link
Member

@iinuwa iinuwa commented Feb 7, 2026

This improves

  • Adds an explicit AppID type
  • Make Origin an enum of either HTTPS or AppId
  • Rename RequestEnvironment to NavigationContext
  • Requires AppId requests to set an RP ID explicitly.

RequestEnvironment/NavigationContext mixed the concepts of origin type (HTTPS/AppId) and same/cross-origin context. These two concepts are now split into Origin and NavigationContext more clearly.

Copy link
Collaborator

@msirringhaus msirringhaus left a comment

Choose a reason for hiding this comment

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

Some small comments

)
.map_err(|e| {
if let WebAuthnError::TypeError = e {
tracing::error!("Could not parse passkey creation request. Rejecting request.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this is only copy&paste from what was before, but I find this logging a bit weird. We are rejecting the request for all other errors as well, don't we?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, we are. Are you saying that it's weird that we're not consistent, or specifically that it's weird that we're including "Rejecting request." here?

I think that it's useful for admins to know from the logs both what caused the error, and what action was taken. I usually try to put that on the same line if possible, so it's easy to find in the logs. But I do notice that we're not consistent in this method, nor is this method responsible for the decision to reject the request or not. I'd be fine with removing "Rejecting request" here and pushing that up into the higher-level method that actually returns the error back to D-Bus.

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 just wondering why we print a tracing for TypeError only, and not for all other errors. We tell the admin that we are rejecting the request for one specific error only, but silently (?) reject it in all other cases.

if let WebAuthnError::TypeError = e {
tracing::error!("Could not parse passkey creation request. Rejecting request.");
}
e
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, very much nit picking but: I hate single letter variables :D Can we name this err instead?

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