Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy RC 187 to Production #6224

Merged
merged 38 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
df59969
Bump identity-style-guide from 6.4.0 to 6.4.1 (#6181)
dependabot[bot] Apr 11, 2022
8b8ec06
Bump nokogiri from 1.13.3 to 1.13.4 (#6184)
dependabot[bot] Apr 12, 2022
6ca7d7e
Adapt StepIndicator script to custom element (#6180)
aduth Apr 12, 2022
2d65f6c
LG-5925 Document analytics 7 (#6182)
theabrad Apr 12, 2022
22c3d73
Revert tab placement change for password toggle checkbox (#6185)
aduth Apr 12, 2022
cdf4ca4
Drop unused users columns (#6164)
mitchellhenke Apr 12, 2022
6d2cdc0
LG-5927-document-analytic-events-no-9 (#6186)
gsa-manish Apr 12, 2022
522f388
LG-6066: Extract form-steps package from document-capture (#6179)
aduth Apr 12, 2022
98dd970
Add session duration to analytics (#6194)
stevegsa Apr 13, 2022
b381b84
Remove classlist-polyfill from app scripts (#6193)
aduth Apr 13, 2022
402f116
Remove visually-disabled effect from FormStepsContinueButton (#6191)
aduth Apr 13, 2022
1e5396f
LG-5988: Support routing users to next MFA method when they select mu…
mdiarra3 Apr 13, 2022
7b7be84
In-Person-Proofing "Beta" Tag (LG-6073) (#6192)
zachmargolis Apr 13, 2022
e583e88
Remove unused string interpolation for personal key text (#6196)
aduth Apr 13, 2022
bc6db9e
Remove IPP links from "failures" page (#6200)
zachmargolis Apr 13, 2022
6a64ed3
LG-6066: Stub out React entry-point for new IdV API routes (#6177)
aduth Apr 14, 2022
7b0a171
Add basic FormSteps flow for IdV React implementation (#6195)
aduth Apr 14, 2022
8aa2e98
LG-5225 validation error IAL2 (#6190)
nprimak Apr 14, 2022
6891d1c
Remove sms_resubscribe_enabled feature flag (#6201)
zachmargolis Apr 14, 2022
f671553
LG-6066: Initialize personal key value and render badge content (#6206)
aduth Apr 15, 2022
c3f6119
LG-6066: Implement clipboard button on FSMv2 Personal Key step (#6204)
aduth Apr 15, 2022
6b733cf
Reduce limit for RemoveOldThrottlesJob (#6199)
mitchellhenke Apr 15, 2022
b8db75b
LG-6066: Implement print button on FSMv2 Personal Key step (#6205)
aduth Apr 15, 2022
5a8af56
Bump async from 2.6.3 to 2.6.4 (#6208)
dependabot[bot] Apr 15, 2022
5a83a82
Use Webpack manifest to associate asset references per pack (#6198)
aduth Apr 15, 2022
53f8ca3
Background job to log psql table bloat stats (#6203)
jgrevich Apr 15, 2022
7e8d36d
Add a background job encryptor (#6211)
jmhooper Apr 15, 2022
e03a691
Use URL-safe base64 encoding of SHA256 digest in examples (#6210)
zachmargolis Apr 15, 2022
aabf6ab
LG-6066: Add personal key confirmation modal to IDV v2 app (#6209)
aduth Apr 18, 2022
1b1d6db
LG-6066: Create StepIndicator React component for proofing flow (#6187)
aduth Apr 18, 2022
9c87395
LG-6066: Implement download button for personal key step (IdV app) (#…
aduth Apr 18, 2022
07ebc6e
Fix Webpack asset manifest generation for production exports (#6214)
aduth Apr 18, 2022
57da841
Enhance FormSteps to manage history using path fragment (#6213)
aduth Apr 18, 2022
24f06a5
LG-6159: Add icons for personal key buttons (#6212)
aduth Apr 19, 2022
883e767
LG-6114: Use Cleave.js to format personal key (IdV app) (#6217)
aduth Apr 19, 2022
a682e95
Rate limit phone confirmation attempts (#6216)
mitchellhenke Apr 19, 2022
6cdeec9
fix redirect in phone throttle (#6223)
mitchellhenke Apr 19, 2022
80c903a
Use secure_compare for OIDC code_challenge (#6226)
zachmargolis Apr 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -92,7 +92,7 @@ group :development, :test do
gem 'erb_lint', '~> 0.1.0', require: false
gem 'i18n-tasks', '>= 0.9.31'
gem 'knapsack'
gem 'nokogiri', '~> 1.13.2'
gem 'nokogiri', '~> 1.13.4'
gem 'parallel_tests'
gem 'pg_query', require: false
gem 'pry-byebug'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -386,7 +386,7 @@ GEM
net-ssh (6.1.0)
newrelic_rpm (8.5.0)
nio4r (2.5.8)
nokogiri (1.13.3)
nokogiri (1.13.4)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
notiffany (0.1.3)
Expand Down Expand Up @@ -732,7 +732,7 @@ DEPENDENCIES
multiset
net-sftp
newrelic_rpm (~> 8.0)
nokogiri (~> 1.13.2)
nokogiri (~> 1.13.4)
octokit
parallel_tests
pg
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Expand Up @@ -15,7 +15,6 @@ ARTIFACT_DESTINATION_FILE ?= ./tmp/idp.tar.gz
brakeman \
build_artifact \
check \
check_asset_strings \
docker_setup \
fast_setup \
fast_test \
Expand Down Expand Up @@ -77,8 +76,6 @@ lint: ## Runs all lint tests
@echo "--- es5-safe ---"
NODE_ENV=production yarn build && yarn es5-safe
# Other
@echo "--- asset check ---"
make check_asset_strings
@echo "--- lint yaml ---"
make lint_yaml
@echo "--- check assets are optimized ---"
Expand Down Expand Up @@ -164,9 +161,6 @@ update_pinpoint_supported_countries: ## Updates list of countries supported by P
lint_country_dialing_codes: update_pinpoint_supported_countries ## Checks that countries supported by Pinpoint for voice and SMS are up to date
(! git diff --name-only | grep config/country_dialing_codes.yml) || (echo "Error: Run 'make update_pinpoint_supported_countries' to update country codes"; exit 1)

check_asset_strings: ## Checks for strings
find ./app/javascript -name "*.js*" | xargs ./scripts/check-assets

build_artifact $(ARTIFACT_DESTINATION_FILE): ## Builds zipped tar file artifact with IDP source code and Ruby/JS dependencies
@echo "Building artifact into $(ARTIFACT_DESTINATION_FILE)"
bundle config set --local cache_all true
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/components/_step-indicator.scss
Expand Up @@ -2,7 +2,8 @@ $step-indicator-current-step-border-width: 3px;
$step-indicator-line-height: 4px;
$step-indicator-pending-color: #a8b6c6;

.step-indicator {
lg-step-indicator {
display: block;
border-bottom: 1px solid color('primary-light');
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
margin-bottom: units(4);
Expand Down
Expand Up @@ -13,6 +13,10 @@
height: 4px;
width: 5rem;
}

&.troubleshooting-options--no-bar::before {
content: none;
}
}

.troubleshooting-options__heading {
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/all.scss
Expand Up @@ -5,6 +5,7 @@
@import 'card';
@import 'container';
@import 'file-input';
@import 'form-steps';
@import 'footer';
@import 'form';
@import 'hr';
Expand Down
3 changes: 0 additions & 3 deletions app/components/clipboard_button_component.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/components/clipboard_button_component.rb
Expand Up @@ -12,6 +12,6 @@ def call
end

def content
t('links.copy')
t('components.clipboard_button.label')
end
end
1 change: 1 addition & 0 deletions app/components/clipboard_button_component.ts
@@ -0,0 +1 @@
import '@18f/identity-clipboard-button';
13 changes: 11 additions & 2 deletions app/components/password_toggle_component.html.erb
@@ -1,5 +1,15 @@
<%= content_tag(:'lg-password-toggle', class: css_class) do %>
<%= render field if toggle_position == :bottom %>
<%= render ValidatedFieldComponent.new(
form: form,
name: :password,
type: :password,
label: label,
**field_options,
input_html: field_options[:input_html].to_h.merge(
id: input_id,
class: ['password-toggle__input', *field_options.dig(:input_html, :class)],
),
) %>
<div class="password-toggle__toggle-wrapper js">
<input
id="<%= toggle_id %>"
Expand All @@ -14,5 +24,4 @@
<%= toggle_label %>
</label>
</div>
<%= render field if toggle_position == :top %>
<% end %>
14 changes: 0 additions & 14 deletions app/components/password_toggle_component.rb
Expand Up @@ -29,18 +29,4 @@ def toggle_id
def input_id
"password-toggle-input-#{unique_id}"
end

def field
ValidatedFieldComponent.new(
form: form,
name: :password,
type: :password,
label: label,
**field_options,
input_html: field_options[:input_html].to_h.merge(
id: input_id,
class: ['password-toggle__input', *field_options.dig(:input_html, :class)],
),
)
end
end
15 changes: 15 additions & 0 deletions app/components/print_button_component.rb
@@ -0,0 +1,15 @@
class PrintButtonComponent < ButtonComponent
attr_reader :tag_options

def initialize(**tag_options)
super(**tag_options, type: :button, icon: :print)
end

def call
content_tag(:'lg-print-button', super)
end

def content
t('components.print_button.label')
end
end
1 change: 1 addition & 0 deletions app/components/print_button_component.ts
@@ -0,0 +1 @@
import '@18f/identity-print-button';
6 changes: 6 additions & 0 deletions app/components/troubleshooting_options_component.html.erb
@@ -1,4 +1,10 @@
<%= tag.section(**tag_options, class: css_class) do %>
<% if new_features? %>
<span class="usa-tag bg-accent-cool-darker text-uppercase display-inline-block">
<%= t('components.troubleshooting_options.new_feature') %>
</span>
<% end %>

<%= header %>
<ul class="troubleshooting-options__options">
<% options.each do |option| %>
Expand Down
15 changes: 12 additions & 3 deletions app/components/troubleshooting_options_component.rb
Expand Up @@ -4,16 +4,25 @@ class TroubleshootingOptionsComponent < BaseComponent

attr_reader :tag_options

def initialize(**tag_options)
@tag_options = tag_options
def initialize(new_features: false, **tag_options)
@new_features = new_features
@tag_options = tag_options.dup
end

def render?
options?
end

def new_features?
@new_features
end

def css_class
['troubleshooting-options', *tag_options[:class]]
[
'troubleshooting-options',
new_features? && 'troubleshooting-options--no-bar',
*tag_options[:class],
].select(&:present?)
end

class TroubleshootingOptionsHeadingComponent < BaseComponent
Expand Down
19 changes: 19 additions & 0 deletions app/controllers/concerns/mfa_setup_concern.rb
@@ -1,6 +1,25 @@
module MfaSetupConcern
extend ActiveSupport::Concern

def user_next_authentication_setup_path!(final_path = nil)
case user_session[:selected_mfa_options]&.shift
when 'voice', 'sms', 'phone'
phone_setup_url
when 'auth_app'
authenticator_setup_url
when 'piv_cac'
setup_piv_cac_url
when 'webauthn'
webauthn_setup_url
when 'webauthn_platform'
webauthn_setup_url(platform: true)
when 'backup_code'
backup_code_setup_url
else
final_path
end
end

def confirm_user_authenticated_for_2fa_setup
authenticate_user!(force: true)
return if user_fully_authenticated?
Expand Down
9 changes: 9 additions & 0 deletions app/controllers/concerns/render_condition_concern.rb
@@ -0,0 +1,9 @@
module RenderConditionConcern
extend ActiveSupport::Concern

module ClassMethods
def check_or_render_not_found(callable, **kwargs)
before_action(**kwargs) { render_not_found if !callable.call }
end
end
end
12 changes: 5 additions & 7 deletions app/controllers/event_disavowal_controller.rb
Expand Up @@ -4,19 +4,17 @@ class EventDisavowalController < ApplicationController
def new
# Memoize the form for use in the views
password_reset_from_disavowal_form
analytics.track_event(
Analytics::EVENT_DISAVOWAL,
FormResponse.new(
success: true,
extra: EventDisavowal::BuildDisavowedEventAnalyticsAttributes.call(disavowed_event),
).to_h,
result = FormResponse.new(
success: true,
extra: EventDisavowal::BuildDisavowedEventAnalyticsAttributes.call(disavowed_event),
)
analytics.event_disavowal(**result.to_h)
@forbidden_passwords = forbidden_passwords
end

def create
result = password_reset_from_disavowal_form.submit(password_reset_params)
analytics.track_event(Analytics::EVENT_DISAVOWAL_PASSWORD_RESET, result.to_h)
analytics.event_disavowal_password_reset(**result.to_h)
if result.success?
handle_successful_password_reset
else
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/idv/address_controller.rb
Expand Up @@ -6,12 +6,12 @@ class AddressController < ApplicationController
before_action :confirm_pii_from_doc

def new
analytics.track_event(Analytics::IDV_ADDRESS_VISIT)
analytics.idv_address_visit
end

def update
form_result = idv_form.submit(profile_params)
analytics.track_event(Analytics::IDV_ADDRESS_SUBMITTED, form_result.to_h)
analytics.idv_address_submitted(**form_result.to_h)
capture_address_edited(form_result)
if form_result.success?
success
Expand Down
1 change: 1 addition & 0 deletions app/controllers/idv/phone_controller.rb
Expand Up @@ -32,6 +32,7 @@ def new
def create
result = idv_form.submit(step_params)
analytics.track_event(Analytics::IDV_PHONE_CONFIRMATION_FORM, result.to_h)
flash[:error] = result.first_error_message if !result.success?
return render :new, locals: { gpo_letter_available: gpo_letter_available } if !result.success?
submit_proofing_attempt
redirect_to idv_phone_path
Expand Down
@@ -1,6 +1,7 @@
module TwoFactorAuthentication
class OtpVerificationController < ApplicationController
include TwoFactorAuthenticatable
include MfaSetupConcern

before_action :check_sp_required_mfa_bypass
before_action :confirm_multiple_factors_enabled
Expand All @@ -16,7 +17,11 @@ def create
result = OtpVerificationForm.new(current_user, sanitized_otp_code).submit
post_analytics(result)
if result.success?
handle_valid_otp
next_url = nil
if UserSessionContext.confirmation_context?(context)
next_url = user_next_authentication_setup_path!
end
handle_valid_otp(next_url)
else
handle_invalid_otp
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users/backup_code_setup_controller.rb
Expand Up @@ -25,7 +25,7 @@ def edit; end

def continue
flash[:success] = t('notices.backup_codes_configured')
redirect_to after_mfa_setup_path
redirect_to user_next_authentication_setup_path!(after_mfa_setup_path)
end

def download
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/email_language_controller.rb
Expand Up @@ -3,12 +3,12 @@ class EmailLanguageController < ApplicationController
before_action :confirm_two_factor_authenticated

def show
analytics.track_event(Analytics::EMAIL_LANGUAGE_VISITED)
analytics.email_language_visited
end

def update
form_response = UpdateEmailLanguageForm.new(current_user).submit(update_email_params)
analytics.track_event(Analytics::EMAIL_LANGUAGE_UPDATED, form_response.to_h)
analytics.email_language_updated(**form_response.to_h)

flash[:success] = I18n.t('account.email_language.updated') if form_response.success?

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users/emails_controller.rb
Expand Up @@ -43,7 +43,7 @@ def confirm_delete

def delete
result = DeleteUserEmailForm.new(current_user, email_address).submit
analytics.track_event(Analytics::EMAIL_DELETION_REQUEST, result.to_h)
analytics.email_deletion_request(**result.to_h)
if result.success?
handle_successful_delete
else
Expand Down
Expand Up @@ -103,7 +103,8 @@ def process_valid_submission
create_user_event(:piv_cac_enabled)
Funnel::Registration::AddMfa.call(current_user.id, 'piv_cac')
session[:needs_to_setup_piv_cac_after_sign_in] = false
redirect_to after_sign_in_path_for(current_user)
final_path = after_sign_in_path_for(current_user)
redirect_to user_next_authentication_setup_path!(final_path)
end

def piv_cac_enabled?
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users/totp_setup_controller.rb
Expand Up @@ -78,8 +78,8 @@ def process_valid_code
mark_user_as_fully_authenticated
handle_remember_device
flash[:success] = t('notices.totp_configured')
redirect_to after_mfa_setup_path
user_session.delete(:new_totp_secret)
redirect_to user_next_authentication_setup_path!(after_mfa_setup_path)
end

def handle_remember_device
Expand Down