Update the keys for Recaptcha on amo

RESOLVED FIXED

Status

Cloud Services
Operations: AMO
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: scolville, Assigned: jason)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Having landed https://github.com/mozilla/olympia/pull/1432 which moves use to using recaptcha version 2 the keys for recaptcha need to be updated.

See https://github.com/mozilla/olympia/blob/master/sites/prod/settings.py#L129 as an example.

To add the new keys in advance of the new recaptcha code hitting stage/prod is possible because the settings are different between the old and new libs.

If this is preferred we can just change this:

NOBOT_RECAPTCHA_PUBLIC_KEY = env('RECAPTCHA_PUBLIC_KEY')
NOBOT_RECAPTCHA_PRIVATE_KEY = env('RECAPTCHA_PRIVATE_KEY')

to 

# Old recaptcha V1
RECAPTCHA_PUBLIC_KEY = env('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = env('RECAPTCHA_PRIVATE_KEY')
# New Recaptcha V2
NOBOT_RECAPTCHA_PUBLIC_KEY = env('NOBOT_RECAPTCHA_PUBLIC_KEY')
NOBOT_RECAPTCHA_PRIVATE_KEY = env('NOBOT_RECAPTCHA_PRIVATE_KEY')


The keys will need updating for -dev, stage and prod as that code is released in each case.

This is the link for generating new keys:

https://www.google.com/recaptcha/admin

Testing the keys is a case of hitting /en-US/firefox/users/register

Currently -dev is broken and shows: "ERROR: Invalid domain for site key". Once the new keys are added this should be resolved.
(Assignee)

Updated

2 years ago
Assignee: nobody → jthomas
(Assignee)

Comment 1

2 years ago
As per our IRC conversation let's maintain both settings until after we have pushed to prod. I've generated new keys for -dev, stage and prod using my mozilla account, but I think it is now linked to my specific account, which is not good. I'll ask around to see how we manage key generation today for other properties. 

https://github.com/mozilla-services/puppet-config/pull/1737
https://github.com/mozilla/olympia/pull/1473
(Assignee)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.