diff --git a/app/controllers/concerns/idv/verify_info_concern.rb b/app/controllers/concerns/idv/verify_info_concern.rb index 4f3dd6402a7..6fa9a7a28e8 100644 --- a/app/controllers/concerns/idv/verify_info_concern.rb +++ b/app/controllers/concerns/idv/verify_info_concern.rb @@ -123,7 +123,7 @@ def async_state_done(current_async_state) end def next_step_url - return idv_gpo_url if OutageStatus.new.gpo_only? + return idv_gpo_url if FeatureManagement.idv_gpo_only? idv_phone_url end diff --git a/app/presenters/idv/gpo_presenter.rb b/app/presenters/idv/gpo_presenter.rb index 9c7b210bb3e..62fd146b1c4 100644 --- a/app/presenters/idv/gpo_presenter.rb +++ b/app/presenters/idv/gpo_presenter.rb @@ -27,7 +27,7 @@ def resend_requested? end def back_or_cancel_partial - if OutageStatus.new.gpo_only? + if FeatureManagement.idv_gpo_only? 'idv/doc_auth/cancel' else 'idv/shared/back' @@ -35,7 +35,7 @@ def back_or_cancel_partial end def back_or_cancel_parameters - if OutageStatus.new.gpo_only? + if FeatureManagement.idv_gpo_only? { step: 'gpo' } else { fallback_path: fallback_back_path } diff --git a/app/services/outage_status.rb b/app/services/outage_status.rb index 33a7950ba54..290dbde4acc 100644 --- a/app/services/outage_status.rb +++ b/app/services/outage_status.rb @@ -19,6 +19,8 @@ def vendor_outage?(vendor) IdentityConfig.store.vendor_status_lexisnexis_instant_verify when :lexisnexis_trueid IdentityConfig.store.vendor_status_lexisnexis_trueid + when :lexisnexis_phone_finder + IdentityConfig.store.vendor_status_lexisnexis_phone_finder when :sms IdentityConfig.store.vendor_status_sms when :voice @@ -49,14 +51,8 @@ def all_phone_vendor_outage? all_vendor_outage?(PHONE_VENDORS) end - def gpo_only? - IdentityConfig.store.feature_idv_force_gpo_verification_enabled || - any_phone_vendor_outage? - end - - def allow_hybrid_flow? - IdentityConfig.store.feature_idv_hybrid_flow_enabled && - !any_phone_vendor_outage? + def phone_finder_outage? + all_vendor_outage?([:lexisnexis_phone_finder]) end def from_idv? diff --git a/config/application.yml.default b/config/application.yml.default index a66c14792a0..4c05489678f 100644 --- a/config/application.yml.default +++ b/config/application.yml.default @@ -314,6 +314,7 @@ usps_upload_sftp_timeout: 5 valid_authn_contexts: '["http://idmanagement.gov/ns/assurance/loa/1", "http://idmanagement.gov/ns/assurance/loa/3", "http://idmanagement.gov/ns/assurance/ial/1", "http://idmanagement.gov/ns/assurance/ial/2", "http://idmanagement.gov/ns/assurance/ial/0", "http://idmanagement.gov/ns/assurance/ial/2?strict=true", "urn:gov:gsa:ac:classes:sp:PasswordProtectedTransport:duo", "http://idmanagement.gov/ns/assurance/aal/2", "http://idmanagement.gov/ns/assurance/aal/3", "http://idmanagement.gov/ns/assurance/aal/3?hspd12=true","http://idmanagement.gov/ns/assurance/aal/2?phishing_resistant=true","http://idmanagement.gov/ns/assurance/aal/2?hspd12=true"]' vendor_status_acuant: 'operational' vendor_status_lexisnexis_instant_verify: 'operational' +vendor_status_lexisnexis_phone_finder: 'operational' vendor_status_lexisnexis_trueid: 'operational' vendor_status_sms: 'operational' vendor_status_voice: 'operational' diff --git a/lib/feature_management.rb b/lib/feature_management.rb index edf08866ea5..4ab08c5fe96 100644 --- a/lib/feature_management.rb +++ b/lib/feature_management.rb @@ -158,7 +158,9 @@ def self.idv_allow_hybrid_flow? end def self.idv_gpo_only? + outage_status = OutageStatus.new IdentityConfig.store.feature_idv_force_gpo_verification_enabled || - OutageStatus.new.any_phone_vendor_outage? + outage_status.any_phone_vendor_outage? || + outage_status.phone_finder_outage? end end diff --git a/lib/identity_config.rb b/lib/identity_config.rb index 6ec676c51b2..e64e9d66b90 100644 --- a/lib/identity_config.rb +++ b/lib/identity_config.rb @@ -296,11 +296,6 @@ def self.build_store(config_map) config.add(:otps_per_ip_limit, type: :integer) config.add(:otps_per_ip_period, type: :integer) config.add(:otps_per_ip_track_only_mode, type: :boolean) - config.add(:vendor_status_acuant, type: :symbol, enum: VENDOR_STATUS_OPTIONS) - config.add(:vendor_status_lexisnexis_instant_verify, type: :symbol, enum: VENDOR_STATUS_OPTIONS) - config.add(:vendor_status_lexisnexis_trueid, type: :symbol, enum: VENDOR_STATUS_OPTIONS) - config.add(:vendor_status_sms, type: :symbol, enum: VENDOR_STATUS_OPTIONS) - config.add(:vendor_status_voice, type: :symbol, enum: VENDOR_STATUS_OPTIONS) config.add(:outbound_connection_check_retry_count, type: :integer) config.add(:outbound_connection_check_timeout, type: :integer) config.add(:outbound_connection_check_url) @@ -440,6 +435,12 @@ def self.build_store(config_map) config.add(:usps_upload_sftp_timeout, type: :integer) config.add(:usps_upload_sftp_username, type: :string) config.add(:valid_authn_contexts, type: :json) + config.add(:vendor_status_acuant, type: :symbol, enum: VENDOR_STATUS_OPTIONS) + config.add(:vendor_status_lexisnexis_instant_verify, type: :symbol, enum: VENDOR_STATUS_OPTIONS) + config.add(:vendor_status_lexisnexis_phone_finder, type: :symbol, enum: VENDOR_STATUS_OPTIONS) + config.add(:vendor_status_lexisnexis_trueid, type: :symbol, enum: VENDOR_STATUS_OPTIONS) + config.add(:vendor_status_sms, type: :symbol, enum: VENDOR_STATUS_OPTIONS) + config.add(:vendor_status_voice, type: :symbol, enum: VENDOR_STATUS_OPTIONS) config.add(:verification_errors_report_configs, type: :json) config.add(:verify_gpo_key_attempt_window_in_minutes, type: :integer) config.add(:verify_gpo_key_max_attempts, type: :integer) diff --git a/spec/features/idv/outage_spec.rb b/spec/features/idv/outage_spec.rb index 41a74c81ae3..e52db17f486 100644 --- a/spec/features/idv/outage_spec.rb +++ b/spec/features/idv/outage_spec.rb @@ -20,6 +20,36 @@ def sign_in_with_idv_required(user:, sms_or_totp: :sms) let(:new_password) { 'some really awesome new password' } let(:pii) { { ssn: '666-66-1234', dob: '1920-01-01', first_name: 'alice' } } + context 'vendor_status_lexisnexis_phone_finder set to full_outage', js: true do + before do + allow(IdentityConfig.store).to receive(:vendor_status_lexisnexis_phone_finder). + and_return(:full_outage) + end + + it 'takes the user through the mail only flow, allowing hybrid' do + sign_in_with_idv_required(user: user) + + expect(current_path).to eq idv_mail_only_warning_path + + click_idv_continue + + expect(current_path).to eq idv_doc_auth_step_path(step: :welcome) + + complete_welcome_step + complete_agreement_step + + # Still offer the option for hybrid flow + expect(current_path).to eq idv_doc_auth_step_path(step: :upload) + + complete_upload_step + complete_document_capture_step + complete_ssn_step + complete_verify_step + + expect(current_path).to eq idv_gpo_path + end + end + context 'GPO only enabled, but user starts over', js: true do before do allow(IdentityConfig.store).to receive(:feature_idv_force_gpo_verification_enabled).