Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/concerns/idv/verify_info_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions app/presenters/idv/gpo_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ 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'
end
end

def back_or_cancel_parameters
if OutageStatus.new.gpo_only?
if FeatureManagement.idv_gpo_only?
{ step: 'gpo' }
else
{ fallback_path: fallback_back_path }
Expand Down
12 changes: 4 additions & 8 deletions app/services/outage_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?
Expand Down
1 change: 1 addition & 0 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion lib/feature_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have documentation about when to set feature_idv_force_gpo_verification_enabled? Seems like it's a little complicated to set the right flags.

Copy link
Contributor

Choose a reason for hiding this comment

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

No this is a new flag we've added. We are adding flags for both enabling/disabling vendor services (PhoneFinder, Pinpoint etc), but also for disabling/enabling "features" of our application -- gpo, hybrid flow, etc. This is on the heels of a conversation about what the on-call people would prefer to have.

We might consider a subsequent ticket that updates runbooks with these property values and their descriptions though.

end
end
11 changes: 6 additions & 5 deletions lib/identity_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
30 changes: 30 additions & 0 deletions spec/features/idv/outage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down