Skip to content

LG-14725: Identity resolution via Socure#11523

Merged
matthinz merged 12 commits intomainfrom
matthinz/14725-socure-prog-proofer-v2
Nov 22, 2024
Merged

LG-14725: Identity resolution via Socure#11523
matthinz merged 12 commits intomainfrom
matthinz/14725-socure-prog-proofer-v2

Conversation

@matthinz
Copy link
Contributor

@matthinz matthinz commented Nov 18, 2024

(This is a do-over of #11479, with the proofer_mock_fallback stuff taken out. It's based on #11516, which will need to land first.)

🎫 Ticket

Link to the relevant ticket:
LG-14725

🛠 Summary of changes

This PR adds provisional support for using Socure KYC for identity resolution. To do this, it:

  1. Genericizes references to InstantVerify in the ProgressiveProofer (for example, instant_verify_state_id_address_result becomes state_id_address_result)
  2. Reworks the plugins introduced in ProgressiveProofer refactor 3/N: Instant Verify residential address #11433 and ProgressiveProofer refactor 4/N: InstantVerify state id address #11434 to accept vendor-specific data (Proofer + SP cost token) via their initializers
  3. Adds idv_resolution_alternate_vendor and idv_resolution_alternate_vendor_percent settings to configure what % of transactions go to Socure.
  4. Adds appropriate if proofing_vendor == :socure_kyc-type code to create the correct proofer based on the configured vendor

New configuration flags

This PR adds two new config flags:

Config Default value
idv_resolution_alternate_vendor none
idv_resolution_alternate_vendor_percent 0

idv_resolution_alternate_vendor can be set to one of:

  • mock
  • instant_verify
  • socure_kyc

If idv_resolution_alternate_vendor_percent is greater than zero, then that percentage of resolutions will use the alternate vendor. Note that whichever vendor is selected is used for both state ID and residential address transactions associated with a single run of the ResolutionProofingJobs--subsequent jobs will flip the coin again.

📜 Testing Plan

First, configure Socure in your application.yml:

socure_idplus_api_key: '<KEY FROM THE SOCURE DASHBOARD>'
socure_idplus_base_url: 'https://sandbox.socure.us'

Next, send all of your resolutions to Socure:

# 100% to socure
idv_resolution_default_vendor: mock
idv_resolution_alternate_vendor: socure_kyc
idv_resolution_alternate_vendor_percent: 100

Now, run through IdV. Check your log/events.log file and verify that your most recent IdV: doc auth verify proofing results event uses the vendor socure_kyc.

Now, send all your resolutions to the mock proofer:

# 100% to mock
idv_resolution_default_vendor: mock
idv_resolution_alternate_vendor: socure_kyc
idv_resolution_alternate_vendor_percent: 0

Run through IdV and verify that your most recent IdV: doc auth verify proofing results event uses the vendor mock.

@matthinz matthinz requested a review from a team November 18, 2024 22:58
Copy link
Contributor

Choose a reason for hiding this comment

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

🐶

@n1zyy
Copy link
Contributor

n1zyy commented Nov 19, 2024

I approved this but didn't look at the test results. It seems one of them possibly went into an infinite loop? 😱

Remove support for the proofer_mock_fallback setting when creating resolution proofers.

[skip changelog]
Tell it to use the Instant Verify proofer for its tests.
@matthinz matthinz force-pushed the matthinz/config-for-resolution-proofer-cleanup branch from da282e7 to 5d0de74 Compare November 19, 2024 19:53
@matthinz matthinz force-pushed the matthinz/14725-socure-prog-proofer-v2 branch from b52398c to 5242f29 Compare November 19, 2024 20:16
If an exception happens earlier in the job, then document_capture_session can be nil here. Previously this would raise a NoMethodError, obscuring the root cause.
More generic, now state_address_resolution_result
Go with more generic residential_address_resolution_result
There were some autoloading issues in cases where calling code wants access to the Error class but does not load the Request class first
In practice, applicant will have extra fields like `state_id_jurisdiction`, `state_id_number`, etc.
Update the ProgressiveProofer to be able to use Socure KYC.

changelog: Upcoming Features, Identity verification, Support Socure for identity resolution.
@matthinz matthinz force-pushed the matthinz/14725-socure-prog-proofer-v2 branch from 5242f29 to d5eb021 Compare November 19, 2024 23:18
Copy link
Contributor

@lmgeorge lmgeorge left a comment

Choose a reason for hiding this comment

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

Overall, looks suspiciously familiar and good!

Base automatically changed from matthinz/config-for-resolution-proofer-cleanup to main November 22, 2024 00:48
@matthinz matthinz merged commit 570d0c1 into main Nov 22, 2024
@matthinz matthinz deleted the matthinz/14725-socure-prog-proofer-v2 branch November 22, 2024 20:39
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.

4 participants