LG-16327 Update ssn logic ial2 match sp#12326
Conversation
There was a problem hiding this comment.
The initiating_service_provider_issuer is merely the service provider who initiated the identity verification. The current service provider may be different.
There was a problem hiding this comment.
I am now comparing the Profiles against the current session sp with a3e5ee0
7a680db to
a3e5ee0
Compare
|
I'm not seeing how this fixes the issue either. Say there are 2 service providers: SP1 and SP2. SP2 and SP3 are in I don't see a way to detect this without using |
There was a problem hiding this comment.
Can we use different service providers? The "inactive" in the name is misleading.
There was a problem hiding this comment.
This is the service provider generated by the factory with create(:profile, :facial_match_proof
https://github.com/18F/identity-idp/blob/main/spec/factories/profiles.rb#L105-L108
There was a problem hiding this comment.
Sorry, but that does not make it any better. It is wrong there as well.
That is an inactive service provider, which is used in tests like
There was a problem hiding this comment.
FYI, I am cleaning up the existing problem here - #12377.
There was a problem hiding this comment.
Thank you. I'm revising in my tests to avoid that as you requested.
|
Also, the merged PR appears to have modified See Cloudwatch query for loss of information. |
There was a problem hiding this comment.
Puts this method back to where it was before per
#12326 (comment)
There was a problem hiding this comment.
| Profile.joins(:sp_return_logs) | |
| .active | |
| .facial_match | |
| .where(ssn_signature: ssn_signatures) | |
| .where(sp_return_logs: { issuer: sp_eligible_for_one_account }) | |
| .where.not(user_id: user.id) | |
| .distinct | |
| Profile.joins("INNER JOIN identities ON identities.user_id = profiles.user_id") | |
| .active | |
| .facial_match | |
| .where(ssn_signature: ssn_signatures) | |
| .where(identities: { service_provider: sp_eligible_for_one_account }) | |
| .where(identities: { deleted_at: nil }) | |
| .where(identities: { ial: 2 }) | |
| .where.not(user_id: user.id) | |
| .distinct |
|
Slack question for Team https://gsa-tts.slack.com/archives/C05MGJ72GU9/p1752849537704709 |
0bb6bd8 to
a53be99
Compare
vrajmohan
left a comment
There was a problem hiding this comment.
I think we would be better served by ensuring that the tests map to the spreadsheet with the combinations that we have created.
There was a problem hiding this comment.
Sorry, but that does not make it any better. It is wrong there as well.
That is an inactive service provider, which is used in tests like
There was a problem hiding this comment.
Why do we need the session_uuid set?
There was a problem hiding this comment.
That's now removed from both _spec
There was a problem hiding this comment.
Why have the identities associated only in this context and not in the sibling contexts? In fact, having these be associated in the next context should demonstrate that the code is wrong because the test fails.
There was a problem hiding this comment.
Added more tests with 857818b
These cover the spreadsheet mockup users 1 - 4. Users 5 & 6 would not ever reach the duplicate_ssn_finder class because they would be eliminated at
User 5 is covered with this test
User 6 is covered with
yarn.lock
Outdated
There was a problem hiding this comment.
What JavaScript changes are we making to cause this?
There was a problem hiding this comment.
My local NPM must have done something strange. I'll revert that.
fa5db11 to
58cd50e
Compare
vrajmohan
left a comment
There was a problem hiding this comment.
I am sorry but we don't appear to be converging: This still does not address the fundamental issue of duplicates within the requesting service provider. This will be clear if the requesting service provider from the Reduced Version spreadsheet is SP2 instead of SP1. In that case, User 3 should not come up as a duplicate when requesting for User 1 or User 2.
There are several other issues as well:
- The test cases are not clear
- Unnecessary fixture setup of
session_uuid: SecureRandom.uuid - Repeated context in test of "describe '#associated_facial_match_profiles_with_ssn'".
- Test assertion of specific profile ids with no sort specified.
Sorry to do this, but I'm creating a separate PR that leverages some of this work and that hopefully addresses all these issues.
🎫 Ticket
Link to the relevant ticket:
LG-16327
🛠 Summary of changes
Ensure the restriction of duplicate SSN checks to only those IAL2 accounts that are associated with SP (Service Provider) connections that have opted into the upcoming OneAccount functionality.
Builds upon previous #12296