LG-14711: Enable reCAPTCHA in log-only mode#11349
Merged
Conversation
51e6709 to
63b616a
Compare
Contributor
|
Can you add the pull request template content, particularly testing instructions? |
2528389 to
dcfec2c
Compare
aduth
approved these changes
Oct 17, 2024
Contributor
There was a problem hiding this comment.
Was curious if we could bake the log-only consideration into valid_captcha_result?, but I see that it's valuable to include the raw result in the logging value below for valid_captcha_result. Nice separation 👍
9acfad4 to
a769f30
Compare
bb21bc5 to
7fc1ed7
Compare
aduth
approved these changes
Oct 21, 2024
changelog: Upcoming Features, reCAPTCHA, Enable reCAPTCHA in log-only mode Co-authored-by: Andrew Duthie <1779930+aduth@users.noreply.github.com>
7fc1ed7 to
44e74de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changelog: Upcoming Features, reCAPTCHA, Enable reCAPTCHA in log-only mode
🎫 Ticket
Link to the relevant ticket:
LG-14711
🛠 Summary of changes
sign_in_recaptcha_log_failures_onlythat is by defaultfalsein all environments.sign_in_recaptcha_log_failures_onlyis set totrue.📜 Testing Plan
Set up an environment with the following config settings:
recaptcha_mock_validator: true
sign_in_recaptcha_log_failures_only: false
sign_in_recaptcha_percent_tested: 100
sign_in_recaptcha_score_threshold: 0.3
Go to http://localhost:3000/ in an Incognito/Private Browsing window
Sign in while setting reCAPTCHA to fail, e.g. a value of say 0.2
Observe that you are shown a page with "Security check failed" as shown in the screenshot below
Set sign_in_recaptcha_log_failures_only to
trueand restart the applicationGo to http://localhost:3000/ in an Incognito/Private Browsing window
Sign in while setting reCAPTCHA to fail, e.g. a value of say 0.2
Observe that you are not shown a page with "Security check failed". Instead you are taken to the next step of authentication.
If you examine the events log, you should see an event named "Email and Password Authentication" with event_properties of
{"success":true,"valid_captcha_result":false}- the authentication is successful even though the captcha test failed.👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.