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

feat: support multiple origins in webauthn config #3380

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

hperl
Copy link
Contributor

@hperl hperl commented Jul 17, 2023

Related issue(s)

ory/docs#1474

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@hperl hperl requested a review from Benehiko July 17, 2023 08:57
@hperl hperl self-assigned this Jul 17, 2023
@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch from 0e268fa to 4c36858 Compare July 17, 2023 09:32
Copy link
Contributor

@Benehiko Benehiko left a comment

Choose a reason for hiding this comment

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

Looks good, how will this affect current Webauthn credentials?

selfservice/flow/recovery/handler.go Outdated Show resolved Hide resolved
driver/config/config.go Outdated Show resolved Hide resolved
@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch from 4c36858 to fd90a5d Compare July 21, 2023 11:49
@hperl hperl requested review from aeneasr and Benehiko July 21, 2023 11:59
@hperl
Copy link
Contributor Author

hperl commented Jul 21, 2023

That took longer than expected, because the webauthn library silently broke contract by switching the encoding from base64 to base64urlencoded.

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #3380 (7d4b36b) into master (e3fcf0c) will increase coverage by 0.01%.
Report is 3 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 7d4b36b differs from pull request most recent head d8defe5. Consider uploading reports for the commit d8defe5 to get more accurate results

@@            Coverage Diff             @@
##           master    #3380      +/-   ##
==========================================
+ Coverage   78.02%   78.03%   +0.01%     
==========================================
  Files         327      327              
  Lines       21364    21368       +4     
==========================================
+ Hits        16669    16675       +6     
+ Misses       3457     3456       -1     
+ Partials     1238     1237       -1     
Files Changed Coverage Δ
identity/credentials_webauthn.go 100.00% <ø> (ø)
selfservice/strategy/webauthn/login.go 62.50% <ø> (ø)
selfservice/strategy/webauthn/registration.go 64.94% <ø> (ø)
driver/config/config.go 82.60% <100.00%> (+0.09%) ⬆️
selfservice/strategy/webauthn/settings.go 65.26% <100.00%> (ø)
selfservice/strategy/webauthn/user.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch from fd90a5d to 380a03b Compare July 21, 2023 12:36
Benehiko
Benehiko previously approved these changes Jul 21, 2023
Copy link
Contributor

@Benehiko Benehiko left a comment

Choose a reason for hiding this comment

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

LGTM

@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch 2 times, most recently from f6ef345 to 592676b Compare July 25, 2023 07:12
@hperl
Copy link
Contributor Author

hperl commented Jul 25, 2023

Docs PR: ory/docs#1474

aeneasr
aeneasr previously approved these changes Jul 27, 2023
driver/config/config.go Outdated Show resolved Hide resolved
@hperl hperl dismissed stale reviews from aeneasr and Benehiko via f7a47f0 July 28, 2023 08:17
@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch 2 times, most recently from f7a47f0 to c0a5a0c Compare July 28, 2023 08:18
@hperl hperl enabled auto-merge (squash) July 28, 2023 08:18
driver/config/config.go Show resolved Hide resolved
@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch from c0a5a0c to 647fb49 Compare July 28, 2023 09:25
driver/config/config_test.go Show resolved Hide resolved
driver/config/config.go Outdated Show resolved Hide resolved
Users can now supply a list of origins for webauthn in the configuration.
@hperl hperl force-pushed the hperl/webauthn-multiple-origins branch from 647fb49 to d8defe5 Compare July 28, 2023 10:04
@hperl hperl merged commit 013f335 into master Jul 31, 2023
26 checks passed
@hperl hperl deleted the hperl/webauthn-multiple-origins branch July 31, 2023 14:09
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