Skip to content

LG-8985 Make "Pass" the default option for mock device profiling result#7892

Merged
jmhooper merged 1 commit intomainfrom
jmhooper-tmx-no-result
Feb 27, 2023
Merged

LG-8985 Make "Pass" the default option for mock device profiling result#7892
jmhooper merged 1 commit intomainfrom
jmhooper-tmx-no-result

Conversation

@jmhooper
Copy link
Contributor

The mock device profiler simulates a tool that assesses device risk. This is specifically meant to simulate the way ThreatMetrix works in deployed environments in local development and sandbox environments.

In deployed environments javascript is added to the page to assess device risk. This javascript phones home to ThreatMetrix. When the user is submitting their information we make a request on the backend to ThreatMetrix for the result.

The ThreatMetrix javascript may be blocked by the client. In this case the backed result will contain a warning code with the value smmry_unkwx_session. The review_status field, which is ultimately what is used to determine whether the user is allowed to proof without further review, will have a value of pass, review, or reject depending on the configuration for this case.

We simulate this behavior by loading javascript that displays a dropdown that allows the user to select the result that will come from assessing their device. This value is saved and returned on a mocked backend request. To simulate the behavior when the Javascript is blocked we have a No Result option which results in the mocked result being null.

At one point we assumed that when a user's client blocks the javascript the result from ThreatMetrix would be null. This, however, is not the case. ThreatMetrix can still make a determination about the session if the Javascript is blocked. Receiving a value of null from Threatmetrix is an invalid state and should be considered an error state.

The "No Result" case, which should be an error state, is the default state in local dev and test environments. This means that people going through proofing fail by default for unclear reasons. This commit makes the default Pass so this no longer happens.

The mock device profiler simulates a tool that assesses device risk. This is specfically meant to simulate the way ThreatMetrix works in deployed envrionments in local development and sandbox environments.

In deployed environments javascript is added to the page to assess device risk. This javascript phones home to ThreatMetrix. When the user is submitting their information we make a request on the backend to ThreatMetrix for the result.

The ThreatMetrix javascript may be blocked by the client. In this case the backed result will contain a warning code with the value `smmry_unkwx_session`. The `review_status` field, which is ultimately what is used to determine whether the user is allowed to proof without further review, will have a value of `pass`, `review`, or `reject` depending on the configuration for this case.

We simiulate this behavior by loading javascript that displays a dropdown that allows the user to select the result that will come from assessing their device. This value is saved and returned on a mocked backend request. To similuate the behavior when the Javascript is blocked we have a `No Result` option which results in the mocked result being null.

At one point we assumed that when a user's client blocks the javascript the result from ThreatMetrix would be null. This, however, is not the case. ThreatMetrix can still make a determination about the session if the Javascript is blocked. Receiving a value of `null` from Threatmetrix is an invalid state and should be considered an error state.

The "No Result" case, which should be an error state, is the default state in local dev and test environments. This means that people going through proofing fail by default for unclear reasons. This commit makes the default `Pass` so this no longer happens.

changelog: Improvements, Device profiling, The mock device profiler default state was set to "Pass" so that in envrionments where the mock device profiler is enable the mock device profiler will not cause users to fail by default.
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, do we also want to make that the ruby default for the when there is no key in redis?

@matthinz
Copy link
Contributor

Yeah, I agree this is a better default. Is it possible to end up with a nil Threatmetrix result on the proofing component if the Session Query API call times out or fails in some way (e.g. 5xx)?

@jmhooper
Copy link
Contributor Author

LGTM, do we also want to make that the ruby default for the when there is no key in redis?

Right now we have 2 different ways of handling nil results. The review controller considers it a fail and the GPO controller considers it a pass. How we should handle them is kind of an open question. I'm going to through together a ticket to propose that a nil result be considered a pass. I think that is out of scope of this PR.

Yeah, I agree this is a better default. Is it possible to end up with a nil Threatmetrix result on the proofing component if the Session Query API call times out or fails in some way (e.g. 5xx)?

That is an interesting question. For the 500 case it does look like we return a nil result. We do that in a few other cases. That is something I'll propose tightening up in the story I mentioned in my response to Zach's question above.

@jmhooper jmhooper merged commit cd54499 into main Feb 27, 2023
@jmhooper jmhooper deleted the jmhooper-tmx-no-result branch February 27, 2023 18:21
jmhooper added a commit that referenced this pull request Mar 6, 2023
…ling drop

In #7892 we made "Pass" the default option for the simulated device profiling tooling. Unfortunately the javascript there does not submit anything unless the user actually selects a value from the dropdown. This made sense in the world where "No Result" was the default. With pass as the default it causes the user to fail downstream.

This commit makes 'pass' the default value if 'nil' is submitted. Nil will still be used as the TMx review status value if "no_result" is submitted.

changelog: Improvements, Mock Device Profiling, The mock device profiling backend was changed to accept nil as a valid value in the cases where a user does not make a selection from the mock device profiling simulation javascript on the SSN step in the proofing flow.
jmhooper added a commit that referenced this pull request Mar 6, 2023
…ling drop (#7934)

In #7892 we made "Pass" the default option for the simulated device profiling tooling. Unfortunately the javascript there does not submit anything unless the user actually selects a value from the dropdown. This made sense in the world where "No Result" was the default. With pass as the default it causes the user to fail downstream.

This commit makes 'pass' the default value if 'nil' is submitted. Nil will still be used as the TMx review status value if "no_result" is submitted.

changelog: Improvements, Mock Device Profiling, The mock device profiling backend was changed to accept nil as a valid value in the cases where a user does not make a selection from the mock device profiling simulation javascript on the SSN step in the proofing flow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants