LG-13003: Make sure we are checking all relevant Threatmetrix flags where necessary#10391
Conversation
…pending redirection is aware of tmx via fraud pending value
…ig values where necessary
n1zyy
left a comment
There was a problem hiding this comment.
I gave this a quick look and it seems correct, but I want to give it some more review (after our next meeting) before formally approving.
| end | ||
|
|
||
| def handle_fraud_rejection | ||
| return if in_person_prevent_fraud_redirection? |
There was a problem hiding this comment.
Talking through this some more just for posterity: the idea here is that in the case of fraud rejection, the question of whether to redirect them to the please-call page is irrelevant, because that's really for the pending state, not the rejection state.
There was a problem hiding this comment.
@n1zyy my thinking was incorrect at the time, see this slack thread. note that the changes I made are designed to handle the case where someone fails at the post office, and then is fraud rejected, which is super unlikely given that the user will not be shown the Please Call screen.
…at post office undoing previous change and adding in additional logic
| IdentityConfig.store.in_person_proofing_enforce_tmx && | ||
| current_user.ipp_enrollment_status_not_passed? | ||
| current_user.ipp_enrollment_status_not_passed? && | ||
| (fraud_review_pending? || fraud_rejection?) |
There was a problem hiding this comment.
Undoing previous change around fraud rejection. See this slack thread for justification
Checking for fraud_review_pending and fraud_rejection because this is called before both fraud redirection cases.
There was a problem hiding this comment.
Jack- can you explain again why the additional check ((fraud_review_pending? || fraud_rejection?)) is needed? I am thinking about the method that is calling this method and I am not sure about this. 🤔
Update: After getting on a call with Jack and others on Joy- we talked through this logic - ipp_enrollment_status_not_passed (When a user fails IPP- we let them try again. I mixed up the logic so this is okay. Here is the table that says okay https://docs.google.com/document/d/1Xvhz5xXQgQK7oYDlHYBkG-8-v6mY9yS9g_s-70Kzr1g/edit)
There was a problem hiding this comment.
I will add a comment above this method to help clarify what's going on here.
There was a problem hiding this comment.
@gina-yamada @n1zyy @KeithNava Comment added here
|
|
||
| def tmx_status | ||
| return nil unless IdentityConfig.store.in_person_proofing_enforce_tmx | ||
| return nil unless FeatureManagement.proofing_device_profiling_decisioning_enabled? |
There was a problem hiding this comment.
This has an impact on analytics, hence the change to the analytics spec.
| if in_person_verification_needed | ||
| if IdentityConfig.store.in_person_proofing_enforce_tmx | ||
| if IdentityConfig.store.in_person_proofing_enforce_tmx && | ||
| FeatureManagement.proofing_device_profiling_decisioning_enabled? |
There was a problem hiding this comment.
You might consider moving this into a new method in FeatureManagement--I believe the intention there is that when we have these kind of relationships between config flags we can encapsulate them in method in there. For example, you could do FeatureManagement.ipp_proofing_device_profiling_decisioning_enabled? (side note: I just filed a ticket to come up with a better name than "proofing_device_profiling" but for now that is what we have)
There was a problem hiding this comment.
@matthinz I think we have a bunch of these flags that could probably be moved in to that class. I think I'll open our own ticket for consolidating our features. Thanks!
|
i'm testing this out and so far for the 1st scenario I got the please call email and saw the screen without having to pass the enrollment in the rails console. So it appears having the tmx "review" status w/o updating the enrollment will show the screen. Edit to add: We tested this again together and looked at this particular enrollment. When this enrollment was created it was right before the 1/2 hr mark (which is the cadence at which the usps job is run) and it was passed by the job w/o having to update in the console. So this was a fluke not related to the pr. Might be useful to note time when enrollment is created as this may happen again with future testing. |
svalexander
left a comment
There was a problem hiding this comment.
everything is working as expected, LGTM
n1zyy
left a comment
There was a problem hiding this comment.
I tested this code "normally," and with the newly-considered flag disabled (causing us to ignore TMX), and in that case, the process is normal. I'm calling this good.
+1 to the idea we just discussed of adding a quick comment to the first section since it's dealing with kind of confusing logic, though.
…3-add-necessary-checks-for-tmx-enabled Merging in main
🎫 Ticket
Link to the relevant ticket:
LG-13003
🛠 Summary of changes
Added
FeatureManagement.proofing_device_profiling_decisioning_enabled?in a couple of places to verify that TMX is indeed enabled. Also did the same infraud_review_concernvia thefraud_review_pending?method which ultimately depends on this flag for setting it's value.📜 Testing Plan
Ultimately the behavior for TMX should not change. Make sure that you have
in_person_proofing_enforce_tmxset totrue.Complete local testing for Threatmetrix for a passed enrollment:
Complete local testing for Threatmetrix for a failed enrollment: