Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3a75cdd
LG-7131 - Implementation improve messaging for users. (#6809)
peggles2 Aug 31, 2022
ff5cd3b
LG-7410: Add ThreatMetrix back to In-Person Proofing flow (#6877)
matthinz Aug 31, 2022
de5bdc8
Improve changelog tool sorting and capitalization (#6880)
aduth Aug 31, 2022
4e5e382
Remove integration_hub_results from threatmetrix response (redact) (#…
stevegsa Aug 31, 2022
a461b62
LG-6964: Expand USPS polling analytics data (#6832)
Aug 31, 2022
bb62c76
Resolve linting errors (#6889)
matthinz Aug 31, 2022
bd8ed0b
changelog: Internal, Attempts API, Add safeguard tests to ensure even…
Aug 31, 2022
57f6fa7
LG-7105: GPO Letter Code Submitted Event (#6873)
mdiarra3 Aug 31, 2022
a88093d
Update .gitlab-ci.yml (#6893)
matthinz Aug 31, 2022
27a574b
LG-7415: Allow using mock TMX proofer when TMX JS disabled (#6885)
matthinz Sep 1, 2022
3fd5c3b
Updating mailer image from svg to png for Google (#6892)
eric-gade Sep 1, 2022
291e2f6
Upgrade Node.js to v16 (#6841)
aduth Sep 1, 2022
abfa05b
Address PR review comments for mailer image (#6895)
aduth Sep 1, 2022
4a7fb7c
Bug fix: deleting an account with nil confirmed_at (#6888)
zachmargolis Sep 1, 2022
5f50f76
Log service provider and IAL for userinfo access token (#6899)
Sep 1, 2022
2f01d9d
Include account_drivers_license_type
jskinne3 Sep 1, 2022
e9fab47
Do not allow confirming email addresses via add email controller for …
Sep 1, 2022
12702b5
Update IPP flow to include CSP for ThreatMetrix (#6901)
matthinz Sep 1, 2022
57d13b0
Lg 7098 phone upload link submit (#6902)
ThatSpaceGuy Sep 1, 2022
8daf6bf
guard against non-hash arg input (#6903)
jskinne3 Sep 1, 2022
93a5f05
LG-6307: Remove pending steps from step indicator (#6860)
aduth Sep 2, 2022
cbc106b
Update LexisNexis fixtures (#6882)
jmhooper Sep 2, 2022
2526511
Lg 7098 phone upload link submit (#6908)
ThatSpaceGuy Sep 2, 2022
8e0873c
LG-6308: Show correct step indicator steps in in-person flow (#6846)
aduth Sep 2, 2022
ceffbbc
Improve rendering speed of phone input component (#6890)
Sep 2, 2022
a72b402
Enable Rubocop SpaceInsideArrayLiteralBrackets (#6912)
aduth Sep 6, 2022
4b13c4f
Upgrade TypeScript from 4.5 to 4.8 (#6911)
aduth Sep 6, 2022
d46df2c
LG-7205: Log click on in-person troubleshooting option (#6907)
aduth Sep 6, 2022
840b593
LG-7345: Generate a unique ID when creating enrollments (#6883)
Sep 6, 2022
ec76046
LG-6959 IDV verify redirects to inherited proofing (#6896)
jscodefix Sep 6, 2022
f92707e
LG-7107: log when personal key has been issued the first time. (#6881)
mdiarra3 Sep 6, 2022
945edc0
LG-7102: Phone sent information IDV event (#6906)
mdiarra3 Sep 6, 2022
f701d95
LG-7100 IDV verification submitted event tracking (#6886)
olatifflexion Sep 6, 2022
218d5c5
Improve speed of VerifySpAttributesConcern (#6921)
Sep 6, 2022
ac61490
Allow fields that I think are non-PII (#6913)
jskinne3 Sep 6, 2022
075817e
LG-7111: Idv Phone OTP Sent Rate Limited attempt event (#6878)
jc-gsa Sep 6, 2022
dc11b12
LG-7112: Idv Phone OTP Submitted Rate Limited attempt event (#6830)
jc-gsa Sep 6, 2022
e2757d6
LG-7106: Track IDV password entered event (#6870)
jc-gsa Sep 6, 2022
522eda8
LG-7101: Idv phone submitted event (#6871)
jc-gsa Sep 7, 2022
f5c4780
LG-7277 Acuant Not Working for iPads (#6865)
eric-gade Sep 7, 2022
7040ae8
[LG-7244] Translate the getting started page (#6872)
gangelo Sep 7, 2022
239f229
Remove last references to uuid_priority (#6919)
zachmargolis Sep 7, 2022
ec2897d
LG-7347 Limit use of ThreatMetrix to certain service providers (#6914)
stevegsa Sep 7, 2022
b79be16
LG-7442 Add Threatmetrix Costing (#6917)
stevegsa Sep 7, 2022
d54a045
Merge remote-tracking branch 'origin/stages/prod' into stages/rc-2022…
zachmargolis Sep 7, 2022
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
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
variables:
GITLAB_CI: 'true'
ECR_REGISTRY: '${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com'
IDP_CI_SHA: 'sha256:db00ce3b6c4b75e449d72e19329afdde94937547a75bfbfb6ef774ed3f5d77b6'
IDP_CI_SHA: 'sha256:cea459aea56802327075b873cc73a8859ecffa359a9311b359ea49b19b1ba934'

default:
image: '${ECR_REGISTRY}/idp/ci@${IDP_CI_SHA}'
Expand Down Expand Up @@ -185,7 +185,6 @@ js_tests:
- *yarn_install
- yarn test


pinpoint-check:
stage: test
cache:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ Layout/SpaceInLambdaLiteral:
Enabled: true
EnforcedStyle: require_no_space

Layout/SpaceInsideArrayLiteralBrackets:
Enabled: true

Layout/SpaceInsideBlockBraces:
Enabled: true

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ We recommend using [Homebrew](https://brew.sh/), [rbenv](https://github.com/rben
- Ruby ~> 3.0.4
- [PostgreSQL](http://www.postgresql.org/download/)
- [Redis 5+](http://redis.io/)
- [Node.js v14](https://nodejs.org)
-- (to install Node.js v.14 using brew: `brew install node@14`)
- [Node.js v16](https://nodejs.org)
- [Yarn](https://yarnpkg.com/en/)
- [chromedriver](https://formulae.brew.sh/cask/chromedriver)

Expand Down
1 change: 0 additions & 1 deletion app/assets/images/alert/pending.svg

This file was deleted.

6 changes: 5 additions & 1 deletion app/assets/images/email/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Email Images

This folder contains images for exclusive use by mailer templates. This includes email-specific imagery, and also variants of existing assets. For example, since [SVG images are not well-supported](https://www.caniemail.com/features/image-svg/) in all email clients, this folder may include rasterized versions of common SVG images.
This folder contains images for exclusive use by mailer templates. This includes email-specific imagery, and also variants of existing assets.

For example, since [SVG images are not well-supported](https://www.caniemail.com/features/image-svg/) in all email clients, this folder may include rasterized versions of common SVG images.

These images should not be used in application views, since vector images (SVG) are typically preferred due to improved render quality and smaller file size.
Binary file added app/assets/images/email/letter-warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions app/assets/stylesheets/components/_block-submit-button.scss

This file was deleted.

13 changes: 2 additions & 11 deletions app/assets/stylesheets/components/_step-indicator.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$step-indicator-current-step-border-width: 3px;
$step-indicator-line-height: 4px;
$step-indicator-pending-color: #a8b6c6;

lg-step-indicator {
display: block;
Expand Down Expand Up @@ -106,15 +105,11 @@ lg-step-indicator {
border: $step-indicator-current-step-border-width solid color('success');
}

.step-indicator__step--complete:not(.step-indicator__step--pending)::before {
.step-indicator__step--complete::before {
background-color: color('white');
background-image: url('alert/success.svg');
}

.step-indicator__step--pending::before {
background-image: url('alert/pending.svg');
}

.step-indicator__step:not(:last-child)::after {
background-color: color('base-lighter');
content: '';
Expand All @@ -126,11 +121,7 @@ lg-step-indicator {
width: calc(100% - 1rem - #{$step-indicator-line-height * 2});
}

.step-indicator__step--pending:not(:last-child)::after {
background-color: $step-indicator-pending-color;
}

.step-indicator__step--complete:not(.step-indicator__step--pending):not(:last-child)::after {
.step-indicator__step--complete:not(:last-child)::after {
background-color: color('success');
}

Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/components/all.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import 'account-header';
@import 'banner';
@import 'block-link';
@import 'block-submit-button';
@import 'btn';
@import 'card';
@import 'container';
Expand Down
3 changes: 2 additions & 1 deletion app/components/phone_input_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def translated_country_code_names
end

def international_phone_codes
translated_international_codes = PhoneNumberCapabilities.translated_international_codes
supported_country_codes.
map do |code_key|
code_data = PhoneNumberCapabilities.translated_international_codes[code_key]
code_data = translated_international_codes[code_key]

[
international_phone_code_label(code_data),
Expand Down
1 change: 1 addition & 0 deletions app/controllers/concerns/idv/phone_otp_rate_limitable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def reset_attempt_count_if_user_no_longer_locked_out

def handle_too_many_otp_sends
analytics.idv_phone_confirmation_otp_rate_limit_sends
irs_attempts_api_tracker.idv_phone_otp_sent_rate_limited
handle_max_attempts('otp_requests')
end

Expand Down
50 changes: 50 additions & 0 deletions app/controllers/concerns/idv/step_indicator_concern.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
module Idv
module StepIndicatorConcern
extend ActiveSupport::Concern

include IdvSession

included do
helper_method :step_indicator_steps
end

def step_indicator_steps
if in_person_proofing?
if gpo_address_verification?
Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS_GPO
else
Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS
end
elsif gpo_address_verification?
Idv::Flows::DocAuthFlow::STEP_INDICATOR_STEPS_GPO
else
Idv::Flows::DocAuthFlow::STEP_INDICATOR_STEPS
end
end

private

def in_person_proofing?
proofing_components_as_hash['document_check'] == Idp::Constants::Vendors::USPS
end

def gpo_address_verification?
# Proofing component values are (currently) never reset between proofing attempts, hence why
# this refers to the session address verification mechanism and not the proofing component.
!!current_user.pending_profile || idv_session.address_verification_mechanism == 'gpo'
end

def proofing_components_as_hash
# A proofing component record exists as a zero-or-one-to-one relation with a user, and values
# are set during identity verification. These values are recorded to the profile at creation,
# including for a pending profile.
@proofing_components_as_hash ||= begin
if current_user.pending_profile
current_user.pending_profile.proofing_components
else
ProofingComponent.find_by(user: current_user).as_json
end
end.to_h
end
end
end
22 changes: 11 additions & 11 deletions app/controllers/concerns/verify_sp_attributes_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ def needs_completion_screen_reason
return nil if sp_session[:issuer].blank?
return nil if sp_session[:request_url].blank?

sp_session_identity = find_sp_session_identity
if sp_session_identity.nil?
:new_sp
elsif !requested_attributes_verified?
elsif !requested_attributes_verified?(sp_session_identity)
:new_attributes
elsif consent_has_expired?
elsif consent_has_expired?(sp_session_identity)
:consent_expired
elsif consent_was_revoked?
elsif consent_was_revoked?(sp_session_identity)
:consent_revoked
end
end
Expand All @@ -26,7 +27,7 @@ def update_verified_attributes
)
end

def consent_has_expired?
def consent_has_expired?(sp_session_identity)
return false unless sp_session_identity
return false if sp_session_identity.deleted_at.present?
last_estimated_consent = sp_session_identity.last_consented_at || sp_session_identity.created_at
Expand All @@ -35,7 +36,7 @@ def consent_has_expired?
verified_after_consent?(last_estimated_consent)
end

def consent_was_revoked?
def consent_was_revoked?(sp_session_identity)
return false unless sp_session_identity
sp_session_identity.deleted_at.present?
end
Expand All @@ -48,14 +49,13 @@ def verified_after_consent?(last_estimated_consent)
verification_timestamp.present? && last_estimated_consent < verification_timestamp
end

def sp_session_identity
@sp_session_identity =
current_user&.identities&.find_by(service_provider: sp_session[:issuer])
def find_sp_session_identity
current_user&.identities&.find_by(service_provider: sp_session[:issuer])
end

def requested_attributes_verified?
@sp_session_identity && (
Array(sp_session[:requested_attributes]) - @sp_session_identity.verified_attributes.to_a
def requested_attributes_verified?(sp_session_identity)
sp_session_identity && (
Array(sp_session[:requested_attributes]) - sp_session_identity.verified_attributes.to_a
).empty?
end
end
3 changes: 3 additions & 0 deletions app/controllers/frontend_log_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ class FrontendLogController < ApplicationController
before_action :check_user_authenticated
before_action :validate_parameter_types

# rubocop:disable Layout/LineLength
EVENT_MAP = {
'IdV: verify in person troubleshooting option clicked' => :idv_verify_in_person_troubleshooting_option_clicked,
'IdV: forgot password visited' => :idv_forgot_password,
'IdV: password confirm visited' => :idv_review_info_visited,
'IdV: password confirm submitted' => proc do |analytics|
Expand All @@ -22,6 +24,7 @@ class FrontendLogController < ApplicationController
}.transform_values do |method|
method.is_a?(Proc) ? method : AnalyticsEvents.instance_method(method)
end.freeze
# rubocop:enable Layout/LineLength

def create
event = log_params[:event]
Expand Down
8 changes: 8 additions & 0 deletions app/controllers/idv/capture_doc_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module Idv
class CaptureDocController < ApplicationController
# rubocop:disable Rails/LexicallyScopedActionFilter
# index comes from the flow_state_matchine.rb
before_action :track_index_loads, only: [:index]
# rubocop:enable Rails/LexicallyScopedActionFilter
before_action :ensure_user_id_in_session

include Flow::FlowStateMachine
Expand All @@ -20,6 +24,10 @@ def return_to_sp

private

def track_index_loads
irs_attempts_api_tracker.idv_phone_upload_link_used
end

def ensure_user_id_in_session
return if session[:doc_capture_user_id] &&
token.blank? &&
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/idv/come_back_later_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module Idv
class ComeBackLaterController < ApplicationController
include StepIndicatorConcern

before_action :confirm_two_factor_authenticated
before_action :confirm_user_needs_gpo_confirmation

Expand Down
10 changes: 10 additions & 0 deletions app/controllers/idv/gpo_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Idv
class GpoController < ApplicationController
include IdvSession
include StepIndicatorConcern

before_action :confirm_two_factor_authenticated
before_action :confirm_idv_needed
Expand All @@ -10,6 +11,7 @@ class GpoController < ApplicationController

def index
@presenter = GpoPresenter.new(current_user, url_options)
@step_indicator_current_step = step_indicator_current_step
analytics.idv_gpo_address_visited(
letter_already_sent: @presenter.letter_already_sent?,
)
Expand All @@ -35,6 +37,14 @@ def gpo_mail_service

private

def step_indicator_current_step
if resend_requested?
:get_a_letter
else
:verify_phone_or_address
end
end

def update_tracking
analytics.idv_gpo_address_letter_requested(resend: resend_requested?)
irs_attempts_api_tracker.idv_letter_requested(success: true, resend: resend_requested?)
Expand Down
6 changes: 6 additions & 0 deletions app/controllers/idv/gpo_verify_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Idv
class GpoVerifyController < ApplicationController
include IdvSession
include StepIndicatorConcern

before_action :confirm_two_factor_authenticated
before_action :confirm_verification_needed
Expand All @@ -27,10 +28,15 @@ def create
@gpo_verify_form = build_gpo_verify_form

if throttle.throttled_else_increment?
irs_attempts_api_tracker.idv_gpo_verification_throttled
render_throttled
else
result = @gpo_verify_form.submit
analytics.idv_gpo_verification_submitted(**result.to_h)
irs_attempts_api_tracker.idv_gpo_verification_submitted(
success: result.success?,
failure_reason: result.errors.presence,
)

if result.success?
if result.extra[:pending_in_person_enrollment]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Idv
module InPerson
class ReadyToVerifyController < ApplicationController
include RenderConditionConcern
include StepIndicatorConcern

check_or_render_not_found -> { IdentityConfig.store.in_person_proofing_enabled }

Expand Down
2 changes: 2 additions & 0 deletions app/controllers/idv/in_person_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ class InPersonController < ApplicationController

include IdvSession
include Flow::FlowStateMachine
include Idv::ThreatMetrixConcern

before_action :redirect_if_flow_completed
before_action :override_csp_for_threat_metrix

FLOW_STATE_MACHINE_SETTINGS = {
step_url: :idv_in_person_step_url,
Expand Down
Loading