Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6c75bb9
Lint _html keys in YML files (#8713)
zachmargolis Jul 6, 2023
a737777
LG-9958 add allow list for IALMAX (#8700)
Sgtpluck Jul 6, 2023
0435778
LG-9939 Final doc_auth_controller removal (#8705)
soniaconnolly Jul 6, 2023
bcec644
Make /verify/doc_auth/:step redirect to /verify/welcome (#8729)
soniaconnolly Jul 6, 2023
402aaa6
LG-9657: Improve messaging for forbidden password feedback (#8726)
jmdembe Jul 7, 2023
7d85822
LG 8622 Removes stand alone error page for F/T Unlock (only WebAuthn …
kevinsmaster5 Jul 7, 2023
3f9dd59
LG-10214 Suspended User Create Account Flow (#8725)
ThatSpaceGuy Jul 7, 2023
73c598b
LG-9984: Add mfa_created_at to analytics (#8718)
jc-gsa Jul 7, 2023
abb03e5
LG-9433: Create USPS auth token refresh job (#8721)
night-jellyfish Jul 7, 2023
8139bcd
LG-10195: Log presence of address line 2 when enrolling a user in in-…
Jul 7, 2023
fa47ef8
LG-10103: Send only address line 1 to USPS when creating an enrollmen…
Jul 7, 2023
b6feab8
LG-10154 letter on the way screen (#8735)
Jul 8, 2023
cf4faa5
LG-10177: Always show Face / Touch Unlock in list of configured MFAs …
aduth Jul 10, 2023
01eb5d2
LG-9335 - post release 50 50 cleanup (#8719)
amirbey Jul 10, 2023
9c54a1e
Modified CTA Update button for Spanish (#8733)
gina-yamada Jul 10, 2023
a1fcfbf
LG-10290: Fix F/T unlock cancel sign-in redirect (#8738)
aduth Jul 10, 2023
f14b065
LG-10205: Don't rate limit users on their last attempt (#8727)
amirbey Jul 10, 2023
0d55b58
LG-10124: implementation of notification sender. (#8730)
dawei-nava Jul 10, 2023
a58a8d7
Fix session timeout modal styles (#8743)
aduth Jul 10, 2023
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: 1 addition & 0 deletions app/assets/stylesheets/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@forward 'icon';
@forward 'language-picker';
@forward 'list';
@forward 'modal';
@forward 'nav';
@forward 'page-heading';
@forward 'password';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use 'uswds-core' as *;
@use 'variables/app' as *;
@use '../variables/app' as *;

.usa-modal-overlay {
// Temporary styles to avoid inheriting too much of the USWDS opinionated modal styling until
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/concerns/idv_step_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ def pii_from_doc
flow_session['pii_from_doc']
end

# copied from doc_auth_controller
def flow_path
idv_session.flow_path || flow_session[:flow_path]
idv_session.flow_path
end

private
Expand Down
1 change: 0 additions & 1 deletion app/controllers/idv/agreement_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def analytics_arguments
def skip_to_capture
flow_session[:skip_upload_step] = true
idv_session.flow_path = 'standard'
flow_session[:flow_path] = 'standard' # temp added for 50/50, remove in future deploy
end

def consent_form_params
Expand Down
36 changes: 0 additions & 36 deletions app/controllers/idv/doc_auth_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def extra_view_variables

def confirm_hybrid_handoff_complete
return if idv_session.flow_path.present?
return if flow_session[:flow_path].present? # remove in future deploy

redirect_to idv_hybrid_handoff_url
end
Expand Down
1 change: 1 addition & 0 deletions app/controllers/idv/gpo_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def create
redirect_to capture_password_url
elsif resend_requested?
resend_letter
flash[:success] = t('idv.messages.gpo.another_letter_on_the_way')
redirect_to idv_come_back_later_url
else
redirect_to idv_review_url
Expand Down
16 changes: 10 additions & 6 deletions app/controllers/idv/gpo_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ class GpoVerifyController < ApplicationController

def index
analytics.idv_gpo_verification_visited

if rate_limiter.limited?
render_rate_limited
return
end

gpo_mail = Idv::GpoMail.new(current_user)
@gpo_verify_form = GpoVerifyForm.new(user: current_user, pii: pii)
@code = session[:last_gpo_confirmation_code] if FeatureManagement.reveal_gpo_code?
Expand All @@ -18,9 +24,7 @@ def index
!gpo_mail.mail_spammed? &&
!gpo_mail.profile_too_old?

if rate_limiter.limited?
render_rate_limited
elsif pii_locked?
if pii_locked?
redirect_to capture_password_url
else
render :index
Expand All @@ -32,13 +36,13 @@ def pii
end

def create
@gpo_verify_form = build_gpo_verify_form

rate_limiter.increment!
if rate_limiter.limited?
render_rate_limited
return
end
rate_limiter.increment!

@gpo_verify_form = build_gpo_verify_form

result = @gpo_verify_form.submit
analytics.idv_gpo_verification_submitted(**result.to_h)
Expand Down
18 changes: 5 additions & 13 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ def hybrid_flow_chosen?
end

def handle_phone_submission
rate_limiter.increment!
return rate_limited_failure if rate_limiter.limited?
rate_limiter.increment!
idv_session.phone_for_mobile_flow = params[:doc_auth][:phone]
idv_session.flow_path = 'hybrid'
flow_session[:flow_path] = 'hybrid' # temp addition for 50/50 remove in future deploy
telephony_result = send_link
telephony_form_response = build_telephony_form_response(telephony_result)

Expand All @@ -62,7 +61,6 @@ def handle_phone_submission
else
redirect_to idv_hybrid_handoff_url
idv_session.flow_path = nil
flow_session[:flow_path] = nil # temp added for 50/50, remove in future deploy
end

analytics.idv_doc_auth_upload_submitted(
Expand Down Expand Up @@ -99,7 +97,7 @@ def build_telephony_form_response(telephony_result)
extra: {
telephony_response: telephony_result.to_h,
destination: :link_sent,
flow_path: idv_session.flow_path || flow_session[:flow_path], # remove in future deploy
flow_path: idv_session.flow_path,
},
)
end
Expand All @@ -116,7 +114,6 @@ def update_document_capture_session_requested_at(session_uuid)

def bypass_send_link_steps
idv_session.flow_path = 'standard'
flow_session[:flow_path] = 'standard' # temp added for 50/50, remove in future deploy
redirect_to idv_document_capture_url

analytics.idv_doc_auth_upload_submitted(
Expand Down Expand Up @@ -214,14 +211,11 @@ def confirm_hybrid_handoff_needed
setup_for_redo if params[:redo]

idv_session.flow_path = 'standard' if flow_session[:skip_upload_step]
# next line temp added for 50/50, remove in future deploy
flow_session[:flow_path] = 'standard' if flow_session[:skip_upload_step]
# flow_session temp added for 50/50, remove in future deploy.
return if !idv_session.flow_path && !flow_session[:flow_path]
return if !idv_session.flow_path

if idv_session.flow_path == 'standard' || flow_session[:flow_path] == 'standard'
if idv_session.flow_path == 'standard'
redirect_to idv_document_capture_url
elsif idv_session.flow_path == 'hybrid' || flow_session[:flow_path] == 'hybrid'
elsif idv_session.flow_path == 'hybrid'
redirect_to idv_link_sent_url
end
end
Expand All @@ -230,10 +224,8 @@ def setup_for_redo
flow_session[:redo_document_capture] = true
if flow_session[:skip_upload_step]
idv_session.flow_path = 'standard'
flow_session[:flow_path] = 'standard' # temp added for 50/50, remove in future deploy
else
idv_session.flow_path = nil
flow_session[:flow_path] = nil # temp added for 50/50, remove in future deploy
end
end

Expand Down
5 changes: 1 addition & 4 deletions app/controllers/idv/link_sent_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ def extra_view_variables

def confirm_hybrid_handoff_complete
return if idv_session.flow_path == 'hybrid'
return if flow_session[:flow_path] == 'hybrid'

if idv_session.flow_path == 'standard' || flow_session[:flow_path] == 'standard'
if idv_session.flow_path == 'standard'
redirect_to idv_document_capture_url
else
redirect_to idv_hybrid_handoff_url
Expand Down Expand Up @@ -71,13 +70,11 @@ def handle_document_verification_success(get_results_response)
save_proofing_components(current_user)
extract_pii_from_doc(current_user, get_results_response, store_in_session: true)
idv_session.flow_path = 'hybrid'
flow_session[:flow_path] = 'hybrid' # temp added for 50/50, remove in future deploy
end

def render_document_capture_cancelled
redirect_to idv_hybrid_handoff_url
idv_session.flow_path = nil
flow_session[:flow_path] = nil # temp added for 50/50, remove in future deploy
failure(I18n.t('errors.doc_auth.document_capture_cancelled'))
end

Expand Down
8 changes: 7 additions & 1 deletion app/controllers/idv/review_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ def create

user_session[:need_personal_key_confirmation] = true

flash[:success] = t('idv.messages.confirm')
flash[:success] =
if gpo_user_flow?
t('idv.messages.gpo.letter_on_the_way')
else
t('idv.messages.confirm')
end

redirect_to next_step

analytics.idv_review_complete(
Expand Down
1 change: 0 additions & 1 deletion app/controllers/idv/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def update
if flow_session['redo_document_capture']
flow_session.delete('redo_document_capture')
idv_session.flow_path ||= 'standard'
flow_session[:flow_path] ||= 'standard' # temp added for 50/50, remove in future deploy
end

redirect_to idv_verify_info_url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def handle_valid_confirmation_otp
end

def otp_verification_form
OtpVerificationForm.new(current_user, sanitized_otp_code)
OtpVerificationForm.new(current_user, sanitized_otp_code, phone_configuration)
end

def redirect_if_blank_phone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@ def show
def create
@personal_key_form = PersonalKeyForm.new(current_user, personal_key_param)
result = @personal_key_form.submit
analytics_hash = result.to_h.merge(multi_factor_auth_method: 'personal-key')

analytics.track_mfa_submit_event(analytics_hash)

track_analytics(result)
handle_result(result)
end

private

def track_analytics(result)
mfa_created_at = current_user.encrypted_recovery_code_digest_generated_at
analytics_hash = result.to_h.merge(
multi_factor_auth_method: 'personal-key',
multi_factor_auth_method_created_at: mfa_created_at,
)

analytics.track_mfa_submit_event(analytics_hash)
end

def check_personal_key_enabled
return if TwoFactorAuthentication::PersonalKeyPolicy.new(current_user).enabled?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,14 @@ def handle_valid_webauthn
def handle_invalid_webauthn
is_platform_auth = params[:platform].to_s == 'true'
if is_platform_auth
if presenter_for_two_factor_authentication_method.multiple_factors_enabled?
flash[:error] = t(
'two_factor_authentication.webauthn_error.multiple_methods',
link: view_context.link_to(
t('two_factor_authentication.webauthn_error.additional_methods_link'),
login_two_factor_options_path,
),
)
redirect_to login_two_factor_webauthn_url(platform: params[:platform])
else
redirect_to login_two_factor_webauthn_error_url
end
flash[:error] = t(
'two_factor_authentication.webauthn_error.multiple_methods',
link: view_context.link_to(
t('two_factor_authentication.webauthn_error.additional_methods_link'),
login_two_factor_options_path,
),
)
redirect_to login_two_factor_webauthn_url(platform: 'true')
else
flash[:error] = t('errors.general')
redirect_to login_two_factor_webauthn_url
Expand Down Expand Up @@ -112,6 +108,7 @@ def analytics_properties
context: context,
multi_factor_auth_method: auth_method,
webauthn_configuration_id: form&.webauthn_configuration&.id,
multi_factor_auth_method_created_at: form&.webauthn_configuration&.created_at,
}
end

Expand Down
8 changes: 7 additions & 1 deletion app/forms/backup_code_verification_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ def submit(params)
attr_reader :user, :backup_code

def valid_backup_code?
BackupCodeGenerator.new(@user).verify(backup_code)
backup_code_config.present?
end

def backup_code_config
@backup_code_config ||= BackupCodeGenerator.new(@user).
if_valid_consume_code_return_config(backup_code)
end

def extra_analytics_attributes
{
multi_factor_auth_method: 'backup_code',
multi_factor_auth_method_created_at: backup_code_config.created_at,
}
end
end
3 changes: 2 additions & 1 deletion app/forms/openid_connect_authorize_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ def scopes

def validate_privileges
if (ial2_requested? && !ial_context.ial2_service_provider?) ||
(ial_context.ialmax_requested? && !ial_context.ial2_service_provider?)
(ial_context.ialmax_requested? &&
!IdentityConfig.store.allowed_ialmax_providers.include?(client_id))
errors.add(
:acr_values, t('openid_connect.authorization.errors.no_auth'),
type: :no_auth
Expand Down
8 changes: 6 additions & 2 deletions app/forms/otp_verification_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ class OtpVerificationForm
validate :validate_user_otp_expiration
validate :validate_code_equals_user_otp

def initialize(user, code)
def initialize(user, code, phone_configuration)
@user = user
@code = code
@phone_configuration = phone_configuration
end

def submit
Expand All @@ -28,7 +29,7 @@ def submit

private

attr_reader :code, :user
attr_reader :code, :user, :phone_configuration

def validate_code_length
return if code.blank? || code.size == TwoFactorAuthenticatable::DIRECT_OTP_LENGTH
Expand Down Expand Up @@ -63,8 +64,11 @@ def otp_expired?
end

def extra_analytics_attributes
multi_factor_auth_method_created_at = phone_configuration&.created_at

{
multi_factor_auth_method: 'otp_code',
multi_factor_auth_method_created_at: multi_factor_auth_method_created_at,
}
end
end
7 changes: 4 additions & 3 deletions app/forms/totp_verification_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def submit
cfg = if_valid_totp_code_return_config
FormResponse.new(
success: cfg.present?,
extra: extra_analytics_attributes(cfg&.id),
extra: extra_analytics_attributes(cfg),
)
end

Expand All @@ -29,10 +29,11 @@ def totp_code_length
TwoFactorAuthenticatable::OTP_LENGTH
end

def extra_analytics_attributes(cfg_id)
def extra_analytics_attributes(cfg)
{
multi_factor_auth_method: 'totp',
auth_app_configuration_id: cfg_id,
auth_app_configuration_id: cfg&.id,
multi_factor_auth_method_created_at: cfg&.created_at,
}
end
end
Loading