-
Notifications
You must be signed in to change notification settings - Fork 212
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
task(auth): Remove recoveryPhoneAvailable customs check #18241
Conversation
d318576
to
f4c88dd
Compare
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.
@dschom Seems reasonble to me 👍🏽
@@ -227,8 +227,6 @@ class RecoveryPhoneHandler { | |||
throw AppError.invalidToken(); | |||
} | |||
|
|||
await this.customs.check(request, email, 'recoveryPhoneAvailable'); |
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.
If we want to add rate limiting for some authenticated endpoints, we could use checkAuthenticated api. This will only check the uid and not ip or email address record.
The rate limit is more generous though (100 checks every 15mins) per action.
format: 'nat', | ||
env: 'SMS_RATE_LIMIT_INTERVAL_SECONDS', | ||
}, | ||
maxSms: { | ||
doc: 'Number of sms sent within rateLimitIntervalSeconds before throttling', | ||
default: 3, | ||
default: 9, |
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.
I think we want to set this to 6
based on Slack conversation:
https://mozilla.slack.com/archives/C07T1GHL46S/p1736963075491979?thread_ts=1736960348.342549&cid=C07T1GHL46S
In theory there were notes to set the limit to 9/day for recovery phone setup, and 6/day for using the recovery phone during sign-in, but that might be overly complicated considering the current customs setup.
default: 9, | |
default: 6, |
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.
Ah gotcha, I didn't see the lower limit. I'll change the default.
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.
My comment about the the default sms limit is non-blocking considering we can discuss with the team and change the value with env var config later on.
…s rate limit defaults Because: - We deemed this check wasn't necessary. This Commit: - Removes the recoveryPhoneAvailable check. - Removes the action from customs. - Leaving isTwilioAction, however. We might need it later. - Changes default config to 9 sms per 24 hour period - Fixes remote test to be inline with updated customs rate limits
f4c88dd
to
e2fd3e0
Compare
Because
This pull request
Issue that this pull request solves
Closes: FXA-11006, FXA-11005
Checklist
Put an
x
in the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
We are leaving
isTwilioAction
and theTWILIO_ACTION
group set in customs. Pretty sure we will need it at some point soon, but with different actions.