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

Add CSP allowlisting for reCAPTCHA at sign in #11201

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Sep 5, 2024

🛠 Summary of changes

Adds necessary CSP exceptions to allow reCAPTCHA to be loaded when performed at sign-in.

📜 Testing Plan

You need to add configuration values for reCAPTCHA credentials, but they don't have to be valid.

In config/application.yml:

recaptcha_enterprise_api_key: 'test'
recaptcha_enterprise_project_id: 'test'
recaptcha_site_key: 'test'

Verify that the header values are present on the sign-in screen:

  1. Start make run
  2. In a terminal console: curl -I --silent http://localhost:3000 | grep content-security-policy
  3. Observe "google.com" and "gstatic.com" domains in the resulting header value

changelog: Upcoming Features, Fraud Prevention, Add CSP allowlisting for reCAPTCHA at sign in
@aduth aduth requested a review from a team September 5, 2024 11:30
@aduth aduth merged commit 3fc5783 into main Sep 5, 2024
2 checks passed
@aduth aduth deleted the aduth-sign-in-recaptcha-csp branch September 5, 2024 14:21
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