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
12 changes: 2 additions & 10 deletions app/jobs/resolution_proofing_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def perform(
user_id: nil,
threatmetrix_session_id: nil,
request_ip: nil,
issuer: nil,
dob_year_only: nil # rubocop:disable Lint:UnusedMethodArgument
issuer: nil, # rubocop:disable Lint:UnusedMethodArgument
dob_year_only: false # rubocop:disable Lint:UnusedMethodArgument
)
timer = JobHelpers::Timer.new

Expand All @@ -41,7 +41,6 @@ def perform(
user: user,
threatmetrix_session_id: threatmetrix_session_id,
request_ip: request_ip,
issuer: issuer,
timer: timer,
)

Expand Down Expand Up @@ -107,11 +106,9 @@ def proof_lexisnexis_ddp_with_threatmetrix_if_needed(
user:,
threatmetrix_session_id:,
request_ip:,
issuer:,
timer:
)
return unless IdentityConfig.store.lexisnexis_threatmetrix_enabled
return unless issuer_allows_threatmetrix?(issuer)

# The API call will fail without a session ID, so do not attempt to make
# it to avoid leaking data when not required.
Expand Down Expand Up @@ -214,9 +211,4 @@ def add_threatmetrix_proofing_component(user_id, threatmetrix_result)
update(threatmetrix: true,
threatmetrix_review_status: threatmetrix_result.review_status)
end

def issuer_allows_threatmetrix?(issuer)
return IdentityConfig.store.no_sp_device_profiling_enabled if issuer.blank?
ServiceProvider.find_by(issuer: issuer)&.device_profiling_enabled
end
end
2 changes: 2 additions & 0 deletions app/models/service_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ServiceProvider < ApplicationRecord
primary_key: 'issuer',
dependent: :destroy

self.ignored_columns = [:device_profiling_enabled]

# Do not define validations in this model.
# See https://github.com/18F/identity_validations
include IdentityValidations::ServiceProviderValidation
Expand Down
1 change: 0 additions & 1 deletion app/services/idv/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def proof_resolution(
job_arguments = {
encrypted_arguments: encrypted_arguments,
should_proof_state_id: should_proof_state_id,
dob_year_only: false,
trace_id: trace_id,
result_id: document_capture_session.result_id,
user_id: user_id,
Expand Down
5 changes: 0 additions & 5 deletions app/services/idv/steps/doc_auth_base_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ def verify_step_document_capture_session_uuid_key
:idv_verify_step_document_capture_session_uuid
end

def service_provider_device_profiling_enabled?
return IdentityConfig.store.no_sp_device_profiling_enabled if sp_session[:issuer].blank?
ServiceProvider.find_by(issuer: sp_session[:issuer])&.device_profiling_enabled
end

def track_document_state(state)
return unless IdentityConfig.store.state_tracking_enabled && state
doc_auth_log = DocAuthLog.find_by(user_id: user_id)
Expand Down
1 change: 0 additions & 1 deletion app/services/idv/steps/threat_metrix_step_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def threatmetrix_view_variables
end

def generate_threatmetrix_session_id
return unless service_provider_device_profiling_enabled?
flow_session[:threatmetrix_session_id] = SecureRandom.uuid if !updating_ssn
flow_session[:threatmetrix_session_id]
end
Expand Down
2 changes: 0 additions & 2 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ max_piv_cac_per_account: 2
min_password_score: 3
mx_timeout: 3
new_sign_up_cancellation_url_enabled: true
no_sp_device_profiling_enabled: false
otp_delivery_blocklist_maxretry: 10
otp_valid_for: 10
otp_expiration_warning_seconds: 150
Expand Down Expand Up @@ -380,7 +379,6 @@ development:
newrelic_browser_app_id: ''
newrelic_browser_key: ''
newrelic_license_key: ''
no_sp_device_profiling_enabled: true
nonessential_email_banlist: '["banned_email@gmail.com"]'
otp_delivery_blocklist_findtime: 5
password_pepper: f22d4b2cafac9066fe2f4416f5b7a32c
Expand Down
1 change: 0 additions & 1 deletion lib/identity_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ def self.build_store(config_map)
config.add(:min_password_score, type: :integer)
config.add(:otp_min_attempts_remaining_warning_count, type: :integer)
config.add(:mx_timeout, type: :integer)
config.add(:no_sp_device_profiling_enabled, type: :boolean)
config.add(:nonessential_email_banlist, type: :json)
config.add(:otp_delivery_blocklist_findtime, type: :integer)
config.add(:otp_delivery_blocklist_maxretry, type: :integer)
Expand Down
3 changes: 0 additions & 3 deletions spec/features/idv/doc_auth/ssn_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
include DocCaptureHelper

before do
allow(IdentityConfig.store).
to receive(:no_sp_device_profiling_enabled).and_return(true)

sign_in_and_2fa_user
complete_doc_auth_steps_before_ssn_step
end
Expand Down
6 changes: 3 additions & 3 deletions spec/features/idv/doc_auth/verify_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
anything,
should_proof_state_id: true,
trace_id: anything,
threatmetrix_session_id: nil,
threatmetrix_session_id: anything,
user_id: user.id,
request_ip: kind_of(String),
issuer: anything,
Expand Down Expand Up @@ -248,7 +248,7 @@
anything,
should_proof_state_id: false,
trace_id: anything,
threatmetrix_session_id: nil,
threatmetrix_session_id: anything,
user_id: user.id,
request_ip: kind_of(String),
issuer: anything,
Expand All @@ -274,7 +274,7 @@
anything,
should_proof_state_id: false,
trace_id: anything,
threatmetrix_session_id: nil,
threatmetrix_session_id: anything,
user_id: user.id,
request_ip: kind_of(String),
issuer: anything,
Expand Down
Loading