Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2ca69a6
Latest logo for the Small Business Administration
solipet Jul 30, 2018
fe67c4b
Merge pull request #1 from USSBA/sba-logo
solipet Jul 30, 2018
69652ac
LG-508 Add client-side Crockford Base32 encoding helper
mryenq Aug 7, 2018
3d44a12
LG-508 Add client-side Crockford Base32 encoding helper
mryenq Aug 7, 2018
b58d77f
[LG-423] Redirect piv/cac errors to cleanup url
jgsmith-usds Jul 25, 2018
f400abe
Tear down code for phone profile verification (#2369)
jmhooper Aug 13, 2018
94a99f5
Ignore old personal key columns (#2338)
jmhooper Aug 13, 2018
823187a
Merge pull request #2417 from 18F/mryenq-add-base32-crockford-encode-…
mryenq Aug 14, 2018
c9ceeb9
LG-555 Fix border radius on Account boxes
mryenq Aug 14, 2018
b8114c7
Merge pull request #2427 from 18F/mryenq-fix-account-section-border-r…
mryenq Aug 14, 2018
0eae726
[LG-487] piv/cac available based on email domain
jgsmith-usds Aug 14, 2018
46925f3
Track additional IdV analytics
monfresh Aug 14, 2018
588b666
LG-544 Prevent calling unsupported countries
monfresh Aug 11, 2018
f65339e
Merge pull request #2431 from 18F/mb-analytics-calls-come-first
monfresh Aug 14, 2018
d12893c
LG-554 Fix already authenticated users getting redirected to account …
stevegsa Aug 14, 2018
703eb29
Merge pull request #2426 from 18F/stevegsa-fix-already-authenticated-…
stevegsa Aug 15, 2018
25e3cc9
Update redirect_uri list for OIDC Sinatra dev app
monfresh Aug 15, 2018
45f221b
Merge pull request #2433 from 18F/mb-update-sp-yaml
monfresh Aug 15, 2018
6a479b3
LG-562 Add a redirect_uri for logout with the CBP ROAM SP
stevegsa Aug 15, 2018
916242e
LG43 remove equifax from application (#2434)
gregory-casamento Aug 15, 2018
42808f2
Merge pull request #2429 from 18F/jgs/lg-487-offer-piv-cac-for-email-…
jgsmith-usds Aug 15, 2018
a20cb77
Merge pull request #2435 from 18F/stevegsa-add-logout-uri-for-cbp-roam
stevegsa Aug 15, 2018
b1641ff
LG-559 Allow sign in via remember me after idling
monfresh Aug 15, 2018
66ee7b6
LG-460 Display fake banner in lower environments.
gregory-casamento Aug 7, 2018
8bb8df8
Merge pull request #2423 from 18F/mb-send-sms-when-voice-not-supported
monfresh Aug 16, 2018
31da629
Merge pull request #2418 from 18F/gregc-LG460-create-more-visible-banner
monfresh Aug 17, 2018
4c5e97b
Merge pull request #2438 from 18F/mb-fix-csp-on-sign-in
monfresh Aug 17, 2018
41f7315
Merge pull request #2380 from 18F/jgs/lg-423-redirect-to-view-for-piv…
jgsmith-usds Aug 20, 2018
87c07ed
Use 2-letter phone country code for analytics
monfresh Aug 20, 2018
d1ad069
Merge pull request #2442 from 18F/mb-country-code-analytics
monfresh Aug 20, 2018
bc63c29
Refactor and fix account reset requests
monfresh Aug 21, 2018
b037a0a
Add separate OtpDeliveryMethodForm for IdV (#2440)
jmhooper Aug 21, 2018
be1ef71
Merge pull request #2444 from 18F/mb-account-reset-create-refactor
monfresh Aug 21, 2018
a9eff3e
Merge pull request #2393 from USSBA/master
monfresh Aug 21, 2018
c4a6c5f
[LG-256] Add spinner when presenting piv/cac cert
jgsmith-usds Jun 19, 2018
6b3fd20
Merge pull request #2258 from 18F/jgs/lg-256-show-spinner-during-cert…
jgsmith-usds Aug 21, 2018
98b457b
LG-582 Add a logout redirect uri for the Trusted Traveler Program SP
stevegsa Aug 21, 2018
9d04b7c
Merge pull request #2446 from 18F/stevegsa-add-logout-redirect-uri-fo…
stevegsa Aug 22, 2018
32dd6f6
Fix a flickering spec in the OTP rate limiter (#2448)
jmhooper Aug 22, 2018
5f06c5e
[LG-487] Email based Suggesting scoped by agency (#2443)
jgsmith-usds Aug 22, 2018
30e2188
LG-568 removing text and adjusting header on phone confirmation (#2445)
donjo Aug 22, 2018
32c9947
Copy phone info to new table sans crypto (#2449)
jgsmith-usds Aug 22, 2018
02a9db1
Remove proofer initializer (#2447)
jmhooper Aug 23, 2018
0a46749
[LG-500] Read phone configuration from table (#2441)
jgsmith-usds Aug 23, 2018
3a3539c
[LG-487] Scope piv/cac push by SP/email (#2455)
jgsmith-usds Aug 24, 2018
349d7eb
LG-557 Update LOA3 'failure to proof' screens
stevegsa Aug 24, 2018
b7feba9
Merge pull request #2454 from 18F/stevegsa-update-loa3-failure-to-pro…
stevegsa Aug 26, 2018
20aa6ab
LG-604 Add RRB LOA3 SP to Production
stevegsa Aug 27, 2018
fe36dfd
Merge pull request #2457 from 18F/stevegsa-add-rrb-loa3-sp-to-prod
stevegsa Aug 27, 2018
38f3543
Change return to sp url for RRB LOA3 in Production
stevegsa Aug 27, 2018
3527a71
Merge pull request #2459 from 18F/stevegsa-add-rrb-loa3-sp-to-prod-2
stevegsa Aug 27, 2018
cccd9ed
Merge branch 'master' into stages/rc-2018-08-30
jgsmith-usds Aug 27, 2018
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: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
cp certs/saml2018.crt.example certs/saml2018.crt
cp keys/saml.key.enc.example keys/saml.key.enc
cp keys/saml2018.key.enc.example keys/saml2018.key.enc
bin/generate-example-keys
bundle exec rake db:setup --trace
bundle exec rake assets:precompile

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Vagrantfile
/keys/*.key.enc
!/keys/*.key.enc.example
/keys/equifax_rsa
/keys/equifax_rsa.pub
/keys/equifax_gpg.pub.bin
/keys/equifax_rsa.pub
/coverage
/db/*.sqlite3
/doc/search_stats.csv
Expand All @@ -60,6 +60,7 @@ Vagrantfile
/vendor/bundle

saml_*.txt
saml_*.shr

# This is a hack to keep the files that are added to the repo and to prevent git from worrying about
# new (transient) files that may be created in those dirs.
Expand Down
3 changes: 0 additions & 3 deletions .reek
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ DuplicateMethodCall:
- UserFlowExporter#self.massage_assets
- BasicAuthUrl#build
- fallback_to_english
- Idv::Proofer#load_vendors!
- Upaya::RandomTools#self.random_weighted_sample
- SmsController#authenticate
FeatureEnvy:
Expand Down Expand Up @@ -46,7 +45,6 @@ FeatureEnvy:
- UserEncryptedAttributeOverrides#find_with_email
- Utf8Sanitizer#event_attributes
- Utf8Sanitizer#remote_ip
- Idv::Proofer#validate_vendors
- TwoFactorAuthenticationController#capture_analytics_for_exception
- Users::SessionsController#configure_permitted_parameters
- UspsConfirmationExporter#make_entry_row
Expand Down Expand Up @@ -105,7 +103,6 @@ TooManyStatements:
- UserFlowExporter#self.massage_html
- UserFlowExporter#self.run
- Idv::Agent#proof
- Idv::Proofer#configure_vendors
- Idv::VendorResult#initialize
- SamlIdpController#auth
- Upaya::QueueConfig#self.choose_queue_adapter
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,5 @@ end

group :production do
gem 'aamva', git: 'git@github.com:18F/identity-aamva-api-client-gem', tag: 'v3.1.0'
gem 'equifax', git: 'git@github.com:18F/identity-equifax-api-client-gem.git', tag: 'v1.1.0'
gem 'lexisnexis', git: 'git@github.com:18F/identity-lexisnexis-api-client-gem', tag: 'v1.1.0'
end
15 changes: 0 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@ GIT
httpi
xmldsig

GIT
remote: git@github.com:18F/identity-equifax-api-client-gem.git
revision: de4258c7608997f72e119b16718eeead4d39db70
tag: v1.1.0
specs:
equifax (1.1.0)
activesupport
dotenv
gyoku
hashie
logger
savon

GIT
remote: git@github.com:18F/identity-lexisnexis-api-client-gem
revision: d17049ab1a03d50c0cc8a272d86cf2144192fab5
Expand Down Expand Up @@ -350,7 +337,6 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
logger (1.2.8)
lograge (0.10.0)
actionpack (>= 4)
activesupport (>= 4)
Expand Down Expand Up @@ -694,7 +680,6 @@ DEPENDENCIES
devise (~> 4.1)
dotiw
email_spec
equifax!
exception_notification
factory_bot_rails
fakefs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ it into the "Index pattern" field, then click the "Next step" button.
10. On `Step 2 of 2: Configure settings`, select `@timestamp` from the
`Time Filter field name` dropdown, then click "Create index pattern".

11. Create some more events on the IdP app
11. Create some more events on the IdP app.

12. Refresh the Kibana website. You should now see new events show up in the
Discover section.
Expand Down
1 change: 1 addition & 0 deletions app/assets/images/carat-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/sp-logos/sba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/_profile-section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
border-bottom: $border-width solid $border-color;
border-radius: 0;
margin-bottom: 0;
overflow: hidden;

.bg-lightest-blue img {
margin-top: -2px;
Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/components/_spinner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.spinner {
margin-left: auto;
margin-right: auto;
width: 144px;
}
2 changes: 2 additions & 0 deletions app/assets/stylesheets/components/_util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

.invisible { visibility: hidden; }

.hidden { display: none; }

.truncate-inline {
max-width: 80%;
overflow: hidden;
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 @@ -23,6 +23,7 @@
@import 'accordion';
@import 'util';
@import 'verification-badge';
@import 'spinner';

@import 'space-addon';
@import 'space-misc';
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/variables/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $line-height: 1.5 !default;
$bold-font-weight: bold !default;
$heading-font-family: $serif-font-family !default;
$heading-font-weight: bold !default;
$heading-line-height: 1.3 !default;
$heading-line-height: 1.5 !default;
$caps-letter-spacing: 1px !default;

$line-height-0: .75 !default; // For when a tighter-than-normal leading is desired.
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/account_reset/confirm_request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ def show
if email.blank?
redirect_to root_url
else
render :show, locals: { email: email }
render :show, locals: {
email: email, sms_phone: SmsLoginOptionPolicy.new(current_user).configured?
}
sign_out
end
end
end
Expand Down
49 changes: 19 additions & 30 deletions app/controllers/account_reset/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ class RequestController < ApplicationController
before_action :confirm_two_factor_enabled
before_action :confirm_user_not_verified

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

def create
analytics.track_event(Analytics::ACCOUNT_RESET, event: :request)
create_request
send_notifications
reset_session_with_email
analytics.track_event(Analytics::ACCOUNT_RESET, analytics_attributes)
AccountReset::CreateRequest.new(current_user).call
flash[:email] = current_user.email
redirect_to account_reset_confirm_request_url
end

Expand All @@ -22,36 +23,24 @@ def check_account_reset_enabled
redirect_to root_url unless FeatureManagement.account_reset_enabled?
end

def confirm_user_not_verified
# IAL2 users should not be able to reset account to comply with AAL2 reqs
redirect_to account_url if decorated_user.identity_verified?
end

def reset_session_with_email
email = current_user.email
sign_out
flash[:email] = email
end
def confirm_two_factor_enabled
return if current_user.two_factor_enabled?

def send_notifications
phone = current_user.phone
if phone
SmsAccountResetNotifierJob.perform_now(
phone: phone,
cancel_token: current_user.account_reset_request.request_token
)
end
UserMailer.account_reset_request(current_user).deliver_later
redirect_to two_factor_options_url
end

def create_request
AccountResetService.new(current_user).create_request
def confirm_user_not_verified
# IAL2 users should not be able to reset account to comply with AAL2 reqs
redirect_to account_url if decorated_user.identity_verified?
end

def confirm_two_factor_enabled
return if current_user.two_factor_enabled?

redirect_to phone_setup_url
def analytics_attributes
{
event: 'request',
sms_phone: SmsLoginOptionPolicy.new(current_user).configured?,
totp: AuthAppLoginOptionPolicy.new(current_user).configured?,
piv_cac: PivCacLoginOptionPolicy.new(current_user).configured?,
}
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def service_provider_request
end

def after_sign_in_path_for(_user)
user_session[:stored_location] || sp_session[:request_url] || signed_in_url
user_session.delete(:stored_location) || sp_session[:request_url] || signed_in_url
end

def signed_in_url
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/account_recoverable.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module AccountRecoverable
def piv_cac_enabled_but_not_phone_enabled?
current_user.piv_cac_enabled? && !current_user.phone_enabled?
current_user.piv_cac_enabled? && !current_user.phone_configuration&.mfa_enabled?
end
end
2 changes: 1 addition & 1 deletion app/controllers/concerns/authorizable.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Authorizable
def authorize_user
return unless current_user.phone_enabled?
return unless current_user.phone_configuration&.mfa_enabled?

if user_fully_authenticated?
redirect_to account_url
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/idv_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module IdvSession
extend ActiveSupport::Concern

def confirm_idv_session_started
return if current_user.decorate.needs_profile_usps_verification?
return if current_user.decorate.pending_profile_requires_verification?
redirect_to idv_session_url if idv_session.params.blank?
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/phone_confirmation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ def prompt_to_confirm_phone(phone:, context: 'confirmation', selected_delivery_m
def otp_delivery_method(phone, selected_delivery_method)
return :sms if PhoneNumberCapabilities.new(phone).sms_only?
return selected_delivery_method if selected_delivery_method.present?
current_user.otp_delivery_preference
current_user.phone_configuration&.delivery_preference || current_user.otp_delivery_preference
end
end
12 changes: 6 additions & 6 deletions app/controllers/concerns/two_factor_authenticatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def current_password_required?
def check_already_authenticated
return unless initial_authentication_context?

redirect_to account_url if user_fully_authenticated?
redirect_to after_otp_verification_confirmation_url if user_fully_authenticated?
end

def reset_attempt_count_if_user_no_longer_locked_out
Expand Down Expand Up @@ -140,7 +140,7 @@ def assign_phone
end

def old_phone
current_user.phone
current_user.phone_configuration&.phone
end

def phone_changed
Expand Down Expand Up @@ -260,7 +260,7 @@ def authenticator_view_data
two_factor_authentication_method: two_factor_authentication_method,
user_email: current_user.email,
remember_device_available: false,
phone_enabled: current_user.phone_enabled?,
phone_enabled: current_user.phone_configuration&.mfa_enabled?,
}.merge(generic_data)
end

Expand All @@ -282,7 +282,7 @@ def display_phone_to_deliver_to

def voice_otp_delivery_unsupported?
phone_number = if authentication_context?
current_user.phone
current_user.phone_configuration&.phone
else
user_session[:unconfirmed_phone]
end
Expand All @@ -297,15 +297,15 @@ def reenter_phone_number_path
locale = LinkLocaleResolver.locale
if idv_context?
idv_phone_path(locale: locale)
elsif current_user.phone.present?
elsif current_user.phone_configuration.present?
manage_phone_path(locale: locale)
else
phone_setup_path(locale: locale)
end
end

def confirmation_for_phone_change?
confirmation_context? && current_user.phone.present?
confirmation_context? && current_user.phone_configuration.present?
end

def presenter_for_two_factor_authentication_method
Expand Down
13 changes: 2 additions & 11 deletions app/controllers/concerns/verify_profile_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@ def account_or_verify_profile_url

def account_or_verify_profile_route
return 'account' if idv_context? || profile_context?
return 'account' unless current_user.decorate.pending_profile_requires_verification?
verify_profile_route
end

def verify_profile_route
decorated_user = current_user.decorate
if decorated_user.needs_profile_phone_verification?
flash[:notice] = t('account.index.verification.instructions')
return 'verify_profile_phone'
end
return 'verify_account' if decorated_user.needs_profile_usps_verification?
return 'account' unless profile_needs_verification?
'verify_account'
end

def profile_needs_verification?
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/idv/cancellations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class CancellationsController < ApplicationController
before_action :confirm_idv_needed

def new
analytics.track_event(Analytics::IDV_CANCELLATION)
properties = ParseControllerFromReferer.new(request.referer).call
analytics.track_event(Analytics::IDV_CANCELLATION, properties)
@presenter = CancellationPresenter.new(view_context: view_context)
end

Expand Down
6 changes: 4 additions & 2 deletions app/controllers/idv/come_back_later_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ class ComeBackLaterController < ApplicationController

before_action :confirm_user_needs_usps_confirmation

def show; end
def show
analytics.track_event(Analytics::IDV_COME_BACK_LATER_VISIT)
end

private

def confirm_user_needs_usps_confirmation
redirect_to account_url unless current_user.decorate.needs_profile_usps_verification?
redirect_to account_url unless current_user.decorate.pending_profile_requires_verification?
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/idv/confirmations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def confirm_profile_has_been_created
def track_final_idv_event
result = {
success: true,
new_phone_added: idv_session.params['phone'] != current_user.phone,
new_phone_added: idv_session.params['phone'] != current_user.phone_configuration&.phone,
}
analytics.track_event(Analytics::IDV_FINAL, result)
end
Expand Down
Loading