Clean up / refactor ThreatMetrix configuration#7582
Merged
Conversation
matthinz
commented
Jan 5, 2023
Contributor
Author
There was a problem hiding this comment.
Minor update here: Check that the profile is deactivated due to threatmetrix rather than re-evaluating the threatmetrix_review_status
zachmargolis
reviewed
Jan 5, 2023
lib/identity_config.rb
Outdated
Contributor
There was a problem hiding this comment.
adding :collect_only is a great use of an enum!
373f8aa to
f47ffb5
Compare
c20c94e to
db803cb
Compare
- Move logic around "should this be enabled?" into FeatureManagement - Add logic to automatically enable the ThreatMetrix mock in lower environments changelog: Internal, ThreatMetrix, Simplify ThreatMetrix config flags.
Profile should've been deactivated by this point, so don't look at ProofingComponent.
Checking domain is kind of smelly. We can approximate this by setting good defaults.
The ThreatMetrix mock does not use org ID. It feels needlessly complex to check for it (it should _always_ be configured when TM is enabled for real)
db803cb to
f7f059a
Compare
theabrad
approved these changes
Jan 12, 2023
| kantara_2fa_phone_restricted: false | ||
| kantara_2fa_phone_existing_user_restriction: false | ||
| kantara_restriction_enforcement_date: '2022-07-19' | ||
| lexisnexis_threatmetrix_mock_enabled: false |
Contributor
There was a problem hiding this comment.
duplicate. line 176 already has mock_enabled: true
Contributor
Author
There was a problem hiding this comment.
Yeah, the goal here is to enable it locally by default but disable it by default in production
jmhooper
approved these changes
Jan 13, 2023
Merged
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.
🎫 Ticket
LG-8512
🛠 Summary of changes
TLDR: There will be 2 settings to control whether/how ThreatMetrix is enabled. The ThreatMetrix mock will now be enabled by default locally
This PR removes references to the following config flags:
lexisnexis_threatmetrix_enabledlexisnexis_threatmetrix_required_to_verifyproofing_device_profiling_collecting_enabledIt then adds a new config flag,
proofing_device_profilingto be used to control how "on" ThreatMetrix is. Valid values are:disabledcollect_onlyProofingComponent. Profiles are never deactivated due to ThreatMetrix status.enabledProofingComponent, and will deactivate the profile if the review status is not"pass".Additionally, this PR now enables the ThreatMetrix mock implementation (via the
lexisnexis_threatmetrix_mock_enabledflag) indevelopmentandtestenvironments.To allow for migration, this PR allows the old config flags to continue existing, but be overridden by the new flag. #7639 fully removes the old config flags.
📜 Testing Plan
(This plan is provided as sets of config flags for your
application.ymland what you should see after running through identity verification with them applied.)Verify that old flags are still respected for now:
You should see:
Verify that new flag overrides old flags:
You should see:
Verify that new flag works for collection and that ThreatMetrix mock enabled by default:
You should see:
Verify that new flag works for collection & decisioning and that mock enabled by default:
You should see:
Verify that new flag works for collection & decisioning and that mock can be disabled:
You should see (assuming you don't have additional variables set to configure ThreatMetrix API access):
events.log(since it's not properly configured, but mock was disabled)