Skip to content

Commit 4c15e00

Browse files
authored
docs: Improve docs for HIBP settings; remove duplicated cms copies (#34116)
- Clarify effects of enabling each policy. - Document the thresholds and what policies they relate to. - Express thresholds as floating point numbers to better hint at them not being intended as integer values. - Change toggle use case from temporary to open_edx for login policies (as we're expecting to keep those toggles long term, as an optional feature). - Remove links to private Jira tickets. (openedx Jira is now gone, and these tickets are only present in 2U's private Atlassian instance.) - Import LMS HIBP settings into CMS (rather than duplicating them) but mark as unused.
1 parent 46c9b3a commit 4c15e00

File tree

2 files changed

+51
-62
lines changed

2 files changed

+51
-62
lines changed

cms/envs/common.py

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@
123123
AUTH_PASSWORD_VALIDATORS
124124
)
125125
from lms.envs.common import (
126+
# FIXME: The HIBP settings are only used in the LMS, but CMS unit tests fail
127+
# without them. Perhaps moving some code would allow us to remove these from
128+
# this file.
129+
ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY,
130+
ENABLE_AUTHN_LOGIN_NUDGE_HIBP_POLICY,
131+
ENABLE_AUTHN_REGISTER_HIBP_POLICY,
132+
ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY,
133+
HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD,
134+
HIBP_LOGIN_NUDGE_PASSWORD_FREQUENCY_THRESHOLD,
135+
HIBP_REGISTRATION_PASSWORD_FREQUENCY_THRESHOLD,
136+
126137
USE_EXTRACTED_WORD_CLOUD_BLOCK,
127138
USE_EXTRACTED_ANNOTATABLE_BLOCK,
128139
USE_EXTRACTED_POLL_QUESTION_BLOCK,
@@ -595,49 +606,6 @@
595606
COURSE_AUTHORING_MICROFRONTEND_URL = None
596607
DISCUSSIONS_MICROFRONTEND_URL = None
597608
DISCUSSIONS_MFE_FEEDBACK_URL = None
598-
# .. toggle_name: ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY
599-
# .. toggle_implementation: DjangoSetting
600-
# .. toggle_default: False
601-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
602-
# HIBP Policy.
603-
# .. toggle_use_cases: open_edx
604-
# .. toggle_creation_date: 2021-12-03
605-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-666
606-
ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY = False
607-
# .. toggle_name: ENABLE_AUTHN_REGISTER_HIBP_POLICY
608-
# .. toggle_implementation: DjangoSetting
609-
# .. toggle_default: False
610-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
611-
# HIBP Policy on Authn MFE's registration.
612-
# .. toggle_use_cases: open_edx
613-
# .. toggle_creation_date: 2022-03-25
614-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-669
615-
ENABLE_AUTHN_REGISTER_HIBP_POLICY = False
616-
HIBP_REGISTRATION_PASSWORD_FREQUENCY_THRESHOLD = 3
617-
618-
# .. toggle_name: ENABLE_AUTHN_LOGIN_NUDGE_HIBP_POLICY
619-
# .. toggle_implementation: DjangoSetting
620-
# .. toggle_default: False
621-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
622-
# on Authn MFE's login.
623-
# .. toggle_use_cases: temporary
624-
# .. toggle_creation_date: 2022-03-29
625-
# .. toggle_target_removal_date: None
626-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-668
627-
ENABLE_AUTHN_LOGIN_NUDGE_HIBP_POLICY = False
628-
HIBP_LOGIN_NUDGE_PASSWORD_FREQUENCY_THRESHOLD = 3
629-
630-
# .. toggle_name: ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY
631-
# .. toggle_implementation: DjangoSetting
632-
# .. toggle_default: False
633-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
634-
# on Authn MFE's login.
635-
# .. toggle_use_cases: temporary
636-
# .. toggle_creation_date: 2022-03-29
637-
# .. toggle_target_removal_date: None
638-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-667
639-
ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY = False
640-
HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD = 5
641609

642610
# .. toggle_name: ENABLE_DYNAMIC_REGISTRATION_FIELDS
643611
# .. toggle_implementation: DjangoSetting

lms/envs/common.py

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5060,49 +5060,70 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
50605060
# .. setting_default: None
50615061
# .. setting_description: Base URL of the exams dashboard micro-frontend for instructors.
50625062
EXAMS_DASHBOARD_MICROFRONTEND_URL = None
5063+
50635064
# .. toggle_name: ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY
50645065
# .. toggle_implementation: DjangoSetting
50655066
# .. toggle_default: False
5066-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
5067-
# HIBP Policy.
5067+
# .. toggle_description: When enabled, this toggle prevents the use of known-vulnerable passwords in
5068+
# the password reset flow.
5069+
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
50685070
# .. toggle_use_cases: open_edx
50695071
# .. toggle_creation_date: 2021-12-03
5070-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-666
50715072
ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY = False
5073+
50725074
# .. toggle_name: ENABLE_AUTHN_REGISTER_HIBP_POLICY
50735075
# .. toggle_implementation: DjangoSetting
50745076
# .. toggle_default: False
5075-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
5076-
# HIBP Policy on Authn MFE's registration.
5077+
# .. toggle_description: When enabled, this toggle prevents the use of known-vulnerable passwords in
5078+
# the registration flow if their frequency exceeds a threshold.
5079+
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
50775080
# .. toggle_use_cases: open_edx
50785081
# .. toggle_creation_date: 2022-03-25
5079-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-669
50805082
ENABLE_AUTHN_REGISTER_HIBP_POLICY = False
5081-
HIBP_REGISTRATION_PASSWORD_FREQUENCY_THRESHOLD = 3
5083+
# .. setting_name: HIBP_REGISTRATION_PASSWORD_FREQUENCY_THRESHOLD
5084+
# .. setting_default: 3.0
5085+
# .. setting_description: Log10 threshold in effect for ENABLE_AUTHN_REGISTER_HIBP_POLICY.
5086+
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
5087+
HIBP_REGISTRATION_PASSWORD_FREQUENCY_THRESHOLD = 3.0
50825088

50835089
# .. toggle_name: ENABLE_AUTHN_LOGIN_NUDGE_HIBP_POLICY
50845090
# .. toggle_implementation: DjangoSetting
50855091
# .. toggle_default: False
5086-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
5087-
# on Authn MFE's login.
5088-
# .. toggle_use_cases: temporary
5092+
# .. toggle_description: When enabled, the login flow detects vulnerable passwords
5093+
# and prompts users to change their password if their frequency exceeds a threshold.
5094+
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
5095+
# .. toggle_use_cases: open_edx
50895096
# .. toggle_creation_date: 2022-03-29
5090-
# .. toggle_target_removal_date: None
5091-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-668
50925097
ENABLE_AUTHN_LOGIN_NUDGE_HIBP_POLICY = False
5093-
HIBP_LOGIN_NUDGE_PASSWORD_FREQUENCY_THRESHOLD = 3
5098+
# .. setting_name: HIBP_LOGIN_NUDGE_PASSWORD_FREQUENCY_THRESHOLD
5099+
# .. setting_default: 3.0
5100+
# .. setting_description: Log10 threshold in effect for ENABLE_AUTHN_LOGIN_NUDGE_HIBP_POLICY.
5101+
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
5102+
HIBP_LOGIN_NUDGE_PASSWORD_FREQUENCY_THRESHOLD = 3.0
50945103

50955104
# .. toggle_name: ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY
50965105
# .. toggle_implementation: DjangoSetting
50975106
# .. toggle_default: False
5098-
# .. toggle_description: When enabled, this toggle activates the use of the password validation
5099-
# on Authn MFE's login.
5100-
# .. toggle_use_cases: temporary
5107+
# .. toggle_description: When enabled, this toggle prevents the use of known-vulnerable passwords in
5108+
# the login flow if their frequency exceeds a threshold. Passwords are assessed by calling the
5109+
# Pwned Passwords service using a k-anonymity method that does not expose the password. The
5110+
# service tells us whether the password has been seen in any data breaches, and if so, how
5111+
# often. This count is converted to a "frequency" by taking the logarithm base 10. The login flow
5112+
# can reject all vulnerable passwords, or only passwords with a frequency above a configured
5113+
# threshold. In existing deployments, the threshold should be set high and tightened
5114+
# gradually in order to avoid large spikes in password resets and support requests. For example,
5115+
# setting ``HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD`` to 5 would reject logins when the
5116+
# password has been seen 100,000 or more times in the Pwned Passwords dataset. The goal should be
5117+
# to gradually reduce this to 0, meaning even a single occurrence will cause a rejection. (The
5118+
# threshold can take any real-number value.)
5119+
# .. toggle_use_cases: open_edx
51015120
# .. toggle_creation_date: 2022-03-29
5102-
# .. toggle_target_removal_date: None
5103-
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-667
51045121
ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY = False
5105-
HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD = 5
5122+
# .. setting_name: HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD
5123+
# .. setting_default: 5.0
5124+
# .. setting_description: Log10 threshold in effect for ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY.
5125+
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
5126+
HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD = 5.0
51065127

51075128
# .. toggle_name: ENABLE_DYNAMIC_REGISTRATION_FIELDS
51085129
# .. toggle_implementation: DjangoSetting

0 commit comments

Comments
 (0)