Skip to content

Address PR #9175 review comments - #4

Merged
emlun merged 15 commits into
webauthnfrom
webauthn-review
Aug 11, 2024
Merged

emlun merged 15 commits into
webauthnfrom
webauthn-review

Conversation

@rasa

rasa commented Aug 10, 2024

Copy link
Copy Markdown

@emlun Once this is merged in, I'll retest.

Comment thread lib/api/api.go Resolved
Comment thread lib/api/api.go Resolved
Comment thread lib/api/api_auth_webauthn.go Resolved

@imsodin imsodin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry, I started nitting again. Overall looks good. There is one relevant comment about config changes again.

emlun added 6 commits August 11, 2024 04:20
This solves 2 problems: no need to reload the name on config changes, because
the device ID should rarely or never change; and consequently we don't get
credentials with a stale RP display name, as there's no way in WebAuthn L2 to
signal to the authenticator that the RP display name (if stored) should be
updated.
@emlun

emlun commented Aug 11, 2024

Copy link
Copy Markdown
Owner Author

No need to apologize, I really appreciate the comments!

Last night I added a few changes to also address the discussion on the default-reflection in newWebauthnEngine:

I considered doing this "globally" in mocks.Wrapper.GUIReturns(), and spent an hour or two troubleshooting under the faulty assumption that structutil.SetDefaults would set only the properties with a zero value. Turns out it unconditionally overwrites all properties that have a default value tag, which broke pretty much all of the tests in various surprising ways when I applied it that broadly (for example, all those tests competed for port 8384, which de-parallelized most of the test suite so everything timed out). Given that experience, I decided that it's probably better to be explicit about applying these defaults at the construction site than having it happen magically in some hidden shared utility.

@imsodin Would you like to re-review these changes here or shall I just merge them into syncthing#9175?

@imsodin

imsodin commented Aug 11, 2024

Copy link
Copy Markdown

Lets merge - there are now also a lot of changes here, so the benefit of being small is no longer there and the "change-indirection" adds quite a bit of cognitive load for me :)

@emlun
emlun merged commit 229a304 into webauthn Aug 11, 2024
@emlun
emlun deleted the webauthn-review branch August 11, 2024 19:08
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