Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
490e59d
Update cbor gem (#10281)
Mar 21, 2024
54cbde1
Remove unused and redundant alert icons (#10278)
aduth Mar 21, 2024
d9839df
Remove nonstandard and redundant icons for government banner (#10275)
aduth Mar 21, 2024
05ef804
LG-12771 Updated content on IdV Welcome screen (#10277)
jmax-gsa Mar 21, 2024
5927b1c
LG-12342 setup: Download files needed for selfie capture (#10273)
Mar 21, 2024
bdd2993
Bug fix: Hide the selfie hint box when there's no text. (#10274)
charleyf Mar 21, 2024
c56e894
LG-12058: reword two of the steps in the step indicator. (#10280)
solipet Mar 21, 2024
4d4f708
LG-12618: log the sp request components for enhanced idv events. (#10…
solipet Mar 21, 2024
3ffdd80
LG-12578 active non biometric user can sign in to non biometric sp SA…
theabrad Mar 22, 2024
2077353
add prometheus_exporter gem and feature flag (#10287)
timothy-spencer Mar 22, 2024
15fa2dc
Don't use stale document capture user ids for effective_user (#10293)
matthinz Mar 22, 2024
720d597
LG-12120: liveness inline error messages (#10284)
dawei-nava Mar 24, 2024
69a7642
Add GPO Proofing Event To Dropoff Report (#10288)
Jeremy1026 Mar 25, 2024
977a5de
Offload styles from main application stylesheet (#10285)
aduth Mar 25, 2024
b5fafcb
Remove prometheus_exporter from Procfile (#10296)
Mar 25, 2024
dfb19f6
Change robots to deny by default with allowlist (#10292)
aduth Mar 25, 2024
d0d68ff
Upgrade Login.gov Design System to 9.1.0 (#10299)
aduth Mar 25, 2024
7cb3e6d
Remove unused javascript_include_tag_without_preload (#10300)
aduth Mar 25, 2024
26b0aa1
LG-12268: Use Department of State translations for Face Match Fail (#…
eileen-nava Mar 25, 2024
20e762c
Rm ImageMagick files from download script (#10303)
Mar 25, 2024
25d82a4
Refactor AssetSources to be thread-safe (#10301)
Mar 25, 2024
6d02f2e
Refactor ScriptHelper class to be thread-safe (#10304)
Mar 25, 2024
83d39c4
LG-12061: All step indicator steps are shown completed on Personal Ke…
solipet Mar 25, 2024
f47a26f
Ensure that the pids directory is present for puma (#10308)
vrajmohan Mar 25, 2024
2358fb8
Analytics-related spec updates (#10309)
matthinz Mar 25, 2024
6391877
Order two_factor_enabled short-circuiting by usage (#10310)
aduth Mar 26, 2024
d617640
LG-12280: log image file name (#10295)
dawei-nava Mar 26, 2024
83ab9b1
Update How verifying your identity works copy (#10306)
theabrad Mar 26, 2024
bf24298
Revert "Refactor ScriptHelper class to be thread-safe (#10304)" (#10318)
Mar 26, 2024
1ad37ab
LG-12494: err gen method (#10294)
dawei-nava Mar 26, 2024
ba49f97
Use geolocation data if it exists (#10319)
aduth Mar 27, 2024
c08b76e
Revert "Ensure that the pids directory is present for puma (#10308)" …
Mar 27, 2024
8bcef0d
LG-12268: Fix bug in face match failure result copy (#10321)
eileen-nava Mar 27, 2024
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 Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ gem 'maxminddb'
gem 'multiset'
gem 'net-sftp'
gem 'newrelic_rpm', '~> 9.0'
gem 'prometheus_exporter'
gem 'puma', '~> 6.0'
gem 'pg'
gem 'phonelib'
Expand Down
5 changes: 4 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ GEM
marcel (~> 1.0)
nokogiri (~> 1.10, >= 1.10.4)
rubyzip (>= 1.3.0, < 3)
cbor (0.5.9.6)
cbor (0.5.9.8)
chunky_png (1.4.0)
coderay (1.1.3)
coercible (1.0.0)
Expand Down Expand Up @@ -473,6 +473,8 @@ GEM
net-smtp
premailer (~> 1.7, >= 1.7.9)
profanity_filter (0.1.1)
prometheus_exporter (2.1.0)
webrick
propshaft (0.7.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
Expand Down Expand Up @@ -813,6 +815,7 @@ DEPENDENCIES
phonelib
premailer-rails (>= 1.12.0)
profanity_filter
prometheus_exporter
propshaft
pry-byebug
pry-doc
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ lint_asset_bundle_size: ## Lints JavaScript and CSS compiled bundle size
@# and you have no options to split that from the common bundles. If you need to increase this
@# budget and accept the fact that this will force end-users to endure longer load times, you
@# should set the new budget to within a few thousand bytes of the production-compiled size.
find app/assets/builds/application.css -size -235000c | grep .
find app/assets/builds/application.css -size -220000c | grep .
find public/packs/js/application-*.digested.js -size -5000c | grep .

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

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/alert/unphishable.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/alert/warning.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/icon-dot-gov.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/icon-https.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/lock.svg

This file was deleted.

1 change: 1 addition & 0 deletions app/assets/stylesheets/_uswds-core.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@forward '@18f/identity-design-system/packages/uswds-core' with (
$theme-body-font-size: 'sm',
$theme-button-icon-gap: 0.5,
$theme-font-path: '',
$theme-image-path: '',
$theme-global-border-box-sizing: true,
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/_uswds.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
@forward 'usa-alert';
@forward 'usa-banner';
@forward 'usa-button';
@forward 'usa-collection';
@forward 'usa-form';
@forward 'usa-header';
@forward 'usa-layout-grid';
@forward 'usa-link';
@forward 'usa-list';
@forward 'usa-media-block';
@forward 'usa-modal';
@forward 'usa-nav';
@forward 'usa-process-list';
@forward 'usa-sidenav';
@forward 'usa-skipnav';
@forward 'usa-step-indicator';
@forward 'usa-tag';
@forward 'uswds-form-controls';
@forward 'uswds-utilities';
12 changes: 12 additions & 0 deletions app/assets/stylesheets/components/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@use 'uswds-core' as *;

.page-header--basic {
@include u-flex('align-center', 'justify-center');
@include u-display('flex');
@include u-height(7);
@include u-bg('primary-lighter');

@include at-media('tablet') {
@include u-height(9);
}
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@forward 'hr';
@forward 'language-picker';
@forward 'modal';
@forward 'nav';
@forward 'header';
@forward 'page-heading';
@forward 'profile-section';
@forward 'personal-key';
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/_step-indicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ lg-step-indicator {

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

.step-indicator__step:not(:last-child)::after {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
@use 'uswds-core' as *;

.page-header--basic {
@include u-flex('align-center', 'justify-center');
@include u-display('flex');
@include u-height(7);
@include u-bg('primary-lighter');

@include at-media('tablet') {
@include u-height(9);
}
}
@forward 'usa-nav/src/styles';
@forward 'usa-sidenav/src/styles';

.sidenav-mobile .usa-nav__close {
@include u-display('flex');
Expand Down
20 changes: 0 additions & 20 deletions app/components/icon_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,3 @@
mask-size: 100%;
background-color: currentColor;
}

$icon-min-padding: 2px;

// Upstream: https://github.com/uswds/uswds/pull/4493
.usa-icon {
.usa-button > &:first-child {
// Note: This diverges from the upstream pull request in a couple ways:
// 1. There should not be any margins offsetting to account for line height, since Login.gov
// Design System normalizes button line height to 1.
// 2. Float is replaced by `vertical-align`, since otherwise it will have the effect of having
// the icon appear to the far edge of the button, rather than next to the text.
vertical-align: bottom;
margin-right: 0.25rem;
}

.usa-button:not(.usa-button--unstyled) > &:first-child {
margin-left: -1 * $icon-min-padding;
margin-right: #{0.5rem - px-to-rem($icon-min-padding)};
}
}
4 changes: 4 additions & 0 deletions app/components/step_indicator_component.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class StepIndicatorComponent < BaseComponent
attr_reader :current_step, :locale_scope, :tag_options

ALL_STEPS_COMPLETE = :all_steps_complete

def initialize(steps:, current_step:, locale_scope: nil, **tag_options)
@steps = steps
@current_step = current_step
Expand All @@ -19,6 +21,8 @@ def steps
private

def step_status(step)
return :complete if current_step == ALL_STEPS_COMPLETE

if step[:name] == current_step
:current
elsif step_index(step[:name]) < step_index(current_step)
Expand Down
13 changes: 0 additions & 13 deletions app/components/tab_navigation_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

@forward 'usa-button-group/src/styles';

// Upstream: https://github.com/uswds/uswds/pull/5324
.usa-button-group--segmented {
.usa-button {
@include u-display('flex');
@include u-flex('align-center', 'justify-center');
}

.usa-button-group__item {
@include u-display('flex');
@include grid-col('auto');
}
}

.tab-navigation .usa-button-group--segmented {
.usa-button-group__item {
flex-basis: 50%;
Expand Down
10 changes: 9 additions & 1 deletion app/controllers/concerns/effective_user.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
module EffectiveUser
def effective_user
return current_user if effective_user_id == current_user&.id
return User.find_by(id: effective_user_id) if effective_user_id

user = User.find_by(id: effective_user_id) if effective_user_id

if user.nil?
session.delete(:doc_capture_user_id)
return current_user
end

user
end

private
Expand Down
11 changes: 9 additions & 2 deletions app/controllers/concerns/verify_profile_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ def url_for_pending_profile_reason
end

def user_has_pending_profile?
return false if current_user.blank?
current_user.pending_profile?
pending_profile_policy.user_has_pending_profile?
end

def pending_profile_policy
@pending_profile_policy ||= PendingProfilePolicy.new(
user: current_user,
resolved_authn_context_result: resolved_authn_context_result,
biometric_comparison_requested: nil,
)
end
end
6 changes: 1 addition & 5 deletions app/controllers/openid_connect/authorization_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AuthorizationController < ApplicationController
def index
if @authorize_form.ial2_or_greater?
return redirect_to reactivate_account_url if user_needs_to_reactivate_account?
return redirect_to url_for_pending_profile_reason if user_has_usable_pending_profile?
return redirect_to url_for_pending_profile_reason if user_has_pending_profile?
return redirect_to idv_url if identity_needs_verification?
return redirect_to idv_url if selfie_needed?
end
Expand All @@ -55,10 +55,6 @@ def pending_profile_policy
)
end

def user_has_usable_pending_profile?
pending_profile_policy.user_has_usable_pending_profile?
end

def block_biometric_requests_in_production
if biometric_comparison_requested? &&
!FeatureManagement.idv_allow_selfie_check?
Expand Down
25 changes: 25 additions & 0 deletions app/controllers/robots_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class RobotsController < ApplicationController
ALLOWED_ROUTES = %i[
new_user_session
forgot_password
sign_up_email
].to_set.freeze

def index
render plain: [
'User-agent: *',
'Disallow: /',
*allowed_paths.map { |path| "Allow: #{path}$" },
].join("\n")
end

private

def allowed_paths
I18n.available_locales.
map { |locale| locale == I18n.default_locale ? nil : locale }.
flat_map do |locale|
ALLOWED_ROUTES.map { |route| route_for(route, only_path: true, locale:) }
end
end
end
6 changes: 3 additions & 3 deletions app/decorators/mfa_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def two_factor_configurations

def two_factor_enabled?
return true if phone_configurations.any?(&:mfa_enabled?)
return true if piv_cac_configurations.any?(&:mfa_enabled?)
return true if auth_app_configurations.any?(&:mfa_enabled?)
return true if backup_code_configurations.any?(&:mfa_enabled?)
return true if webauthn_configurations.any?(&:mfa_enabled?)
return true if backup_code_configurations.any?(&:mfa_enabled?)
return true if auth_app_configurations.any?(&:mfa_enabled?)
return true if piv_cac_configurations.any?(&:mfa_enabled?)
return false
end

Expand Down
23 changes: 8 additions & 15 deletions app/helpers/script_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# rubocop:disable Rails/HelperInstanceVariable
module ScriptHelper
def javascript_include_tag_without_preload(...)
without_preload_links_header { javascript_include_tag(...) }
end

def javascript_packs_tag_once(*names, **attributes)
@scripts = @scripts.to_h.merge(names.index_with(attributes))
nil
Expand All @@ -19,12 +15,12 @@ def render_javascript_pack_once_tags(...)
return if @scripts.blank?
concat javascript_assets_tag
@scripts.each do |name, attributes|
AssetSources.get_sources(name).each do |source|
asset_sources.get_sources(name).each do |source|
concat javascript_include_tag(
source,
**attributes,
crossorigin: local_crossorigin_sources? ? true : nil,
integrity: AssetSources.get_integrity(source),
integrity: asset_sources.get_integrity(source),
)
end
end
Expand All @@ -37,12 +33,17 @@ def render_javascript_pack_once_tags(...)
sprite.svg
].to_set.freeze

def asset_sources
Rails.application.config.asset_sources
end

def local_crossorigin_sources?
Rails.env.development? && ENV['WEBPACK_PORT'].present?
end

def javascript_assets_tag
assets = AssetSources.get_assets(*@scripts.keys)
assets = asset_sources.get_assets(*@scripts.keys)

if assets.present?
asset_map = assets.index_with { |path| asset_path(path, host: asset_host(path)) }
content_tag(
Expand All @@ -54,14 +55,6 @@ def javascript_assets_tag
end
end

def without_preload_links_header
original_preload_links_header = ActionView::Helpers::AssetTagHelper.preload_links_header
ActionView::Helpers::AssetTagHelper.preload_links_header = false
result = yield
ActionView::Helpers::AssetTagHelper.preload_links_header = original_preload_links_header
result
end

def asset_host(path)
if IdentityConfig.store.asset_host.present?
if SAME_ORIGIN_ASSETS.include?(path)
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/packages/clipboard-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@18f/identity-design-system": "^9.0.0"
"@18f/identity-design-system": "^9.1.0"
},
"sideEffects": [
"./clipboard-button-element.ts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ interface ImageAnalyticsPayload {
*
*/
failedImageResubmission: boolean;

/**
* Image file name
*/
fileName?: string;
}

interface AcuantImageAnalyticsPayload extends ImageAnalyticsPayload {
Expand Down Expand Up @@ -408,8 +413,8 @@ function AcuantCapture(
source: 'upload',
size: nextValue.size,
failedImageResubmission: hasFailed,
fileName: nextValue.name,
});

trackEvent(
name === 'selfie' ? 'idv_selfie_image_added' : `IdV: ${name} image added`,
analyticsPayload,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ function AcuantSelfieCaptureCanvas({ imageCaptureText, onSelfieCaptureClosed })
<>
{!isReady && <LoadingSpinner />}
<div id={acuantCaptureContainerId} />
<p aria-live="assertive" className="document-capture-selfie-feedback">
{imageCaptureText}
<p aria-live="assertive">
{imageCaptureText && (
<span className="document-capture-selfie-feedback">{imageCaptureText}</span>
)}
</p>
<button type="button" onClick={onSelfieCaptureClosed} className="usa-sr-only">
{t('doc_auth.buttons.close')}
Expand Down
Loading