-
Notifications
You must be signed in to change notification settings - Fork 166
Add a flag to not allow a strict IAL2 user to redirect without phone proofing #6270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
91e25c3
Add a flag to not allow a strict IAL2 user to redirect without phone …
jmhooper 378d204
whoops
jmhooper 74a60f0
re-arrange and rename things
jmhooper 88235c2
enable break everything mode
jmhooper 0b0d50d
implement pending spec
jmhooper 4e83248
one last test
jmhooper 3777c67
grumble grumble
jmhooper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,6 +90,13 @@ def includes_phone_check? | |
| proofing_components['address_check'] == 'lexis_nexis_address' | ||
| end | ||
|
|
||
| def strict_ial2_proofed? | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to get |
||
| return false unless active | ||
| return false unless includes_liveness_check? | ||
| return true if IdentityConfig.store.usps_upload_allowed_for_strict_ial2 | ||
| includes_phone_check? | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def personal_key_generator | ||
|
|
||
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
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
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
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| require 'rails_helper' | ||
|
|
||
| describe 'Strict IAL2 feature flag' do | ||
| include IdvHelper | ||
| include OidcAuthHelper | ||
|
|
||
| scenario 'returns an error if liveness checking is disabled' do | ||
| allow(IdentityConfig.store).to receive(:liveness_checking_enabled).and_return(false) | ||
|
|
||
| visit_idp_from_oidc_sp_with_ial2_strict | ||
|
|
||
| expect(current_url).to start_with( | ||
| 'http://localhost:7654/auth/result?error=invalid_request'\ | ||
| '&error_description=Acr+values+Liveness+checking+is+disabled', | ||
| ) | ||
| end | ||
| end |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| require 'rails_helper' | ||
|
|
||
| feature 'Strict IAL2 upgrade' do | ||
| include IdvHelper | ||
| include OidcAuthHelper | ||
| include SamlAuthHelper | ||
| include DocAuthHelper | ||
|
|
||
| before { allow(IdentityConfig.store).to receive(:liveness_checking_enabled).and_return(true) } | ||
|
|
||
| scenario 'an IAL2 strict request for a user with no liveness triggers an upgrade' do | ||
| user = create( | ||
| :profile, :active, :verified, | ||
| pii: { first_name: 'John', ssn: '111223333' } | ||
| ).user | ||
| visit_idp_from_oidc_sp_with_ial2_strict | ||
| sign_in_user(user) | ||
| fill_in_code_with_last_phone_otp | ||
| click_submit_default | ||
| click_agree_and_continue_optional | ||
|
|
||
| expect(page.current_path).to eq(idv_doc_auth_welcome_step) | ||
|
|
||
| complete_all_doc_auth_steps | ||
| click_continue | ||
| fill_in 'Password', with: user.password | ||
| click_continue | ||
| click_acknowledge_personal_key | ||
| click_agree_and_continue | ||
|
|
||
| expect(current_url).to start_with('http://localhost:7654/auth/result') | ||
| expect(user.active_profile.strict_ial2_proofed?).to be_truthy | ||
| end | ||
|
|
||
| context 'strict IAL2 does not allow a phone check' do | ||
| before do | ||
| allow(IdentityConfig.store).to receive( | ||
| :usps_upload_allowed_for_strict_ial2, | ||
| ).and_return(false) | ||
| end | ||
|
|
||
| scenario 'an IAL2 strict request for a user without a phone check triggers an upgrade' do | ||
| user = create( | ||
| :profile, :active, :verified, | ||
| pii: { first_name: 'John', ssn: '111223333' }, | ||
| proofing_components: { liveness_check: :acuant, address_check: :gpo_letter } | ||
| ).user | ||
| visit_idp_from_oidc_sp_with_ial2_strict | ||
| sign_in_user(user) | ||
| fill_in_code_with_last_phone_otp | ||
| click_submit_default | ||
| click_agree_and_continue_optional | ||
|
|
||
| expect(page.current_path).to eq(idv_doc_auth_welcome_step) | ||
|
|
||
| complete_all_doc_auth_steps | ||
| click_continue | ||
| fill_in 'Password', with: user.password | ||
| click_continue | ||
| click_acknowledge_personal_key | ||
| click_agree_and_continue | ||
|
|
||
| expect(current_url).to start_with('http://localhost:7654/auth/result') | ||
| expect(user.active_profile.strict_ial2_proofed?).to be_truthy | ||
| end | ||
|
|
||
| scenario 'an IAL2 strict request for a user with a phone check does not trigger an upgrade' do | ||
| user = create( | ||
| :profile, :active, :verified, | ||
| pii: { first_name: 'John', ssn: '111223333' }, | ||
| proofing_components: { liveness_check: :acuant, address_check: :lexis_nexis_address } | ||
| ).user | ||
| visit_idp_from_oidc_sp_with_ial2_strict | ||
| sign_in_user(user) | ||
| fill_in_code_with_last_phone_otp | ||
| click_submit_default | ||
| click_agree_and_continue | ||
|
|
||
| expect(current_url).to start_with('http://localhost:7654/auth/result') | ||
| expect(user.active_profile.strict_ial2_proofed?).to be_truthy | ||
| end | ||
| end | ||
| end |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I've recently discovered (LG-6217), we're already not very consistent, but: Should we have equivalent logic for SAML as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, however we don't support strict IAL2 in SAML today. I was going to figure out what it all looks like before moving it over
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, now I'm wondering if the changes in #6253 shouldn't have been implemented, then? I seem to recall there were some failing specs that it was resolving from #6229, as if we had specs running through a SAML + IAL2Strict scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I did not think SAML supported it at all. You may have jumped ahead of me a bit. Fortunately IAL2 strict is disabled in all the places that matter.