-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(beginLogin): custom challenge take effect #289
base: master
Are you sure you want to change the base?
fix(beginLogin): custom challenge take effect #289
Conversation
WalkthroughThe changes involve modifications to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- webauthn/login.go (1 hunks)
- webauthn/login_test.go (1 hunks)
Additional comments not posted (2)
webauthn/login_test.go (1)
112-177
: LGTM!The new test function
TestCustomerChallenge
is well-structured and comprehensive. It covers both customer and non-customer challenge scenarios, and validates the expected outcomes. The test cases are clearly defined using a struct, making it easy to understand and maintain. The test follows the best practices of table-driven testing in Go.webauthn/login.go (1)
93-93
: LGTM!The change to populate the
Challenge
field of theSessionData
struct usingassertion.Response.Challenge.String()
instead ofchallenge.String()
is a good refinement. It suggests a more direct integration with the response from an authentication assertion, potentially enhancing the accuracy or relevance of the challenge used in the login process. The overall structure and flow of the function remain intact, but the logic for setting theChallenge
has been refined to align with the assertion response.
What's the use case for setting a custom challenge? |
For enhancement passkey signature ability, for example, my biz logic data could be signed by passkey if I wrap it into custom challenge |
Is there any related specification documentation or is this purely a custom out of scope implementation? Usually the authenticator is signing the challenge, not the RP. What verification process exists on the authenticator to verify the signature? |
I dont' think there is any related specification documents. For my case, In RP, I can specify a signature alg like "-7", and I have the publice key, so the RP could verification if the signature available. If the signature is calculated from some custom data, I can post custom data with signature to other servers without cheated |
Customer Challenge in LoginOption won't take effect due to
session
ignore this field