Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ gem 'rack-headers_filter'
gem 'rack-timeout', require: false
gem 'redacted_struct'
gem 'redis', '>= 3.2.0'
gem 'redis-namespace'
gem 'redis-session-store', github: '18F/redis-session-store', tag: 'v0.12-18f'
gem 'retries'
gem 'rotp', '~> 6.1'
Expand Down
115 changes: 56 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,67 +60,67 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.4.1)
actionpack (= 7.0.4.1)
activesupport (= 7.0.4.1)
actioncable (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4.1)
actionpack (= 7.0.4.1)
activejob (= 7.0.4.1)
activerecord (= 7.0.4.1)
activestorage (= 7.0.4.1)
activesupport (= 7.0.4.1)
actionmailbox (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4.1)
actionpack (= 7.0.4.1)
actionview (= 7.0.4.1)
activejob (= 7.0.4.1)
activesupport (= 7.0.4.1)
actionmailer (7.0.4.3)
actionpack (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4.1)
actionview (= 7.0.4.1)
activesupport (= 7.0.4.1)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.4.1)
actionpack (= 7.0.4.1)
activerecord (= 7.0.4.1)
activestorage (= 7.0.4.1)
activesupport (= 7.0.4.1)
actiontext (7.0.4.3)
actionpack (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4.1)
activesupport (= 7.0.4.1)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.4.1)
activesupport (= 7.0.4.1)
activejob (7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.3.6)
activemodel (7.0.4.1)
activesupport (= 7.0.4.1)
activerecord (7.0.4.1)
activemodel (= 7.0.4.1)
activesupport (= 7.0.4.1)
activestorage (7.0.4.1)
actionpack (= 7.0.4.1)
activejob (= 7.0.4.1)
activerecord (= 7.0.4.1)
activesupport (= 7.0.4.1)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activestorage (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activesupport (= 7.0.4.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4.1)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -390,7 +390,7 @@ GEM
zeitwerk (~> 2.5)
lru_redux (1.1.0)
lumberjack (1.2.8)
mail (2.8.0.1)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
Expand Down Expand Up @@ -469,7 +469,7 @@ GEM
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.6.2)
rack (2.2.6.3)
rack (2.2.6.4)
rack-attack (6.5.0)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
Expand All @@ -485,20 +485,20 @@ GEM
rack_session_access (0.2.0)
builder (>= 2.0.0)
rack (>= 1.0.0)
rails (7.0.4.1)
actioncable (= 7.0.4.1)
actionmailbox (= 7.0.4.1)
actionmailer (= 7.0.4.1)
actionpack (= 7.0.4.1)
actiontext (= 7.0.4.1)
actionview (= 7.0.4.1)
activejob (= 7.0.4.1)
activemodel (= 7.0.4.1)
activerecord (= 7.0.4.1)
activestorage (= 7.0.4.1)
activesupport (= 7.0.4.1)
rails (7.0.4.3)
actioncable (= 7.0.4.3)
actionmailbox (= 7.0.4.3)
actionmailer (= 7.0.4.3)
actionpack (= 7.0.4.3)
actiontext (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activemodel (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
bundler (>= 1.15.0)
railties (= 7.0.4.1)
railties (= 7.0.4.3)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -516,9 +516,9 @@ GEM
rails-i18n (7.0.6)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.0.4.1)
actionpack (= 7.0.4.1)
activesupport (= 7.0.4.1)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -534,8 +534,6 @@ GEM
redis-client (>= 0.9.0)
redis-client (0.14.0)
connection_pool
redis-namespace (1.8.1)
redis (>= 3.0.4)
regexp_parser (2.6.1)
reline (0.2.7)
io-console (~> 0.5)
Expand Down Expand Up @@ -653,7 +651,7 @@ GEM
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.1)
thread_safe (0.3.6)
timeout (0.3.1)
timeout (0.3.2)
tpm-key_attestation (0.11.0)
bindata (~> 2.4)
openssl (> 2.0, < 3.1)
Expand Down Expand Up @@ -802,7 +800,6 @@ DEPENDENCIES
rails-erd (>= 1.6.0)
redacted_struct
redis (>= 3.2.0)
redis-namespace
redis-session-store!
retries
rotp (~> 6.1)
Expand Down
8 changes: 2 additions & 6 deletions app/controllers/account_reset/delete_account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class DeleteAccountController < ApplicationController
def show
render :show and return unless token

result = AccountReset::ValidateGrantedToken.new(token).call
result = AccountReset::ValidateGrantedToken.new(token, request, analytics).call
analytics.account_reset_granted_token_validation(**result.to_h)

if result.success?
Expand All @@ -15,13 +15,9 @@ def show

def delete
granted_token = session.delete(:granted_token)
result = AccountReset::DeleteAccount.new(granted_token).call
result = AccountReset::DeleteAccount.new(granted_token, request, analytics).call
analytics.account_reset_delete(**result.to_h.except(:email))

irs_attempts_api_tracker.account_reset_account_deleted(
success: result.success?,
failure_reason: irs_attempts_api_tracker.parse_failure_reason(result),
)
if result.success?
handle_successful_deletion(result)
else
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/account_reset/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create
private

