Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
316660b
Use secure_compare for OIDC code_challenge (#6226)
zachmargolis Apr 19, 2022
ed25003
LG-6160: Implement personal key confirmation modal "Back" button (#6219)
aduth Apr 20, 2022
65b1183
Remove custom camera icon implementation (#6218)
aduth Apr 20, 2022
3ccbdd2
LG-6159: add and place images in personal key step (#6221)
nprimak Apr 20, 2022
87dfefd
LG-6158: Use FullScreen component for modal component (#6220)
aduth Apr 20, 2022
fc418df
Document additional analytics events (LG-5928) (#6230)
zachmargolis Apr 20, 2022
d92c7af
Pin idp/ci to the current sha (#6228)
akrito Apr 20, 2022
e855581
Update testing-library/user-event to latest version (#6231)
aduth Apr 21, 2022
f5cab7a
LG-6160: Add personal key validation behavior (#6222)
aduth Apr 21, 2022
0d74232
LG-6199: Show current IdV app step as page title (#6232)
aduth Apr 21, 2022
adc0674
Drop unused account_recovery_requests_table (#6233)
Apr 21, 2022
4a53d68
Stop querying unused user columns (#6235)
Apr 21, 2022
db0eb46
Enable Rubocop Layout/SpaceAroundOperators (#6236)
aduth Apr 21, 2022
2fd36fc
LG-6102: Add CTA banner on sign in completions page to encourage user…
jmdembe Apr 22, 2022
79d3ab0
Split up "Account Reset" analytics event (LG-5910) (#6238)
zachmargolis Apr 22, 2022
db4c94a
Remove secure_headers gem (LG-6184) (#6234)
zachmargolis Apr 22, 2022
827a53b
Include "personal_key" as alertable key in analytics PiiDetector (#6241)
aduth Apr 22, 2022
6c7f3be
LG-6160: Validate personal key value as case-insensitive, Crockford b…
aduth Apr 22, 2022
05e4fed
Fix a typo on the completions page (#6244)
jmhooper Apr 22, 2022
ae50c8b
drop unused doc_auths table (#6245)
Apr 22, 2022
8b89bab
LG-5745 Can't use your phone? (#6242)
theabrad Apr 22, 2022
1f9b6d2
LG-6192 Add alert banner for successful completion of Password Entry…
nprimak Apr 22, 2022
4a67c1e
Fix validation of confirmation_token on both showing and submitting e…
Apr 25, 2022
a013ced
Remove unused EmailNotifier code (#6249)
Apr 25, 2022
efd33b2
Fix 500 error on sign up completions page (#6250)
Apr 27, 2022
de6f1f0
Update Rails to 6.1.5.1 (#6258)
aduth Apr 27, 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: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
variables:
GITLAB_CI: 'true'
ECR_REGISTRY: "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com"
IDP_CI_SHA: "sha256:8650f43d0e6d44729bff92657b59e511c874103ae6207b3c0781df042df6932f"

default:
image: "${ECR_REGISTRY}/idp/ci:latest"
image: "${ECR_REGISTRY}/idp/ci@${IDP_CI_SHA}"

.bundle_install: &bundle_install
- bundle check || bundle install --deployment --jobs=4 --retry=3 --without deploy development doc production --path vendor/ruby
Expand Down
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ Layout/SpaceAroundKeyword:
Layout/SpaceAroundMethodCallOperator:
Enabled: true

Layout/SpaceAroundOperators:
Enabled: true
EnforcedStyleForExponentOperator: space

Layout/SpaceBeforeBlockBraces:
Enabled: true
EnforcedStyle: space
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }

ruby "~> #{File.read('.ruby-version').strip}"

gem 'rails', '~> 6.1.4'
gem 'rails', '~> 6.1.5.1'

gem 'ahoy_matey', '~> 3.0'
gem 'aws-sdk-kms', '~> 1.4'
Expand Down Expand Up @@ -56,7 +56,6 @@ gem 'ruby-saml'
gem 'safe_target_blank', '>= 1.0.2'
gem 'saml_idp', github: '18F/saml_idp', tag: '0.16.0-18f'
gem 'scrypt'
gem 'secure_headers', '~> 6.3'
gem 'simple_form', '>= 5.0.2'
gem 'stringex', require: false
gem 'strong_migrations', '>= 0.4.2'
Expand Down
118 changes: 58 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,60 +39,60 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.4.7)
actionpack (= 6.1.4.7)
activesupport (= 6.1.4.7)
actioncable (6.1.5.1)
actionpack (= 6.1.5.1)
activesupport (= 6.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.4.7)
actionpack (= 6.1.4.7)
activejob (= 6.1.4.7)
activerecord (= 6.1.4.7)
activestorage (= 6.1.4.7)
activesupport (= 6.1.4.7)
actionmailbox (6.1.5.1)
actionpack (= 6.1.5.1)
activejob (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
mail (>= 2.7.1)
actionmailer (6.1.4.7)
actionpack (= 6.1.4.7)
actionview (= 6.1.4.7)
activejob (= 6.1.4.7)
activesupport (= 6.1.4.7)
actionmailer (6.1.5.1)
actionpack (= 6.1.5.1)
actionview (= 6.1.5.1)
activejob (= 6.1.5.1)
activesupport (= 6.1.5.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.4.7)
actionview (= 6.1.4.7)
activesupport (= 6.1.4.7)
actionpack (6.1.5.1)
actionview (= 6.1.5.1)
activesupport (= 6.1.5.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4.7)
actionpack (= 6.1.4.7)
activerecord (= 6.1.4.7)
activestorage (= 6.1.4.7)
activesupport (= 6.1.4.7)
actiontext (6.1.5.1)
actionpack (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
nokogiri (>= 1.8.5)
actionview (6.1.4.7)
activesupport (= 6.1.4.7)
actionview (6.1.5.1)
activesupport (= 6.1.5.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4.7)
activesupport (= 6.1.4.7)
activejob (6.1.5.1)
activesupport (= 6.1.5.1)
globalid (>= 0.3.6)
activemodel (6.1.4.7)
activesupport (= 6.1.4.7)
activerecord (6.1.4.7)
activemodel (= 6.1.4.7)
activesupport (= 6.1.4.7)
activestorage (6.1.4.7)
actionpack (= 6.1.4.7)
activejob (= 6.1.4.7)
activerecord (= 6.1.4.7)
activesupport (= 6.1.4.7)
marcel (~> 1.0.0)
activemodel (6.1.5.1)
activesupport (= 6.1.5.1)
activerecord (6.1.5.1)
activemodel (= 6.1.5.1)
activesupport (= 6.1.5.1)
activestorage (6.1.5.1)
actionpack (= 6.1.5.1)
activejob (= 6.1.5.1)
activerecord (= 6.1.5.1)
activesupport (= 6.1.5.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4.7)
activesupport (6.1.5.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -199,7 +199,7 @@ GEM
coderay (1.1.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
connection_pool (2.2.5)
cose (1.2.0)
cbor (~> 0.5.9)
Expand Down Expand Up @@ -360,7 +360,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.14.0)
loofah (2.16.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lru_redux (1.1.0)
Expand Down Expand Up @@ -448,20 +448,20 @@ GEM
rack_session_access (0.2.0)
builder (>= 2.0.0)
rack (>= 1.0.0)
rails (6.1.4.7)
actioncable (= 6.1.4.7)
actionmailbox (= 6.1.4.7)
actionmailer (= 6.1.4.7)
actionpack (= 6.1.4.7)
actiontext (= 6.1.4.7)
actionview (= 6.1.4.7)
activejob (= 6.1.4.7)
activemodel (= 6.1.4.7)
activerecord (= 6.1.4.7)
activestorage (= 6.1.4.7)
activesupport (= 6.1.4.7)
rails (6.1.5.1)
actioncable (= 6.1.5.1)
actionmailbox (= 6.1.5.1)
actionmailer (= 6.1.5.1)
actionpack (= 6.1.5.1)
actiontext (= 6.1.5.1)
actionview (= 6.1.5.1)
activejob (= 6.1.5.1)
activemodel (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
bundler (>= 1.15.0)
railties (= 6.1.4.7)
railties (= 6.1.5.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -480,11 +480,11 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.1.4.7)
actionpack (= 6.1.4.7)
activesupport (= 6.1.4.7)
railties (6.1.5.1)
actionpack (= 6.1.5.1)
activesupport (= 6.1.5.1)
method_source
rake (>= 0.13)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.6)
Expand Down Expand Up @@ -574,7 +574,6 @@ GEM
faraday (> 0.8, < 2.0)
scrypt (3.0.7)
ffi-compiler (>= 1.0, < 2.0)
secure_headers (6.3.3)
securecompare (1.0.0)
selenium-webdriver (4.1.0)
childprocess (>= 0.5, < 5.0)
Expand Down Expand Up @@ -752,7 +751,7 @@ DEPENDENCIES
rack-test (>= 1.1.0)
rack-timeout
rack_session_access (>= 0.2.0)
rails (~> 6.1.4)
rails (~> 6.1.5.1)
rails-controller-testing (>= 1.0.4)
rails-erd (>= 1.6.0)
redacted_struct
Expand All @@ -772,7 +771,6 @@ DEPENDENCIES
safe_target_blank (>= 1.0.2)
saml_idp!
scrypt
secure_headers (~> 6.3)
shoulda-matchers (~> 4.0)
simple_form (>= 5.0.2)
simplecov (~> 0.21.0)
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import 'form-steps';
@import 'footer';
@import 'form';
@import 'full-screen';
@import 'hr';
@import 'icon';
@import 'list';
Expand Down
4 changes: 1 addition & 3 deletions app/components/validated_field_component.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import { ValidatedField } from '@18f/identity-validated-field';

customElements.define('lg-validated-field', ValidatedField);
import '@18f/identity-validated-field';
8 changes: 2 additions & 6 deletions app/controllers/account_reset/cancel_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def show
return render :show unless token

result = AccountReset::ValidateCancelToken.new(token).call
track_event(result)
analytics.account_reset_cancel_token_validation(**result.to_h)

if result.success?
handle_valid_token
Expand All @@ -16,7 +16,7 @@ def show
def create
result = AccountReset::Cancel.new(session[:cancel_token]).call

track_event(result)
analytics.account_reset_cancel(**result.to_h)

handle_success if result.success?

Expand All @@ -25,10 +25,6 @@ def create

private

def track_event(result)
analytics.account_reset(**result.to_h)
end

def handle_valid_token
session[:cancel_token] = token
redirect_to url_for
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/account_reset/delete_account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def show
render :show and return unless token

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

if result.success?
handle_valid_token
Expand All @@ -16,7 +16,7 @@ def show
def delete
granted_token = session.delete(:granted_token)
result = AccountReset::DeleteAccount.new(granted_token).call
analytics.account_reset(**result.to_h.except(:email))
analytics.account_reset_delete(**result.to_h.except(:email))

if result.success?
handle_successful_deletion(result)
Expand Down
5 changes: 2 additions & 3 deletions app/controllers/account_reset/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class RequestController < ApplicationController
before_action :confirm_two_factor_enabled

def show
analytics.track_event(Analytics::ACCOUNT_RESET_VISIT)
analytics.account_reset_visit
end

def create
Expand All @@ -18,7 +18,7 @@ def create

def create_account_reset_request
response = AccountReset::CreateRequest.new(current_user).call
analytics.account_reset(**response.to_h.merge(analytics_attributes))
analytics.account_reset_request(**response.to_h, **analytics_attributes)
end

def confirm_two_factor_enabled
Expand All @@ -29,7 +29,6 @@ def confirm_two_factor_enabled

def analytics_attributes
{
event: 'request',
sms_phone: TwoFactorAuthentication::PhonePolicy.new(current_user).configured?,
totp: TwoFactorAuthentication::AuthAppPolicy.new(current_user).configured?,
piv_cac: TwoFactorAuthentication::PivCacPolicy.new(current_user).configured?,
Expand Down
30 changes: 4 additions & 26 deletions app/controllers/concerns/unconfirmed_user_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module UnconfirmedUserConcern

def find_user_with_confirmation_token
@confirmation_token = params.permit(:confirmation_token)[:confirmation_token]
@email_address = EmailConfirmationTokenValidator.email_address_from_token(@confirmation_token)
@email_address = EmailAddress.find_with_confirmation_token(@confirmation_token)
@user = @email_address&.user
end

Expand All @@ -29,24 +29,10 @@ def track_user_already_confirmed_event
end

def stop_if_invalid_token
return if @email_address.present?
hash = {
success: false,
errors: { confirmation_token: [t('errors.messages.confirmation_invalid_token')] },
user_id: nil,
}
analytics.track_event(Analytics::USER_REGISTRATION_EMAIL_CONFIRMATION, hash)
process_unsuccessful_confirmation
end

def process_confirmation
result = email_confirmation_token_validator.submit
analytics.track_event(Analytics::USER_REGISTRATION_EMAIL_CONFIRMATION, result.to_h)
if result.success?
process_successful_confirmation
else
process_unsuccessful_confirmation
end
return if result.success?
process_unsuccessful_confirmation
end

def email_confirmation_token_validator
Expand All @@ -71,17 +57,9 @@ def process_unsuccessful_confirmation

def unsuccessful_confirmation_error
if email_confirmation_token_validator.confirmation_period_expired?
confirmation_period_expired_error
t('errors.messages.confirmation_period_expired')
else
t('errors.messages.confirmation_invalid_token')
end
end

def confirmation_period_expired_error
current_time = Time.zone.now
confirmation_period = distance_of_time_in_words(
current_time, current_time + Devise.confirm_within, true, accumulate_on: :hours
)
I18n.t('errors.messages.confirmation_period_expired', period: confirmation_period)
end
end
1 change: 1 addition & 0 deletions app/controllers/concerns/verify_sp_attributes_concern.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module VerifySpAttributesConcern
def needs_completion_screen_reason
return nil if sp_session[:issuer].blank?
return nil if sp_session[:request_url].blank?

if sp_session_identity.nil?
:new_sp
Expand Down
Loading