Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ GEM
pg (1.5.9)
pg_query (5.1.0)
google-protobuf (>= 3.22.3)
phonelib (0.10.4)
phonelib (0.10.5)
pkcs11 (0.3.4)
premailer (1.27.0)
addressable
Expand Down
8 changes: 5 additions & 3 deletions app/components/password_strength_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
<div class="password-strength__meter-bar"></div>
<div class="password-strength__meter-bar"></div>
</div>
<%= t('instructions.password.strength.intro') %>
<span class="password-strength__strength"></span>
<div class="password-strength__feedback"></div>
<div id="password-strength">
<%= t('instructions.password.strength.intro') %>
<span class="password-strength__strength"></span>
<div class="password-strength__feedback"></div>
</div>
<% end %>
23 changes: 14 additions & 9 deletions app/controllers/concerns/idv/doc_auth_vendor_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ module DocAuthVendorConcern

# @returns[String] String identifying the vendor to use for doc auth.
def doc_auth_vendor
if resolved_authn_context_result.facial_match? || socure_user_set.maxed_users?
bucket = choose_non_socure_bucket
else
bucket = ab_test_bucket(:DOC_AUTH_VENDOR)
end
document_capture_session.doc_auth_vendor || begin
if resolved_authn_context_result.facial_match? || socure_user_set.maxed_users?
bucket = choose_non_socure_bucket
else
bucket = ab_test_bucket(:DOC_AUTH_VENDOR)
end

if bucket == :socure
if !add_user_to_socure_set
bucket = choose_non_socure_bucket # force to lexis_nexis if max user reached
if bucket == :socure
if !add_user_to_socure_set
bucket = choose_non_socure_bucket # force to lexis_nexis if max user reached
end
end

doc_auth_vendor_for_bucket = DocAuthRouter.doc_auth_vendor_for_bucket(bucket)
document_capture_session.update!(doc_auth_vendor: doc_auth_vendor_for_bucket)
doc_auth_vendor_for_bucket
end
DocAuthRouter.doc_auth_vendor_for_bucket(bucket)
end

def doc_auth_vendor_enabled?(vendor)
Expand Down
11 changes: 10 additions & 1 deletion app/controllers/concerns/idv_step_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module IdvStepConcern
include FraudReviewConcern
include Idv::AbTestAnalyticsConcern
include Idv::VerifyByMailConcern
include Idv::DocAuthVendorConcern

included do
before_action :confirm_two_factor_authenticated
Expand Down Expand Up @@ -71,7 +72,15 @@ def confirm_hybrid_handoff_needed
# available when the user tries to redo document capture.
if idv_session.skip_hybrid_handoff? || !FeatureManagement.idv_allow_hybrid_flow?
idv_session.flow_path = 'standard'
redirect_to idv_document_capture_url
redirect_to vendor_document_capture_url
end
end

def vendor_document_capture_url
if doc_auth_vendor == Idp::Constants::Vendors::SOCURE
idv_socure_document_capture_url
else
idv_document_capture_url
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def update
if result.success?
redirect_to idv_ssn_url
else
redirect_to idv_document_capture_url
redirect_to vendor_document_capture_url
end
end

Expand Down
7 changes: 7 additions & 0 deletions app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,12 @@ def set_how_to_verify_presenter
def mobile_required?
idv_session.selfie_check_required || doc_auth_vendor == Idp::Constants::Vendors::SOCURE
end

def document_capture_session
return @document_capture_session if defined?(@document_capture_session)
@document_capture_session = DocumentCaptureSession.find_by(
uuid: idv_session.document_capture_session_uuid,
)
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def update_document_capture_session_requested_at(session_uuid)

def bypass_send_link_steps
idv_session.flow_path = 'standard'
redirect_to idv_document_capture_url
redirect_to vendor_document_capture_url