def create_account_reset_request
response = AccountReset::CreateRequest.new(current_user).call
response = AccountReset::CreateRequest.new(current_user, sp_session[:issuer]).call
irs_attempts_api_tracker.account_reset_request_submitted(
success: response.success?,
)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/idv/step_utilities_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def confirm_pii_from_doc
end

def confirm_profile_not_already_confirmed
return unless idv_session.profile_confirmation == true
return unless idv_session.verify_info_step_complete?
redirect_to idv_review_url
end

Expand Down
7 changes: 3 additions & 4 deletions app/controllers/concerns/idv/verify_info_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def async_state_done(current_async_state)
delete_async

if form_response.success?
idv_session.resolution_successful = true
idv_session.mark_verify_info_step_complete!
redirect_to idv_phone_url
else
idv_session.resolution_successful = false
idv_session.invalidate_verify_info_step!
end

analytics.idv_doc_auth_verify_proofing_results(**form_response.to_h)
Expand Down Expand Up @@ -213,11 +213,10 @@ def save_legacy_state
end

def skip_legacy_steps
idv_session.profile_confirmation = true
idv_session.mark_verify_info_step_complete!
idv_session.vendor_phone_confirmation = false
idv_session.user_phone_confirmation = false
idv_session.address_verification_mechanism = 'phone'
idv_session.resolution_successful = 'phone'
end

def add_proofing_costs(results)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/gpo_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def confirm_user_completed_idv_profile_step
# If the user has a pending profile, they may have completed idv in a
# different session and need a letter resent now
return if current_user.decorate.pending_profile_requires_verification?
return if idv_session.profile_confirmation == true
return if idv_session.verify_info_step_complete?

redirect_to idv_doc_auth_url
end
Expand Down
8 changes: 2 additions & 6 deletions app/controllers/idv/gpo_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,8 @@ def create
private

def next_step
if IdentityConfig.store.gpo_personal_key_after_otp
enable_personal_key_generation
idv_personal_key_url
else
sign_up_completed_url
end
enable_personal_key_generation
idv_personal_key_url
end

def throttle
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/in_person/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def confirm_ssn_step_complete
def confirm_profile_not_already_confirmed
# todo: should this instead be like so?
# return unless idv_session.resolution_successful == true
return unless idv_session.profile_confirmation == true
return unless idv_session.verify_info_step_complete?
redirect_to idv_phone_url
end

Expand Down
6 changes: 1 addition & 5 deletions app/controllers/idv/personal_key_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ def finish_idv_session

irs_attempts_api_tracker.idv_personal_key_generated

if idv_session.address_verification_mechanism == 'gpo'
if !IdentityConfig.store.gpo_personal_key_after_otp
flash.now[:success] = t('idv.messages.mail_sent')
end
else
if idv_session.address_verification_mechanism != 'gpo'
flash.now[:success] = t('idv.messages.confirm')
end
flash[:allow_confirmations_continue] = true
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/idv/review_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ def next_step
end

def gpo_user_flow?
idv_session.address_verification_mechanism == 'gpo' &&
IdentityConfig.store.gpo_personal_key_after_otp
idv_session.address_verification_mechanism == 'gpo'
end

def handle_request_enroll_exception(err)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/session_errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def confirm_two_factor_authenticated_or_user_id_in_session

def confirm_idv_session_step_needed
return unless user_fully_authenticated?
redirect_to idv_phone_url if idv_session.profile_confirmation == true
redirect_to idv_phone_url if idv_session.verify_info_step_complete?
end

def ignore_form_step_wait_requests
Expand Down
10 changes: 9 additions & 1 deletion app/controllers/idv/ssn_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def update
if form_response.success?
flow_session['pii_from_doc'][:ssn] = params[:doc_auth][:ssn]
idv_session.invalidate_steps_after_ssn!
redirect_to idv_verify_info_url
redirect_to next_url
else
@error_message = form_response.first_error_message
render :show, locals: extra_view_variables
Expand All @@ -55,6 +55,14 @@ def extra_view_variables

private

def next_url
if @pii[:state] == 'PR'
idv_address_url
else
idv_verify_info_url
end
end

def analytics_arguments
{
flow_path: flow_path,
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/idv/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def increment_step_counts
# copied from verify_base_step. May want reconciliation with phone_step
def process_async_state(current_async_state)
if current_async_state.none?
idv_session.resolution_successful = false
idv_session.invalidate_verify_info_step!
render :show
elsif current_async_state.in_progress?
render 'shared/wait'
Expand All @@ -138,7 +138,7 @@ def process_async_state(current_async_state)
render :show

delete_async
idv_session.resolution_successful = false
idv_session.invalidate_verify_info_step!

log_idv_verification_submitted_event(
success: false,
Expand Down
4 changes: 3 additions & 1 deletion app/forms/idv/state_id_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ class StateIdForm
include ActiveModel::Model
include FormStateIdValidator

ATTRIBUTES = %i[first_name last_name dob state_id_jurisdiction state_id_number].freeze
ATTRIBUTES = %i[first_name last_name dob state_id_address1 state_id_address2
state_id_city state_id_zipcode state_id_jurisdiction state_id_number
same_address_as_id].freeze

attr_accessor(*ATTRIBUTES)

Expand Down
Loading