Skip to content

LG-17325 Reproof IPP proofing policy#12976

Open
mdiarra3 wants to merge 26 commits intomainfrom
LG-17325-reproof-sp-policy-iaa
Open

LG-17325 Reproof IPP proofing policy#12976
mdiarra3 wants to merge 26 commits intomainfrom
LG-17325-reproof-sp-policy-iaa

Conversation

@mdiarra3
Copy link
Copy Markdown
Contributor

@mdiarra3 mdiarra3 commented Mar 18, 2026

🎫 Ticket

Link to the relevant ticket:
LG-17325

🛠 Summary of changes

Introduces Idv::ReproofRequiredPolicy to consolidate and extend reproofing logic. Previously, ServiceProvider#needs_to_reproof? only handled the reproof-forcing SP case inline. This PR extracts that logic into a dedicated policy class and adds support for IPP (In-Person Proofing) reproofing, gated behind a feature flag.

📜 Testing Plan

New config keys: reproof_non_facial_match_service_providers (JSON array) added to IdentityConfig.

Test Locally:

  • Add reproof ipp service providers json array with proper issuers
  • Sign in through SP
  • with active profile with legacy unsupervised be redirected to reproof when signing into SP

@mdiarra3 mdiarra3 requested review from a team and vrajmohan March 18, 2026 20:10
@vrajmohan
Copy link
Copy Markdown
Contributor

  1. I would assume that we are not backing out the IRS reproofing code. In other words, Reproofing-for-CAIA should work along with IRS reproofing (whenever they actually turn it on)
  2. There are multiple service providers for CAIA - both SAML and OIDC. I would assume that we are supporting all the CAIA service providers.

Comment thread app/policies/idv/reproof_required_policy.rb Outdated
Comment thread app/policies/idv/reproof_required_policy.rb Outdated
Comment thread app/policies/idv/reproof_required_policy.rb Outdated
Comment thread app/policies/idv/reproof_required_policy.rb Outdated
Comment thread app/models/profile.rb Outdated
FACIAL_MATCH_OPT_IN = %w[unsupervised_with_selfie].to_set.freeze

# IPP proofing levels
IPP_PROOFING_IDV_LEVELS = %w[in_person proofing_agent legacy_in_person].to_set.freeze
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is like AC current and ATM machine 😄
I suggest IN_PERSON_PROOFING_IDV_LEVELS.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also wondering if a better concept/construct is that what the service provider wants is pure facial_match as opposed to rejecting IPP. In other words, use FACIAL_MATCH_OPT_IN although that seems to be an awful name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the issue is that it wants facial match but we want to ONLY require users that were IPP proofed to be reproofed. So yes we can say if its facial match we should reproof but it would catch all users that are proofed already right?

Comment thread app/models/service_provider.rb Outdated
issuer == IdentityConfig.store.reproof_forcing_service_provider &&
initiating_service_provider&.issuer != IdentityConfig.store.reproof_forcing_service_provider
def needs_to_reproof?(user_profile)
Idv::ReproofRequiredPolicy.new(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see the value in creating a separate Policy class; I feel that the responsibility could still reside with ServiceProvider. We should get other opinions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I disagree. I think it makes it a little too noisy when its in the service provider and it can get confusing of whether ur talking about the current service provider or the service provider associated with the profile.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see @mdiarra3's point--I think its good to have a separate policy because for maintainability. It is easier to update logic about reproofing separately from SP characteristics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I'm good with having separate policy classes, too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we are going with a separate Policy class, my concern is that Idv::ReproofRequiredPolicy doesn't take on the full responsibility. I would rename it to Idv::ServiceProviderBasedReproofingPolicy or similar. There is a similar convention with ServiceProviderMfaPolicy.

Comment thread spec/controllers/openid_connect/authorization_controller_spec.rb Outdated
Comment thread spec/controllers/idv_controller_spec.rb Outdated
Comment thread spec/models/profile_spec.rb Outdated
Comment thread spec/models/service_provider_spec.rb Outdated
@mdiarra3 mdiarra3 requested a review from vrajmohan March 27, 2026 21:48
@joshuaalley25
Copy link
Copy Markdown
Contributor

The PR instruction's testing plan needs to be updated to remove reproof_ipp_enabled(boolean) and reproof_ipp_service_providers.

Comment thread app/models/service_provider.rb Outdated
issuer == IdentityConfig.store.reproof_forcing_service_provider &&
initiating_service_provider&.issuer != IdentityConfig.store.reproof_forcing_service_provider
def needs_to_reproof?(user_profile)
Idv::ReproofRequiredPolicy.new(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we are going with a separate Policy class, my concern is that Idv::ReproofRequiredPolicy doesn't take on the full responsibility. I would rename it to Idv::ServiceProviderBasedReproofingPolicy or similar. There is a similar convention with ServiceProviderMfaPolicy.

Comment thread app/policies/idv/reproof_required_policy.rb Outdated
Comment thread spec/models/service_provider_spec.rb Outdated
Comment thread spec/models/service_provider_spec.rb Outdated
Comment thread spec/controllers/idv_controller_spec.rb
Comment thread lib/identity_config.rb Outdated
@mdiarra3 mdiarra3 requested a review from vrajmohan April 3, 2026 14:44
Copy link
Copy Markdown
Contributor

@vrajmohan vrajmohan left a comment

Choose a reason for hiding this comment

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

Looks great. Thank you for your patience.

Copy link
Copy Markdown
Contributor

@joshuaalley25 joshuaalley25 left a comment

Choose a reason for hiding this comment

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

Thank you for adding the logging

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