analytics.idv_doc_auth_hybrid_handoff_submitted(
**analytics_arguments.merge(
Expand Down
6 changes: 0 additions & 6 deletions app/controllers/idv/hybrid_mobile/entry_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ def update_sp_session
end

def validate_document_capture_session_id
if document_capture_session_uuid.blank?
# If we've already gotten a document capture user id previously, just continue
# processing and (eventually) redirect the user where they're supposed to be.
return true if document_capture_user_id
end

result = Idv::DocumentCaptureSessionForm.new(document_capture_session_uuid).submit

if result.success?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def show
redirect_to idv_hybrid_mobile_capture_complete_url
end

analytics.idv_doc_auth_document_capture_visited(**analytics_arguments)
session[:socure_docv_wait_polling_started_at] = nil

Funnel::DocAuth::RegisterStep.new(document_capture_user.id, sp_session[:issuer])
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/idv/image_uploads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

module Idv
class ImageUploadsController < ApplicationController
include DocAuthVendorConcern

respond_to :json

def create
Expand All @@ -22,7 +20,6 @@ def create
def image_upload_form
@image_upload_form ||= Idv::ApiImageUploadForm.new(
params,
doc_auth_vendor:,
acuant_sdk_upgrade_ab_test_bucket: ab_test_bucket(:ACUANT_SDK),
service_provider: current_sp,
analytics: analytics,
Expand Down
1 change: 1 addition & 0 deletions app/controllers/idv/socure/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class DocumentCaptureController < ApplicationController
before_action :fetch_test_verification_data, only: [:update]

def show
analytics.idv_doc_auth_document_capture_visited(**analytics_arguments)
idv_session.socure_docv_wait_polling_started_at = nil

Funnel::DocAuth::RegisterStep.new(current_user.id, sp_session[:issuer])
Expand Down
4 changes: 1 addition & 3 deletions app/forms/idv/api_image_upload_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ class ApiImageUploadForm
def initialize(
params,
service_provider:,
doc_auth_vendor:,
acuant_sdk_upgrade_ab_test_bucket:,
analytics: nil,
uuid_prefix: nil,
liveness_checking_required: false
)
@params = params
@service_provider = service_provider
@doc_auth_vendor = doc_auth_vendor
@acuant_sdk_upgrade_ab_test_bucket = acuant_sdk_upgrade_ab_test_bucket
@analytics = analytics
@readable = {}
Expand Down Expand Up @@ -328,7 +326,7 @@ def document_capture_session_uuid

def doc_auth_client
@doc_auth_client ||= DocAuthRouter.client(
vendor: @doc_auth_vendor,
vendor: document_capture_session.doc_auth_vendor,
warn_notifier: proc do |attrs|
analytics&.doc_auth_warning(
**attrs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ describe('PasswordStrengthElement', () => {
expect(input.validity.valid).to.be.false();
});

it('updates the password aria-describedby attribute', async () => {
createElement();

const input: HTMLInputElement = screen.getByRole('textbox');

await userEvent.type(input, 'password');
expect(input.getAttribute('aria-describedby')).to.equal('password-strength ');

await userEvent.clear(input);
expect(input.getAttribute('aria-describedby')).to.equal('');
});

it('shows concatenated suggestions from zxcvbn if there is no specific warning', async () => {
createElement();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,29 @@ class PasswordStrengthElement extends HTMLElement {
*/
#handleValueChange() {
const hasValue = !!this.input.value;
const inputDescribedBy = this.input.getAttribute('aria-describedby');
this.classList.toggle('display-none', !hasValue);
this.removeAttribute('score');
if (hasValue) {
const result = zxcvbn(this.input.value, this.forbiddenPasswords);
const score = this.#getNormalizedScore(result);
this.setAttribute('score', String(score));
if (!inputDescribedBy?.includes('password-strength')) {
this.input.setAttribute(
'aria-describedby',
['password-strength', inputDescribedBy].join(' '),
);
}
this.input.setCustomValidity(
this.#isValid(result) ? '' : t('errors.messages.stronger_password'),
);
this.strength.textContent = this.#getStrengthLabel(score);
this.feedback.textContent = this.#getNormalizedFeedback(result);
} else if (inputDescribedBy) {
this.input.setAttribute(
'aria-describedby',
inputDescribedBy.replace(/\s*password-strength\s*/, ''),
);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/reports/ab_tests_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AbTestsReport < BaseReport

def initialize(report_date = nil, *args, **kwargs)
@report_date = report_date
super(*args, **kwargs)
super(report_date, *args, **kwargs)
end

# @param [DateTime]
Expand Down
9 changes: 0 additions & 9 deletions app/presenters/update_password_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ def forbidden_passwords
end.uniq
end

def aria_described_by_if_eligible
return {} if required_password_change?
{
input_html: {
aria: { describedby: 'password-description' },
},
}
end

def submit_text
if required_password_change?
I18n.t('forms.passwords.edit.buttons.submit')
Expand Down
1 change: 1 addition & 0 deletions app/views/accounts/_connected_app.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'account.connected_apps.associated_attributes_html',
timestamp_html: render(TimeComponent.new(time: identity.created_at)),
) %>
<br>
<strong>
<%= identity.email_address&.email || t('account.connected_apps.email_not_selected') %>
</strong>
Expand Down
4 changes: 3 additions & 1 deletion app/views/users/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
form: f,
password_label: t('forms.passwords.edit.labels.password'),
forbidden_passwords: @update_password_presenter.forbidden_passwords,
field_options: @update_password_presenter.aria_described_by_if_eligible,
field_options: {
input_html: { aria: { describedby: 'password-description' } },
},
) %>
<%= f.submit @update_password_presenter.submit_text, class: 'display-block margin-top-5 margin-bottom-4' %>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ identity_pki_local_dev: false
idv_account_verified_email_campaign_id: '20241028'
idv_acuant_sdk_upgrade_a_b_testing_enabled: false
idv_acuant_sdk_upgrade_a_b_testing_percent: 50
idv_acuant_sdk_version_alternate: '11.9.2'
idv_acuant_sdk_version_default: '11.9.3'
idv_acuant_sdk_version_alternate: '11.9.3'
idv_acuant_sdk_version_default: '11.9.3.508'
idv_attempt_window_in_hours: 6
idv_available: true
idv_contact_phone_number: (844) 555-5555
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddDocAuthVendorToDocumentCaptureSessionsWComment < ActiveRecord::Migration[7.2]
def up
add_column :document_capture_sessions, :doc_auth_vendor, :string, comment: 'sensitive=false'
end

def down
remove_column :document_capture_sessions, :doc_auth_vendor
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[8.0].define(version: 2025_02_07_144037) do
ActiveRecord::Schema[8.0].define(version: 2025_02_19_164618) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "pg_catalog.plpgsql"
Expand Down Expand Up @@ -200,6 +200,7 @@
t.string "last_doc_auth_result", comment: "sensitive=false"
t.string "socure_docv_transaction_token", comment: "sensitive=false"
t.string "socure_docv_capture_app_url", comment: "sensitive=false"
t.string "doc_auth_vendor", comment: "sensitive=false"
t.index ["result_id"], name: "index_document_capture_sessions_on_result_id"
t.index ["socure_docv_transaction_token"], name: "index_socure_docv_transaction_token", unique: true
t.index ["user_id"], name: "index_document_capture_sessions_on_user_id"
Expand Down
1 change: 0 additions & 1 deletion public/acuant/11.9.2/AcuantCamera.min.js

This file was deleted.

261 changes: 0 additions & 261 deletions public/acuant/11.9.2/AcuantPassiveLiveness.min.js

This file was deleted.

Loading