From d31954ececbd9c43ece373df48513e473fe12f2c Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 16:10:46 -0400 Subject: [PATCH 01/19] Document standard FormResponse analytics consistently changelog: Internal, Analytics, Document standard FormResponse analytics consistently --- app/services/analytics_events.rb | 872 ++++++++++++++++++------------- 1 file changed, 510 insertions(+), 362 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index da01005b8a1..c942bc83e28 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -47,25 +47,36 @@ def account_reset_cancel(user_id:, message_id: nil, request_id: nil, **extra) # @identity.idp.previous_event_name Account Reset # @param [String] user_id - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Validates the token used for cancelling an account reset - def account_reset_cancel_token_validation(user_id:, errors: nil, **extra) + def account_reset_cancel_token_validation( + user_id:, + success:, + errors:, + error_details: nil, + **extra + ) track_event( 'Account Reset: cancel token validation', - user_id: user_id, - errors: errors, + user_id:, + success:, + errors:, + error_details:, **extra, ) end # @identity.idp.previous_event_name Account Reset - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [String] user_id # @param [Integer, nil] account_age_in_days number of days since the account was confirmed # @param [Time] account_confirmed_at date that account creation was confirmed # (rounded) or nil if the account was not confirmed # @param [Hash] mfa_method_counts - # @param [Hash] errors + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # An account has been deleted through the account reset flow def account_reset_delete( success:, @@ -73,30 +84,42 @@ def account_reset_delete( account_age_in_days:, account_confirmed_at:, mfa_method_counts:, - errors: nil, + errors:, + error_details: nil, **extra ) track_event( 'Account Reset: delete', - success: success, - user_id: user_id, - account_age_in_days: account_age_in_days, - account_confirmed_at: account_confirmed_at, - mfa_method_counts: mfa_method_counts, - errors: errors, + success:, + user_id:, + account_age_in_days:, + account_confirmed_at:, + mfa_method_counts:, + errors:, + error_details:, **extra, ) end # @identity.idp.previous_event_name Account Reset # @param [String] user_id - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Validates the granted token for account reset - def account_reset_granted_token_validation(user_id: nil, errors: nil, **extra) + def account_reset_granted_token_validation( + success:, + errors:, + error_details: nil, + user_id: nil, + **extra + ) track_event( 'Account Reset: granted token validation', - user_id: user_id, - errors: errors, + success:, + errors:, + error_details:, + user_id:, **extra, ) end @@ -164,14 +187,16 @@ def add_email_confirmation(user_id:, success: nil, **extra) track_event('Add Email: Email Confirmation', user_id: user_id, success: success, **extra) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks request for adding new emails to an account - def add_email_request(success:, errors:, **extra) + def add_email_request(success:, errors:, error_details: nil, **extra) track_event( 'Add Email Requested', - success: success, - errors: errors, + success:, + errors:, + error_details:, **extra, ) end @@ -191,7 +216,7 @@ def add_phone_setup_visit # @identity.idp.previous_event_name TOTP: User Disabled # Tracks when a user deletes their auth app from account # @param [Boolean] success - # @param [Hash] error_details + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Integer] configuration_id def auth_app_delete_submitted( success:, @@ -210,7 +235,7 @@ def auth_app_delete_submitted( # When a user updates name for auth app # @param [Boolean] success - # @param [Hash] error_details + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Integer] configuration_id # Tracks when user submits a name change for an Auth App configuration def auth_app_update_name_submitted( @@ -274,18 +299,18 @@ def backup_code_regenerate_visit(in_account_creation_flow:, **extra) end # Track user creating new BackupCodeSetupForm, record form submission Hash - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [Hash] mfa_method_counts Hash of MFA method with the number of that method on the account # @param [Number] enabled_mfa_methods_count Number of enabled MFA methods on the account # @param [Boolean] in_account_creation_flow Whether page is visited as part of account creation - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission def backup_code_setup_visit( success:, mfa_method_counts:, enabled_mfa_methods_count:, in_account_creation_flow:, - errors: nil, + errors:, error_details: nil, **extra ) @@ -400,26 +425,30 @@ def email_and_password_auth( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks request for deletion of email address - def email_deletion_request(success:, errors:, **extra) + def email_deletion_request(success:, errors:, error_details: nil, **extra) track_event( 'Email Deletion Requested', - success: success, - errors: errors, + success:, + errors:, + error_details:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks if Email Language is updated - def email_language_updated(success:, errors:, **extra) + def email_language_updated(success:, errors:, error_details: nil, **extra) track_event( 'Email Language: Updated', - success: success, - errors: errors, + success:, + errors:, + error_details:, **extra, ) end @@ -443,8 +472,9 @@ def email_sent(action:, ses_message_id:, email_address_id:, **extra) ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Time, nil] event_created_at timestamp for the event # @param [Time, nil] disavowed_device_last_used_at # @param [String, nil] disavowed_device_user_agent @@ -456,6 +486,7 @@ def email_sent(action:, ses_message_id:, email_address_id:, **extra) def event_disavowal( success:, errors:, + error_details: nil, event_created_at: nil, disavowed_device_last_used_at: nil, disavowed_device_user_agent: nil, @@ -467,21 +498,23 @@ def event_disavowal( ) track_event( 'Event disavowal visited', - success: success, - errors: errors, - event_created_at: event_created_at, - disavowed_device_last_used_at: disavowed_device_last_used_at, - disavowed_device_user_agent: disavowed_device_user_agent, - disavowed_device_last_ip: disavowed_device_last_ip, - event_id: event_id, - event_type: event_type, - event_ip: event_ip, + success:, + errors:, + error_details:, + event_created_at:, + disavowed_device_last_used_at:, + disavowed_device_user_agent:, + disavowed_device_last_ip:, + event_id:, + event_type:, + event_ip:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Time, nil] event_created_at timestamp for the event # @param [Time, nil] disavowed_device_last_used_at # @param [String, nil] disavowed_device_user_agent @@ -493,6 +526,7 @@ def event_disavowal( def event_disavowal_password_reset( success:, errors:, + error_details: nil, event_created_at: nil, disavowed_device_last_used_at: nil, disavowed_device_user_agent: nil, @@ -504,21 +538,23 @@ def event_disavowal_password_reset( ) track_event( 'Event disavowal password reset', - success: success, - errors: errors, - event_created_at: event_created_at, - disavowed_device_last_used_at: disavowed_device_last_used_at, - disavowed_device_user_agent: disavowed_device_user_agent, - disavowed_device_last_ip: disavowed_device_last_ip, - event_id: event_id, - event_type: event_type, - event_ip: event_ip, + success:, + errors:, + error_details:, + event_created_at:, + disavowed_device_last_used_at:, + disavowed_device_user_agent:, + disavowed_device_last_ip:, + event_id:, + event_type:, + event_ip:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Time, nil] event_created_at timestamp for the event # @param [Time, nil] disavowed_device_last_used_at # @param [String, nil] disavowed_device_user_agent @@ -530,6 +566,7 @@ def event_disavowal_password_reset( def event_disavowal_token_invalid( success:, errors:, + error_details: nil, event_created_at: nil, disavowed_device_last_used_at: nil, disavowed_device_user_agent: nil, @@ -541,15 +578,16 @@ def event_disavowal_token_invalid( ) track_event( 'Event disavowal token invalid', - success: success, - errors: errors, - event_created_at: event_created_at, - disavowed_device_last_used_at: disavowed_device_last_used_at, - disavowed_device_user_agent: disavowed_device_user_agent, - disavowed_device_last_ip: disavowed_device_last_ip, - event_id: event_id, - event_type: event_type, - event_ip: event_ip, + success:, + errors:, + error_details:, + event_created_at:, + disavowed_device_last_used_at:, + disavowed_device_user_agent:, + disavowed_device_last_ip:, + event_id:, + event_type:, + event_ip:, **extra, ) end @@ -585,8 +623,9 @@ def forget_all_browsers_visited track_event('Forget All Browsers Visited') end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception # @param [String] profile_fraud_review_pending_at # The user was passed by manual fraud review @@ -595,20 +634,23 @@ def fraud_review_passed( errors:, exception:, profile_fraud_review_pending_at:, + error_details: nil, **extra ) track_event( 'Fraud: Profile review passed', - success: success, - errors: errors, - exception: exception, - profile_fraud_review_pending_at: profile_fraud_review_pending_at, + success:, + errors:, + error_details:, + exception:, + profile_fraud_review_pending_at:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception # @param [String] profile_fraud_review_pending_at # The user was rejected by manual fraud review @@ -617,14 +659,16 @@ def fraud_review_rejected( errors:, exception:, profile_fraud_review_pending_at:, + error_details: nil, **extra ) track_event( 'Fraud: Profile review rejected', - success: success, - errors: errors, - exception: exception, - profile_fraud_review_pending_at: profile_fraud_review_pending_at, + success:, + errors:, + error_details:, + exception:, + profile_fraud_review_pending_at:, **extra, ) end @@ -662,11 +706,11 @@ def idv_acuant_sdk_loaded( end # rubocop:enable Naming/VariableName,Naming/MethodParameterName - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [Boolean] address_edited # @param [Hash] pii_like_keypaths - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # User submitted an idv address def idv_address_submitted( success:, @@ -1056,8 +1100,9 @@ def idv_doc_auth_ssn_visited(**extra) track_event('IdV: doc auth ssn visited', **extra) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Integer] submit_attempts (previously called "attempts") # @param [Integer] remaining_submit_attempts (previously called "remaining_attempts") # @param [String] user_id @@ -1072,6 +1117,7 @@ def idv_doc_auth_submitted_image_upload_form( remaining_submit_attempts:, flow_path:, liveness_checking_required:, + error_details: nil, submit_attempts: nil, user_id: nil, front_image_fingerprint: nil, @@ -1080,21 +1126,23 @@ def idv_doc_auth_submitted_image_upload_form( ) track_event( 'IdV: doc auth image upload form submitted', - success: success, - errors: errors, - submit_attempts: submit_attempts, - remaining_submit_attempts: remaining_submit_attempts, - user_id: user_id, - flow_path: flow_path, - front_image_fingerprint: front_image_fingerprint, - back_image_fingerprint: back_image_fingerprint, - liveness_checking_required: liveness_checking_required, + success:, + errors:, + error_details:, + submit_attempts:, + remaining_submit_attempts:, + user_id:, + flow_path:, + front_image_fingerprint:, + back_image_fingerprint:, + liveness_checking_required:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception # @param [Boolean] billed # @param [String] doc_auth_result @@ -1155,6 +1203,7 @@ def idv_doc_auth_submitted_image_upload_vendor( client_image_metrics:, flow_path:, liveness_checking_required:, + error_details: nil, billed: nil, doc_auth_result: nil, vendor_request_time_in_ms: nil, @@ -1185,14 +1234,15 @@ def idv_doc_auth_submitted_image_upload_vendor( 'IdV: doc auth image upload vendor submitted', success:, errors:, + error_details:, exception:, billed:, doc_auth_result:, state:, state_id_type:, async:, - submit_attempts: submit_attempts, - remaining_submit_attempts: remaining_submit_attempts, + submit_attempts:, + remaining_submit_attempts:, client_image_metrics:, flow_path:, vendor_request_time_in_ms:, @@ -1222,8 +1272,9 @@ def idv_doc_auth_submitted_image_upload_vendor( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] user_id # @param [Integer] remaining_submit_attempts (previously called "remaining_attempts") # @param [Hash] pii_like_keypaths @@ -1240,6 +1291,7 @@ def idv_doc_auth_submitted_pii_validation( pii_like_keypaths:, flow_path:, liveness_checking_required:, + error_details: nil, user_id: nil, front_image_fingerprint: nil, back_image_fingerprint: nil, @@ -1248,16 +1300,17 @@ def idv_doc_auth_submitted_pii_validation( ) track_event( 'IdV: doc auth image upload vendor pii validation', - success: success, - errors: errors, - user_id: user_id, - remaining_submit_attempts: remaining_submit_attempts, - pii_like_keypaths: pii_like_keypaths, - flow_path: flow_path, - front_image_fingerprint: front_image_fingerprint, - back_image_fingerprint: back_image_fingerprint, - classification_info: classification_info, - liveness_checking_required: liveness_checking_required, + success:, + errors:, + error_details:, + user_id:, + remaining_submit_attempts:, + pii_like_keypaths:, + flow_path:, + front_image_fingerprint:, + back_image_fingerprint:, + classification_info:, + liveness_checking_required:, **extra, ) end @@ -1788,17 +1841,19 @@ def idv_in_person_locations_request_failure( ) end - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [Integer] result_total - # @param [String] errors + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception_class # @param [String] exception_message # @param [Integer] response_status_code # User submitted a search on the location search page and response received def idv_in_person_locations_searched( success:, + errors:, result_total: 0, - errors: nil, + error_details: nil, exception_class: nil, exception_message: nil, response_status_code: nil, @@ -1806,12 +1861,13 @@ def idv_in_person_locations_searched( ) track_event( 'IdV: in person proofing location search submitted', - success: success, - result_total: result_total, - errors: errors, - exception_class: exception_class, - exception_message: exception_message, - response_status_code: response_status_code, + success:, + result_total:, + errors:, + error_details:, + exception_class:, + exception_message:, + response_status_code:, **extra, ) end @@ -1865,27 +1921,30 @@ def idv_in_person_proofing_address_visited( # @param [String] flow_path # @param [String] step # @param [String] analytics_id - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Boolean] same_address_as_id # User clicked cancel on update state id page def idv_in_person_proofing_cancel_update_state_id( + success:, + errors:, flow_path: nil, step: nil, analytics_id: nil, - success: nil, - errors: nil, + error_details: nil, same_address_as_id: nil, **extra ) track_event( 'IdV: in person proofing cancel_update_state_id submitted', - flow_path: flow_path, - step: step, - analytics_id: analytics_id, - success: success, - errors: errors, - same_address_as_id: same_address_as_id, + flow_path:, + step:, + analytics_id:, + success:, + errors:, + error_details:, + same_address_as_id:, **extra, ) end @@ -1962,27 +2021,30 @@ def idv_in_person_proofing_nontransliterable_characters_submitted( # @param [String] flow_path # @param [String] step # @param [String] analytics_id - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Boolean] same_address_as_id # User submitted state id on redo state id page def idv_in_person_proofing_redo_state_id_submitted( + success:, + errors:, + error_details: nil, flow_path: nil, step: nil, analytics_id: nil, - success: nil, - errors: nil, same_address_as_id: nil, **extra ) track_event( 'IdV: in person proofing redo_state_id submitted', - flow_path: flow_path, - step: step, - analytics_id: analytics_id, - success: success, - errors: errors, - same_address_as_id: same_address_as_id, + flow_path:, + step:, + analytics_id:, + success:, + errors:, + error_details:, + same_address_as_id:, **extra, ) end @@ -1994,30 +2056,33 @@ def idv_in_person_proofing_residential_address_submitted(**extra) # @param [String] flow_path # @param [String] step # @param [String] analytics_id - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Boolean, nil] same_address_as_id # @param [Boolean] opted_in_to_in_person_proofing User opted into in person proofing # User submitted state id def idv_in_person_proofing_state_id_submitted( + success:, + errors:, + error_details: nil, flow_path: nil, step: nil, analytics_id: nil, - success: nil, - errors: nil, same_address_as_id: nil, opted_in_to_in_person_proofing: nil, **extra ) track_event( 'IdV: in person proofing state_id submitted', - flow_path: flow_path, - step: step, - analytics_id: analytics_id, - success: success, - errors: errors, - same_address_as_id: same_address_as_id, - opted_in_to_in_person_proofing: opted_in_to_in_person_proofing, + flow_path:, + step:, + analytics_id:, + success:, + errors:, + error_details:, + same_address_as_id:, + opted_in_to_in_person_proofing:, **extra, ) end @@ -2721,8 +2786,9 @@ def idv_personal_key_visited( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param ["sms", "voice"] otp_delivery_preference # @param [Idv::ProofingComponentsLogging] proofing_components User's current proofing components # @param [String,nil] active_profile_idv_level ID verification level of user's active profile. @@ -2732,6 +2798,7 @@ def idv_phone_confirmation_form_submitted( success:, otp_delivery_preference:, errors:, + error_details: nil, proofing_components: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, @@ -2739,12 +2806,13 @@ def idv_phone_confirmation_form_submitted( ) track_event( 'IdV: phone confirmation form', - success: success, - errors: errors, - otp_delivery_preference: otp_delivery_preference, - proofing_components: proofing_components, - active_profile_idv_level: active_profile_idv_level, - pending_profile_idv_level: pending_profile_idv_level, + success:, + errors:, + error_details:, + otp_delivery_preference:, + proofing_components:, + active_profile_idv_level:, + pending_profile_idv_level:, **extra, ) end @@ -2806,8 +2874,9 @@ def idv_phone_confirmation_otp_rate_limit_sends( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param ["sms","voice"] otp_delivery_preference which channel the OTP was delivered by # @param [String] country_code country code of phone number # @param [String] area_code area code of phone number @@ -2828,6 +2897,7 @@ def idv_phone_confirmation_otp_resent( rate_limit_exceeded:, telephony_response:, phone_fingerprint:, + error_details: nil, proofing_components: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, @@ -2836,24 +2906,26 @@ def idv_phone_confirmation_otp_resent( ) track_event( 'IdV: phone confirmation otp resent', - success: success, - errors: errors, - otp_delivery_preference: otp_delivery_preference, - country_code: country_code, - area_code: area_code, - rate_limit_exceeded: rate_limit_exceeded, - telephony_response: telephony_response, - phone_fingerprint: phone_fingerprint, - proofing_components: proofing_components, - active_profile_idv_level: active_profile_idv_level, - pending_profile_idv_level: pending_profile_idv_level, - ab_tests: ab_tests, + success:, + errors:, + error_details:, + otp_delivery_preference:, + country_code:, + area_code:, + rate_limit_exceeded:, + telephony_response:, + phone_fingerprint:, + proofing_components:, + active_profile_idv_level:, + pending_profile_idv_level:, + ab_tests:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param ["sms","voice"] otp_delivery_preference which channel the OTP was delivered by # @param [String] country_code country code of phone number # @param [String] area_code area code of phone number @@ -2875,6 +2947,7 @@ def idv_phone_confirmation_otp_sent( phone_fingerprint:, telephony_response:, adapter:, + error_details: nil, proofing_components: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, @@ -2882,24 +2955,26 @@ def idv_phone_confirmation_otp_sent( ) track_event( 'IdV: phone confirmation otp sent', - success: success, - errors: errors, - otp_delivery_preference: otp_delivery_preference, - country_code: country_code, - area_code: area_code, - rate_limit_exceeded: rate_limit_exceeded, - phone_fingerprint: phone_fingerprint, - telephony_response: telephony_response, - adapter: adapter, - proofing_components: proofing_components, - active_profile_idv_level: active_profile_idv_level, - pending_profile_idv_level: pending_profile_idv_level, + success:, + errors:, + error_details:, + otp_delivery_preference:, + country_code:, + area_code:, + rate_limit_exceeded:, + phone_fingerprint:, + telephony_response:, + adapter:, + proofing_components:, + active_profile_idv_level:, + pending_profile_idv_level:, **extra, ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Boolean] code_expired if the one-time code expired # @param [Boolean] code_matches # @param [:sms,:voice] otp_delivery_preference @@ -2917,6 +2992,7 @@ def idv_phone_confirmation_otp_submitted( otp_delivery_preference:, second_factor_attempts_count:, second_factor_locked_at:, + error_details: nil, proofing_components: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, @@ -2924,16 +3000,17 @@ def idv_phone_confirmation_otp_submitted( ) track_event( 'IdV: phone confirmation otp submitted', - success: success, - errors: errors, - code_expired: code_expired, - code_matches: code_matches, - otp_delivery_preference: otp_delivery_preference, - second_factor_attempts_count: second_factor_attempts_count, - second_factor_locked_at: second_factor_locked_at, - proofing_components: proofing_components, - active_profile_idv_level: active_profile_idv_level, - pending_profile_idv_level: pending_profile_idv_level, + success:, + errors:, + error_details:, + code_expired:, + code_matches:, + otp_delivery_preference:, + second_factor_attempts_count:, + second_factor_locked_at:, + proofing_components:, + active_profile_idv_level:, + pending_profile_idv_level:, **extra, ) end @@ -2957,8 +3034,9 @@ def idv_phone_confirmation_otp_visit( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Idv::ProofingComponentsLogging] proofing_components User's current proofing components # @param [String,nil] active_profile_idv_level ID verification level of user's active profile. # @param [String,nil] pending_profile_idv_level ID verification level of user's pending profile. @@ -2966,6 +3044,7 @@ def idv_phone_confirmation_otp_visit( def idv_phone_confirmation_vendor_submitted( success:, errors:, + error_details: nil, proofing_components: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, @@ -2973,11 +3052,12 @@ def idv_phone_confirmation_vendor_submitted( ) track_event( 'IdV: phone confirmation vendor', - success: success, - errors: errors, - proofing_components: proofing_components, - active_profile_idv_level: active_profile_idv_level, - pending_profile_idv_level: pending_profile_idv_level, + success:, + errors:, + error_details:, + proofing_components:, + active_profile_idv_level:, + pending_profile_idv_level:, **extra, ) end @@ -3431,8 +3511,9 @@ def idv_usps_auth_token_refresh_job_started(**extra) # @identity.idp.previous_event_name Account verification submitted # @identity.idp.previous_event_name IdV: GPO verification submitted - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Hash] pii_like_keypaths # @param [DateTime] enqueued_at When was this letter enqueued # @param [Integer] which_letter Sorted by enqueue time, which letter had this code @@ -3454,19 +3535,21 @@ def idv_verify_by_mail_enter_code_submitted( submit_attempts:, pending_in_person_enrollment:, fraud_check_failed:, + error_details: nil, **extra ) track_event( 'IdV: enter verify by mail code submitted', - success: success, - errors: errors, - pii_like_keypaths: pii_like_keypaths, - enqueued_at: enqueued_at, - which_letter: which_letter, - letter_count: letter_count, - submit_attempts: submit_attempts, - pending_in_person_enrollment: pending_in_person_enrollment, - fraud_check_failed: fraud_check_failed, + success:, + errors:, + error_details:, + pii_like_keypaths:, + enqueued_at:, + which_letter:, + letter_count:, + submit_attempts:, + pending_in_person_enrollment:, + fraud_check_failed:, **extra, ) end @@ -3581,15 +3664,15 @@ def invalid_authenticity_token( ) end - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [String] client_id # @param [Boolean] client_id_parameter_present # @param [Boolean] id_token_hint_parameter_present # @param [Boolean] sp_initiated # @param [Boolean] oidc # @param [Boolean] saml_request_valid - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] method # Logout Initiated def logout_initiated( @@ -3623,7 +3706,7 @@ def logout_initiated( # @param [Boolean] success Whether authentication was successful # @param [Hash] errors Authentication error reasons, if unsuccessful - # @param [Hash] error_details Details for error that occurred in unsuccessful submission + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param ["authentication","reauthentication","confirmation"] context User session context # @param [Boolean] new_device Whether the user is authenticating from a new device # @param [String] multi_factor_auth_method Authentication method used @@ -3860,15 +3943,17 @@ def multi_factor_auth_max_sends end # Multi factor selected from auth options list - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] selection - def multi_factor_auth_option_list(success:, errors:, selection:, **extra) + def multi_factor_auth_option_list(success:, errors:, selection:, error_details: nil, **extra) track_event( 'Multi-Factor Authentication: option list', - success: success, - errors: errors, - selection: selection, + success:, + errors:, + error_details:, + selection:, **extra, ) end @@ -3879,33 +3964,38 @@ def multi_factor_auth_option_list_visit end # Multi factor auth phone setup - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] otp_delivery_preference # @param [String] area_code # @param [String] carrier # @param [String] country_code # @param [String] phone_type # @param [Hash] types - def multi_factor_auth_phone_setup(success:, - errors:, - otp_delivery_preference:, - area_code:, - carrier:, - country_code:, - phone_type:, - types:, - **extra) + def multi_factor_auth_phone_setup( + success:, + errors:, + otp_delivery_preference:, + area_code:, + carrier:, + country_code:, + phone_type:, + types:, + error_details: nil, + **extra + ) track_event( 'Multi-Factor Authentication: phone setup', - success: success, - errors: errors, - otp_delivery_preference: otp_delivery_preference, - area_code: area_code, - carrier: carrier, - country_code: country_code, - phone_type: phone_type, - types: types, + success:, + errors:, + error_details:, + otp_delivery_preference:, + area_code:, + carrier:, + country_code:, + phone_type:, + types:, **extra, ) end @@ -3913,6 +4003,7 @@ def multi_factor_auth_phone_setup(success:, # Tracks when a user sets up a multi factor auth method # @param [Boolean] success Whether authenticator setup was successful # @param [Hash] errors Authenticator setup error reasons, if unsuccessful + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] multi_factor_auth_method # @param [Boolean] in_account_creation_flow whether user is going through account creation flow # @param [integer] enabled_mfa_methods_count @@ -3921,16 +4012,18 @@ def multi_factor_auth_setup( multi_factor_auth_method:, enabled_mfa_methods_count:, in_account_creation_flow:, - errors: nil, + errors:, + error_details: nil, **extra ) track_event( 'Multi-Factor Authentication Setup', - success: success, - errors: errors, - multi_factor_auth_method: multi_factor_auth_method, - in_account_creation_flow: in_account_creation_flow, - enabled_mfa_methods_count: enabled_mfa_methods_count, + success:, + errors:, + error_details:, + multi_factor_auth_method:, + in_account_creation_flow:, + enabled_mfa_methods_count:, **extra, ) end @@ -3941,15 +4034,15 @@ def no_js_detect_stylesheet_loaded(location:, **extra) track_event(:no_js_detect_stylesheet_loaded, location:, **extra) end - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [String] client_id # @param [Boolean] client_id_parameter_present # @param [Boolean] id_token_hint_parameter_present # @param [Boolean] sp_initiated # @param [Boolean] oidc # @param [Boolean] saml_request_valid - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] method # @param [String] original_method Method of referring request # OIDC Logout Requested @@ -3984,15 +4077,15 @@ def oidc_logout_requested( ) end - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [String] client_id # @param [Boolean] client_id_parameter_present # @param [Boolean] id_token_hint_parameter_present # @param [Boolean] sp_initiated # @param [Boolean] oidc # @param [Boolean] saml_request_valid - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] method # OIDC Logout Submitted def oidc_logout_submitted( @@ -4024,15 +4117,15 @@ def oidc_logout_submitted( ) end - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [String] client_id # @param [Boolean] client_id_parameter_present # @param [Boolean] id_token_hint_parameter_present # @param [Boolean] sp_initiated # @param [Boolean] oidc # @param [Boolean] saml_request_valid - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] method # OIDC Logout Visited def oidc_logout_visited( @@ -4087,17 +4180,19 @@ def openid_connect_authorization_handoff( end # Tracks when an openid connect bearer token authentication request is made - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [Integer] ial # @param [String] client_id Service Provider issuer - # @param [Hash] errors - def openid_connect_bearer_token(success:, ial:, client_id:, errors:, **extra) + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission + def openid_connect_bearer_token(success:, ial:, client_id:, errors:, error_details: nil, **extra) track_event( 'OpenID Connect: bearer token authentication', - success: success, - ial: ial, - client_id: client_id, - errors: errors, + success:, + ial:, + client_id:, + errors:, + error_details:, **extra, ) end @@ -4105,6 +4200,7 @@ def openid_connect_bearer_token(success:, ial:, client_id:, errors:, **extra) # Tracks when openid authorization request is made # @param [Boolean] success Whether form validations were succcessful # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] prompt OIDC prompt parameter # @param [Boolean] allow_prompt_login Whether service provider is configured to allow prompt=login # @param [Boolean] code_challenge_present Whether code challenge is present @@ -4132,12 +4228,14 @@ def openid_connect_request_authorization( vtr_param:, unauthorized_scope:, user_fully_authenticated:, + error_details: nil, **extra ) track_event( 'OpenID Connect: authorization request', success:, errors:, + error_details:, prompt:, allow_prompt_login:, code_challenge_present:, @@ -4175,6 +4273,7 @@ def openid_connect_token(client_id:, user_id:, code_digest:, expires_in:, ial:, # Tracks when user makes an otp delivery selection # @param [Boolean] success Whether the form was submitted successfully. # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param ["authentication","reauthentication","confirmation"] context User session context # @param [String] otp_delivery_preference (sms or voice) # @param [Boolean] resend True if the user re-requested a code @@ -4188,12 +4287,14 @@ def otp_delivery_selection( resend:, country_code:, area_code:, + error_details: nil, **extra ) track_event( 'OTP: Delivery Selection', success:, errors:, + error_details:, context:, otp_delivery_preference:, resend:, @@ -4220,20 +4321,37 @@ def otp_phone_validation_failed(error:, message:, context:, country:, **extra) ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # The user updated their password - def password_changed(success:, errors:, **extra) - track_event('Password Changed', success: success, errors: errors, **extra) + def password_changed(success:, errors:, error_details: nil, **extra) + track_event('Password Changed', success:, errors:, error_details:, **extra) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] user_id UUID of the user # @param [Boolean] request_id_present Whether request_id URL parameter is present # The user added a password after verifying their email for account creation - def password_creation(success:, errors:, user_id:, request_id_present:, **extra) - track_event('Password Creation', success:, errors:, user_id:, request_id_present:, **extra) + def password_creation( + success:, + errors:, + user_id:, + request_id_present:, + error_details: nil, + **extra + ) + track_event( + 'Password Creation', + success:, + errors:, + error_details:, + user_id:, + request_id_present:, + **extra, + ) end # The user got their password incorrect the max number of times, their session was terminated @@ -4241,13 +4359,13 @@ def password_max_attempts track_event('Password Max Attempts Reached') end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation # @param [Boolean, nil] confirmed if the account the reset is being requested for has a # confirmed email # @param [Boolean, nil] active_profile if the account the reset is being requested for has an # active proofed profile - # @param [Hash] error_details Details for error that occurred in unsuccessful submission + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # The user entered an email address to request a password reset def password_reset_email( success:, @@ -4268,15 +4386,15 @@ def password_reset_email( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation # @param [Boolean] profile_deactivated if the active profile for the account was deactivated # (the user will need to use their personal key to reactivate their profile) # @param [Boolean] pending_profile_invalidated Whether a pending profile was invalidated as a # result of the password reset # @param [String] pending_profile_pending_reasons Comma-separated list of the pending states # associated with the associated profile. - # @param [Hash] error_details Details for error that occurred in unsuccessful submission + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # The user changed the password for their account via the password reset flow def password_reset_password( success:, @@ -4299,16 +4417,18 @@ def password_reset_password( ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] user_id UUID of the user to receive password token # A password token has been sent for user - def password_reset_token(success:, errors:, user_id:, **extra) + def password_reset_token(success:, errors:, user_id:, error_details: nil, **extra) track_event( 'Password Reset: Token Submitted', - success: success, - errors: errors, - user_id: user_id, + success:, + errors:, + error_details:, + user_id:, **extra, ) end @@ -4328,14 +4448,16 @@ def pending_account_reset_visited track_event('Pending account reset visited') end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Alert user if a personal key was used to sign in - def personal_key_alert_about_sign_in(success:, errors:, **extra) + def personal_key_alert_about_sign_in(success:, errors:, error_details: nil, **extra) track_event( 'Personal key: Alert user about sign in', - success: success, - errors: errors, + success:, + errors:, + error_details:, **extra, ) end @@ -4345,16 +4467,24 @@ def personal_key_reactivation track_event('Personal key reactivation: Account reactivated with personal key') end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Hash] pii_like_keypaths # Personal key form submitted - def personal_key_reactivation_submitted(success:, errors:, pii_like_keypaths:, **extra) + def personal_key_reactivation_submitted( + success:, + errors:, + pii_like_keypaths:, + error_details: nil, + **extra + ) track_event( 'Personal key reactivation: Personal key form submitted', - success: success, - errors: errors, - pii_like_keypaths: pii_like_keypaths, + success:, + errors:, + error_details:, + pii_like_keypaths:, **extra, ) end @@ -4374,8 +4504,9 @@ def personal_key_viewed(personal_key_present:, **extra) ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] delivery_preference # @param [Integer] phone_configuration_id # @param [Boolean] make_default_number @@ -4386,15 +4517,17 @@ def phone_change_submitted( delivery_preference:, phone_configuration_id:, make_default_number:, + error_details: nil, **extra ) track_event( 'Phone Number Change: Form submitted', - success: success, - errors: errors, - delivery_preference: delivery_preference, - phone_configuration_id: phone_configuration_id, - make_default_number: make_default_number, + success:, + errors:, + error_details:, + delivery_preference:, + phone_configuration_id:, + make_default_number:, **extra, ) end @@ -4426,7 +4559,7 @@ def phone_input_country_changed(country_code:, **extra) # @identity.idp.previous_event_name PIV CAC disabled # @identity.idp.previous_event_name piv_cac_disabled # @param [Boolean] success - # @param [Hash] error_details + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Integer] configuration_id # Tracks when user attempts to delete a PIV/CAC configuraton def piv_cac_delete_submitted( @@ -4445,15 +4578,17 @@ def piv_cac_delete_submitted( end # @identity.idp.previous_event_name PIV/CAC login - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String,nil] key_id # tracks piv cac login event - def piv_cac_login(success:, errors:, key_id:, **extra) + def piv_cac_login(success:, errors:, key_id:, error_details: nil, **extra) track_event( :piv_cac_login, success:, errors:, + error_details:, key_id:, **extra, ) @@ -4490,8 +4625,8 @@ def piv_cac_setup_visited(in_account_creation_flow:, **extra) ) end - # @param [Boolean] success - # @param [Hash] error_details + # @param [Boolean] success Whether form validation was successful + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Integer] configuration_id # Tracks when user submits a name change for a PIV/CAC configuraton def piv_cac_update_name_submitted( @@ -4777,13 +4912,15 @@ def risc_security_event_pushed( end # Tracks when rules of use is submitted with a success or failure - # @param [Boolean] success - # @param [Hash] errors - def rules_of_use_submitted(success: nil, errors: nil, **extra) + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission + def rules_of_use_submitted(success:, errors:, error_details: nil, **extra) track_event( 'Rules of Use Submitted', - success: success, - errors: errors, + success:, + errors:, + error_details:, **extra, ) end @@ -4794,8 +4931,9 @@ def rules_of_use_visit end # Record SAML authentication payload Hash - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] nameid_format # @param [Array] authn_context # @param [String] authn_context_comparison @@ -4819,22 +4957,24 @@ def saml_auth( requested_ial:, request_signed:, matching_cert_serial:, + error_details: nil, **extra ) track_event( 'SAML Auth', - success: success, - errors: errors, - nameid_format: nameid_format, - authn_context: authn_context, - authn_context_comparison: authn_context_comparison, - service_provider: service_provider, - endpoint: endpoint, - idv: idv, - finish_profile: finish_profile, - requested_ial: requested_ial, - request_signed: request_signed, - matching_cert_serial: matching_cert_serial, + success:, + errors:, + error_details:, + nameid_format:, + authn_context:, + authn_context_comparison:, + service_provider:, + endpoint:, + idv:, + finish_profile:, + requested_ial:, + request_signed:, + matching_cert_serial:, **extra, ) end @@ -4887,16 +5027,18 @@ def second_mfa_reminder_visit end # Tracks when security event is received - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [String] error_code - # @param [Hash] errors + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] jti # @param [String] user_id # @param [String] client_id def security_event_received( success:, + errors:, error_code: nil, - errors: nil, + error_details: nil, jti: nil, user_id: nil, client_id: nil, @@ -4904,12 +5046,13 @@ def security_event_received( ) track_event( 'RISC: Security event received', - success: success, - error_code: error_code, - errors: errors, - jti: jti, - user_id: user_id, - client_id: client_id, + success:, + errors:, + error_details:, + error_code:, + jti:, + user_id:, + client_id:, **extra, ) end @@ -5153,15 +5296,17 @@ def user_password_compromised_visited(**extra) ) end - # @param [Boolean] success - # @param [Hash] errors + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [Integer] enabled_mfa_methods_count # @param [Integer] selected_mfa_count # @param ['voice', 'auth_app'] selection # Tracks when the the user has selected and submitted MFA auth methods on user registration def user_registration_2fa_setup( success:, - errors: nil, + errors:, + error_details: nil, selected_mfa_count: nil, enabled_mfa_methods_count: nil, selection: nil, @@ -5170,11 +5315,12 @@ def user_registration_2fa_setup( track_event( 'User Registration: 2FA Setup', { - success: success, - errors: errors, - selected_mfa_count: selected_mfa_count, - enabled_mfa_methods_count: enabled_mfa_methods_count, - selection: selection, + success:, + errors:, + error_details:, + selected_mfa_count:, + enabled_mfa_methods_count:, + selection:, **extra, }.compact, ) @@ -5274,10 +5420,10 @@ def user_registration_complete( end # Tracks when user submits registration email - # @param [Boolean] success + # @param [Boolean] success Whether form validation was successful # @param [Boolean] rate_limited - # @param [Hash] errors - # @param [Hash] error_details + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] user_id # @param [Boolean] email_already_exists # @param [String] domain_name @@ -5307,9 +5453,9 @@ def user_registration_email( end # Tracks when user confirms registration email - # @param [Boolean] success - # @param [Hash] errors - # @param [Hash] error_details + # @param [Boolean] success Whether form validation was successful + # @param [Hash] errors Errors resulting from form validation + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] user_id def user_registration_email_confirmation( success:, @@ -5485,7 +5631,7 @@ def vendor_outage( # @param [Boolean] success Whether the submission was successful # @param [Integer] configuration_id Database ID for the configuration # @param [Boolean] platform_authenticator Whether the configuration was a platform authenticator - # @param [Hash] error_details Details for error that occurred in unsuccessful submission + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks when user attempts to delete a WebAuthn configuration # @identity.idp.previous_event_name WebAuthn Deleted def webauthn_delete_submitted( @@ -5508,13 +5654,15 @@ def webauthn_delete_submitted( # @param [Hash] platform_authenticator # @param [Boolean] success # @param [Hash, nil] errors + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks whether or not Webauthn setup was successful - def webauthn_setup_submitted(platform_authenticator:, success:, errors: nil, **extra) + def webauthn_setup_submitted(platform_authenticator:, success:, error_details:, errors:, **extra) track_event( :webauthn_setup_submitted, - platform_authenticator: platform_authenticator, - success: success, - errors: errors, + platform_authenticator:, + success:, + errors:, + error_details:, **extra, ) end @@ -5534,7 +5682,7 @@ def webauthn_setup_visit(platform_authenticator:, enabled_mfa_methods_count:, ** # @param [Boolean] success Whether the submission was successful # @param [Integer] configuration_id Database ID for the configuration # @param [Boolean] platform_authenticator Whether the configuration was a platform authenticator - # @param [Hash] error_details Details for error that occurred in unsuccessful submission + # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks when user submits a name change for a WebAuthn configuration def webauthn_update_name_submitted( success:, From 0d59e2b88440a56c51498ee263c4e62569d8ece6 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 16:36:11 -0400 Subject: [PATCH 02/19] Restore optional errors passed in webauthn_setup_submitted --- app/services/analytics_events.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index c942bc83e28..1d4b7635ddb 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -5656,7 +5656,13 @@ def webauthn_delete_submitted( # @param [Hash, nil] errors # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks whether or not Webauthn setup was successful - def webauthn_setup_submitted(platform_authenticator:, success:, error_details:, errors:, **extra) + def webauthn_setup_submitted( + platform_authenticator:, + success:, + errors: nil, + error_details: nil, + **extra + ) track_event( :webauthn_setup_submitted, platform_authenticator:, From b6762c143a61250b2e2da8e5d22454acce2caf3f Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 16:49:41 -0400 Subject: [PATCH 03/19] Restore multi_factor_auth_setup errors as nilable --- app/services/analytics_events.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 1d4b7635ddb..f01e95c8c32 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -4012,7 +4012,7 @@ def multi_factor_auth_setup( multi_factor_auth_method:, enabled_mfa_methods_count:, in_account_creation_flow:, - errors:, + errors: nil, error_details: nil, **extra ) From 2dff3f712c4b161ec232d9acacb387cd6448384d Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 16:59:46 -0400 Subject: [PATCH 04/19] Try disregarding nil values from actual logged These aren't really logged as meaningfully query values anyways, and we should only care if we explicitly expect a nil value --- spec/support/have_logged_event_matcher.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/support/have_logged_event_matcher.rb b/spec/support/have_logged_event_matcher.rb index 86d09a48164..af5126f8ae3 100644 --- a/spec/support/have_logged_event_matcher.rb +++ b/spec/support/have_logged_event_matcher.rb @@ -32,7 +32,11 @@ def matches?(actual) events[expected_event_name] || [] else (events[expected_event_name] || []).filter do |actual_attributes| - values_match?(expected_attributes, actual_attributes) + compacted_actual_attributes = actual_attributes.select do |key, value| + true if !value.nil? || expected_attributes.key?(key) + end + + values_match?(expected_attributes, compacted_actual_attributes) end end From 49c9b60242554c2df6bf47d8d750b3f5eff6f715 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 17:00:15 -0400 Subject: [PATCH 05/19] Update expect receive to have_logged_event --- .../options_controller_spec.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/spec/controllers/two_factor_authentication/options_controller_spec.rb b/spec/controllers/two_factor_authentication/options_controller_spec.rb index 6159c46e7ef..69627d830fa 100644 --- a/spec/controllers/two_factor_authentication/options_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/options_controller_spec.rb @@ -80,16 +80,14 @@ stub_sign_in_before_2fa stub_analytics - result = { + post :create, params: { two_factor_options_form: { selection: 'sms' } } + + expect(@analytics).to have_logged_event( + 'Multi-Factor Authentication: option list', selection: 'sms', success: true, errors: {}, - } - - expect(@analytics).to receive(:track_event). - with('Multi-Factor Authentication: option list', result) - - post :create, params: { two_factor_options_form: { selection: 'sms' } } + ) end end end From 6c5c39fe33fa4fa761fc4d13fbc3d7bb5a394001 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 17:39:05 -0400 Subject: [PATCH 06/19] Remove unused error_details from piv_cac_login --- app/services/analytics_events.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index f01e95c8c32..5b7b0b0aed3 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -4580,15 +4580,13 @@ def piv_cac_delete_submitted( # @identity.idp.previous_event_name PIV/CAC login # @param [Boolean] success Whether form validation was successful # @param [Hash] errors Errors resulting from form validation - # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String,nil] key_id # tracks piv cac login event - def piv_cac_login(success:, errors:, key_id:, error_details: nil, **extra) + def piv_cac_login(success:, errors:, key_id:, **extra) track_event( :piv_cac_login, success:, errors:, - error_details:, key_id:, **extra, ) From f342b7b76443db0dcfe2ac0e2ab121c2f6576835 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 17:39:16 -0400 Subject: [PATCH 07/19] Add missing error_details --- .../idv/image_uploads_controller_spec.rb | 2 + spec/controllers/idv/phone_controller_spec.rb | 2 + .../authorization_controller_spec.rb | 14 ++++ .../user_info_controller_spec.rb | 1 + .../risc/security_events_controller_spec.rb | 1 + spec/controllers/saml_idp_controller_spec.rb | 12 ++++ .../users/emails_controller_spec.rb | 6 +- .../users/passwords_controller_spec.rb | 1 + .../users/phone_setup_controller_spec.rb | 3 + .../users/totp_setup_controller_spec.rb | 7 ++ .../verify_personal_key_controller_spec.rb | 1 + .../users/webauthn_setup_controller_spec.rb | 3 + spec/features/idv/analytics_spec.rb | 70 +++++++++---------- spec/features/users/sign_up_spec.rb | 1 + spec/forms/idv/api_image_upload_form_spec.rb | 2 + spec/lib/action_account_spec.rb | 6 ++ spec/support/have_logged_event_matcher.rb | 6 +- 17 files changed, 97 insertions(+), 41 deletions(-) diff --git a/spec/controllers/idv/image_uploads_controller_spec.rb b/spec/controllers/idv/image_uploads_controller_spec.rb index e83986cf62f..4fc67bb5b26 100644 --- a/spec/controllers/idv/image_uploads_controller_spec.rb +++ b/spec/controllers/idv/image_uploads_controller_spec.rb @@ -502,6 +502,7 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, + error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -599,6 +600,7 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, + error_details: nil, attention_with_barcode: false, async: false, billed: true, diff --git a/spec/controllers/idv/phone_controller_spec.rb b/spec/controllers/idv/phone_controller_spec.rb index 79cd0969e2c..c09fff3170b 100644 --- a/spec/controllers/idv/phone_controller_spec.rb +++ b/spec/controllers/idv/phone_controller_spec.rb @@ -348,6 +348,7 @@ result = { success: true, errors: {}, + error_details: nil, area_code: '703', country_code: 'US', carrier: 'Test Mobile Carrier', @@ -444,6 +445,7 @@ new_phone_added: true, hybrid_handoff_phone_used: false, errors: {}, + error_details: nil, phone_fingerprint: Pii::Fingerprinter.fingerprint(proofing_phone.e164), country_code: proofing_phone.country, area_code: proofing_phone.area_code, diff --git a/spec/controllers/openid_connect/authorization_controller_spec.rb b/spec/controllers/openid_connect/authorization_controller_spec.rb index dc3fb031eec..d0948ae6505 100644 --- a/spec/controllers/openid_connect/authorization_controller_spec.rb +++ b/spec/controllers/openid_connect/authorization_controller_spec.rb @@ -133,6 +133,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: true, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/1', @@ -189,6 +190,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: true, user_fully_authenticated: true, acr_values: '', @@ -386,6 +388,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/2', @@ -762,6 +765,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/0', @@ -855,6 +859,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/0', @@ -951,6 +956,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/0', @@ -1118,6 +1124,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: true, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/1', @@ -1176,6 +1183,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: true, user_fully_authenticated: true, acr_values: '', @@ -1374,6 +1382,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/2', @@ -1752,6 +1761,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/0', @@ -1845,6 +1855,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/0', @@ -1941,6 +1952,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: false, user_fully_authenticated: true, acr_values: 'http://idmanagement.gov/ns/assurance/ial/0', @@ -2490,6 +2502,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: true, user_fully_authenticated: false, acr_values: 'http://idmanagement.gov/ns/assurance/ial/1', @@ -2623,6 +2636,7 @@ referer: nil, allow_prompt_login: true, errors: {}, + error_details: nil, unauthorized_scope: true, user_fully_authenticated: false, acr_values: '', diff --git a/spec/controllers/openid_connect/user_info_controller_spec.rb b/spec/controllers/openid_connect/user_info_controller_spec.rb index 6f9244a9a76..cc9ed4e6851 100644 --- a/spec/controllers/openid_connect/user_info_controller_spec.rb +++ b/spec/controllers/openid_connect/user_info_controller_spec.rb @@ -133,6 +133,7 @@ client_id: identity.service_provider, ial: identity.ial, errors: {}, + error_details: nil, ) action diff --git a/spec/controllers/risc/security_events_controller_spec.rb b/spec/controllers/risc/security_events_controller_spec.rb index 8799871775b..55cf7ef677f 100644 --- a/spec/controllers/risc/security_events_controller_spec.rb +++ b/spec/controllers/risc/security_events_controller_spec.rb @@ -53,6 +53,7 @@ event_type: event_type, error_code: nil, errors: {}, + error_details: nil, jti: jti, success: true, user_id: user.uuid) diff --git a/spec/controllers/saml_idp_controller_spec.rb b/spec/controllers/saml_idp_controller_spec.rb index ad69564b0b7..3c92c442849 100644 --- a/spec/controllers/saml_idp_controller_spec.rb +++ b/spec/controllers/saml_idp_controller_spec.rb @@ -791,6 +791,7 @@ def name_id_version(format_urn) with('SAML Auth', { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: [Saml::Idp::Constants::IAL2_AUTHN_CONTEXT_CLASSREF], authn_context_comparison: 'exact', @@ -940,6 +941,7 @@ def name_id_version(format_urn) with('SAML Auth', { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: ['http://idmanagement.gov/ns/assurance/ial/1'], authn_context_comparison: 'minimum', @@ -1515,6 +1517,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: [ Saml::Idp::Constants::IAL1_AUTHN_CONTEXT_CLASSREF, @@ -1644,6 +1647,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: [Saml::Idp::Constants::DEFAULT_AAL_AUTHN_CONTEXT_CLASSREF], authn_context_comparison: 'exact', @@ -1681,6 +1685,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: request_authn_contexts, authn_context_comparison: 'exact', @@ -1716,6 +1721,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_EMAIL, authn_context: request_authn_contexts, authn_context_comparison: 'exact', @@ -1793,6 +1799,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: request_authn_contexts, authn_context_comparison: 'exact', @@ -1825,6 +1832,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_EMAIL, authn_context: request_authn_contexts, authn_context_comparison: 'exact', @@ -1857,6 +1865,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', authn_context: request_authn_contexts, authn_context_comparison: 'exact', @@ -2341,6 +2350,7 @@ def name_id_version(format_urn) analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: [ Saml::Idp::Constants::AAL2_AUTHN_CONTEXT_CLASSREF, @@ -2396,6 +2406,7 @@ def stub_requested_attributes analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: request_authn_contexts, authn_context_comparison: 'exact', @@ -2447,6 +2458,7 @@ def stub_requested_attributes analytics_hash = { success: true, errors: {}, + error_details: nil, nameid_format: Saml::Idp::Constants::NAME_ID_FORMAT_PERSISTENT, authn_context: request_authn_contexts, authn_context_comparison: 'exact', diff --git a/spec/controllers/users/emails_controller_spec.rb b/spec/controllers/users/emails_controller_spec.rb index 75159965097..8906fe84f20 100644 --- a/spec/controllers/users/emails_controller_spec.rb +++ b/spec/controllers/users/emails_controller_spec.rb @@ -57,7 +57,11 @@ expect(@analytics).to receive(:track_event).with( 'Add Email Requested', - { success: true, errors: {}, user_id: user.uuid, domain_name: email.split('@').last }, + success: true, + errors: {}, + error_details: nil, + user_id: user.uuid, + domain_name: email.split('@').last, ) expect(@analytics).to receive(:track_event).with( diff --git a/spec/controllers/users/passwords_controller_spec.rb b/spec/controllers/users/passwords_controller_spec.rb index 11979e97f11..548cb918a6d 100644 --- a/spec/controllers/users/passwords_controller_spec.rb +++ b/spec/controllers/users/passwords_controller_spec.rb @@ -30,6 +30,7 @@ 'Password Changed', success: true, errors: {}, + error_details: nil, pending_profile_present: false, active_profile_present: false, user_id: subject.current_user.uuid, diff --git a/spec/controllers/users/phone_setup_controller_spec.rb b/spec/controllers/users/phone_setup_controller_spec.rb index 9c372dfc2c7..1102b8fa847 100644 --- a/spec/controllers/users/phone_setup_controller_spec.rb +++ b/spec/controllers/users/phone_setup_controller_spec.rb @@ -151,6 +151,7 @@ result = { success: true, errors: {}, + error_details: nil, otp_delivery_preference: 'voice', area_code: '703', carrier: 'Test Mobile Carrier', @@ -191,6 +192,7 @@ result = { success: true, errors: {}, + error_details: nil, otp_delivery_preference: 'sms', area_code: '703', carrier: 'Test Mobile Carrier', @@ -230,6 +232,7 @@ result = { success: true, errors: {}, + error_details: nil, otp_delivery_preference: 'sms', area_code: '703', carrier: 'Test Mobile Carrier', diff --git a/spec/controllers/users/totp_setup_controller_spec.rb b/spec/controllers/users/totp_setup_controller_spec.rb index 3ab67453d88..d3ff1a139c2 100644 --- a/spec/controllers/users/totp_setup_controller_spec.rb +++ b/spec/controllers/users/totp_setup_controller_spec.rb @@ -110,6 +110,7 @@ result = { success: false, errors: {}, + error_details: nil, totp_secret_present: true, multi_factor_auth_method: 'totp', auth_app_configuration_id: nil, @@ -142,6 +143,7 @@ result = { success: true, errors: {}, + error_details: nil, totp_secret_present: true, multi_factor_auth_method: 'totp', auth_app_configuration_id: next_auth_app_id, @@ -175,6 +177,7 @@ result = { success: false, errors: {}, + error_details: nil, totp_secret_present: true, multi_factor_auth_method: 'totp', auth_app_configuration_id: nil, @@ -242,6 +245,7 @@ result = { success: false, errors: {}, + error_details: nil, totp_secret_present: true, multi_factor_auth_method: 'totp', auth_app_configuration_id: nil, @@ -276,6 +280,7 @@ result = { success: true, errors: {}, + error_details: nil, totp_secret_present: true, multi_factor_auth_method: 'totp', auth_app_configuration_id: next_auth_app_id, @@ -298,6 +303,7 @@ result = { success: true, errors: {}, + error_details: nil, totp_secret_present: true, multi_factor_auth_method: 'totp', auth_app_configuration_id: next_auth_app_id, @@ -329,6 +335,7 @@ result = { success: false, errors: {}, + error_details: nil, totp_secret_present: false, multi_factor_auth_method: 'totp', auth_app_configuration_id: nil, diff --git a/spec/controllers/users/verify_personal_key_controller_spec.rb b/spec/controllers/users/verify_personal_key_controller_spec.rb index 06ebf314b71..e46fcdf6467 100644 --- a/spec/controllers/users/verify_personal_key_controller_spec.rb +++ b/spec/controllers/users/verify_personal_key_controller_spec.rb @@ -107,6 +107,7 @@ expect(@analytics).to receive(:track_event).with( 'Personal key reactivation: Personal key form submitted', errors: {}, + error_details: nil, success: true, pii_like_keypaths: pii_like_keypaths_errors, ).once diff --git a/spec/controllers/users/webauthn_setup_controller_spec.rb b/spec/controllers/users/webauthn_setup_controller_spec.rb index fe5ccd85d8d..b0045caa5a0 100644 --- a/spec/controllers/users/webauthn_setup_controller_spec.rb +++ b/spec/controllers/users/webauthn_setup_controller_spec.rb @@ -105,6 +105,7 @@ multi_factor_auth_method: 'webauthn', success: true, errors: {}, + error_details: nil, in_account_creation_flow: false, authenticator_data_flags: { up: true, @@ -244,6 +245,7 @@ { enabled_mfa_methods_count: 1, errors: {}, + error_details: nil, in_account_creation_flow: true, mfa_method_counts: { webauthn: 1 }, multi_factor_auth_method: 'webauthn', @@ -311,6 +313,7 @@ { enabled_mfa_methods_count: 1, errors: {}, + error_details: nil, in_account_creation_flow: true, mfa_method_counts: { webauthn_platform: 1 }, multi_factor_auth_method: 'webauthn_platform', diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index c0debcc985c..508519c4c6f 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -56,13 +56,13 @@ checked: true, }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth hybrid handoff submitted' => { - success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean + success: true, errors: {}, error_details: nil, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean @@ -74,20 +74,20 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { - success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean }, 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth ssn submitted' => { - success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' + success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' @@ -96,7 +96,7 @@ flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -105,17 +105,17 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation form' => { - success: true, errors: {}, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, otp_delivery_preference: 'sms', + success: true, errors: {}, error_details: nil, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, otp_delivery_preference: 'sms', active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation vendor' => { - success: true, errors: {}, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: false, area_code: '202', country_code: 'US', phone_fingerprint: anything, + success: true, errors: {}, error_details: nil, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: false, area_code: '202', country_code: 'US', phone_fingerprint: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp sent' => { - success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, + success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, error_details: nil, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -182,7 +182,7 @@ checked: true, }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean @@ -200,20 +200,20 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'hybrid', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'hybrid', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'hybrid', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'hybrid', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { - success: true, errors: {}, flow_path: 'hybrid', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, flow_path: 'hybrid', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean }, 'IdV: doc auth ssn visited' => { flow_path: 'hybrid', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth ssn submitted' => { - success: true, errors: {}, flow_path: 'hybrid', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' + success: true, errors: {}, error_details: nil, flow_path: 'hybrid', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify visited' => { flow_path: 'hybrid', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' @@ -222,7 +222,7 @@ flow_path: 'hybrid', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, flow_path: 'hybrid', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, errors: {}, error_details: nil, flow_path: 'hybrid', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -231,12 +231,12 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation form' => { - success: true, errors: {}, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, otp_delivery_preference: 'sms', + success: true, errors: {}, error_details: nil, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, otp_delivery_preference: 'sms', active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation vendor' => { - success: true, errors: {}, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: true, area_code: '202', country_code: 'US', phone_fingerprint: anything, + success: true, errors: {}, error_details: nil, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: true, area_code: '202', country_code: 'US', phone_fingerprint: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -305,13 +305,13 @@ step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth hybrid handoff submitted' => { - success: true, errors: {}, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean + success: true, errors: {}, error_details: nil, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean @@ -323,20 +323,20 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { - success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean }, 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth ssn submitted' => { - success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' + success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' @@ -345,7 +345,7 @@ flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -402,13 +402,13 @@ step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth hybrid handoff submitted' => { - success: true, errors: {}, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean + success: true, errors: {}, error_details: nil, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean @@ -420,7 +420,7 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: true, doc_auth_result: 'Attention', liveness_checking_required: boolean), 'IdV: verify in person troubleshooting option clicked' => { @@ -463,16 +463,16 @@ analytics_id: 'In Person Proofing', step: 'verify', flow_path: 'standard', same_address_as_id: false, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'In Person Proofing', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, same_address_as_id: false, skip_hybrid_handoff: nil, + success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'In Person Proofing', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, same_address_as_id: false, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: 'aaa-bbb-ccc', success: true, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone confirmation form' => { - success: true, errors: {}, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, otp_delivery_preference: 'sms', + success: true, errors: {}, error_details: nil, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, otp_delivery_preference: 'sms', active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' } }, 'IdV: phone confirmation vendor' => { - success: true, errors: {}, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: false, area_code: '202', country_code: 'US', phone_fingerprint: anything, + success: true, errors: {}, error_details: nil, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: false, area_code: '202', country_code: 'US', phone_fingerprint: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' } }, @@ -596,7 +596,7 @@ flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, + success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -605,17 +605,17 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation form' => { - success: true, errors: {}, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, otp_delivery_preference: 'sms', + success: true, errors: {}, error_details: nil, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, otp_delivery_preference: 'sms', active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation vendor' => { - success: true, errors: {}, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: false, area_code: '202', country_code: 'US', phone_fingerprint: anything, + success: true, errors: {}, error_details: nil, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, hybrid_handoff_phone_used: false, area_code: '202', country_code: 'US', phone_fingerprint: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp sent' => { - success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, + success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, error_details: nil, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, diff --git a/spec/features/users/sign_up_spec.rb b/spec/features/users/sign_up_spec.rb index e6b18698a01..0ad102e20f4 100644 --- a/spec/features/users/sign_up_spec.rb +++ b/spec/features/users/sign_up_spec.rb @@ -122,6 +122,7 @@ 'Multi-Factor Authentication Setup', success: true, errors: nil, + error_details: nil, multi_factor_auth_method: 'backup_codes', in_account_creation_flow: true, enabled_mfa_methods_count: 2, diff --git a/spec/forms/idv/api_image_upload_form_spec.rb b/spec/forms/idv/api_image_upload_form_spec.rb index 45c3bb180cd..fd23fdc71a6 100644 --- a/spec/forms/idv/api_image_upload_form_spec.rb +++ b/spec/forms/idv/api_image_upload_form_spec.rb @@ -209,6 +209,7 @@ doc_auth_result: 'Passed', decision_product_status: nil, errors: {}, + error_details: nil, exception: nil, flow_path: anything, remaining_submit_attempts: 3, @@ -312,6 +313,7 @@ decision_product_status: nil, doc_auth_result: 'Passed', errors: {}, + error_details: nil, exception: nil, flow_path: anything, image_metrics: nil, diff --git a/spec/lib/action_account_spec.rb b/spec/lib/action_account_spec.rb index 474954a44d7..719fdd5443c 100644 --- a/spec/lib/action_account_spec.rb +++ b/spec/lib/action_account_spec.rb @@ -169,6 +169,7 @@ 'Fraud: Profile review rejected', success: true, errors: nil, + error_details: nil, exception: nil, profile_fraud_review_pending_at: profile_fraud_review_pending_at, ) @@ -176,6 +177,7 @@ 'Fraud: Profile review rejected', success: false, errors: { message: 'Error: User does not have a pending fraud review' }, + error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) @@ -183,6 +185,7 @@ 'Fraud: Profile review rejected', success: false, errors: { message: 'Error: Could not find user with that UUID' }, + error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) @@ -229,6 +232,7 @@ 'Fraud: Profile review passed', success: true, errors: nil, + error_details: nil, exception: nil, profile_fraud_review_pending_at: profile_fraud_review_pending_at, ) @@ -236,6 +240,7 @@ 'Fraud: Profile review passed', success: false, errors: { message: 'Error: User does not have a pending fraud review' }, + error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) @@ -243,6 +248,7 @@ 'Fraud: Profile review passed', success: false, errors: { message: 'Error: Could not find user with that UUID' }, + error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) diff --git a/spec/support/have_logged_event_matcher.rb b/spec/support/have_logged_event_matcher.rb index af5126f8ae3..86d09a48164 100644 --- a/spec/support/have_logged_event_matcher.rb +++ b/spec/support/have_logged_event_matcher.rb @@ -32,11 +32,7 @@ def matches?(actual) events[expected_event_name] || [] else (events[expected_event_name] || []).filter do |actual_attributes| - compacted_actual_attributes = actual_attributes.select do |key, value| - true if !value.nil? || expected_attributes.key?(key) - end - - values_match?(expected_attributes, compacted_actual_attributes) + values_match?(expected_attributes, actual_attributes) end end From a2e4add4b39438ace9b2ab188eee964c523f0b28 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 17:40:07 -0400 Subject: [PATCH 08/19] Remove unnecessary allowed_extra_analytics --- .../controllers/openid_connect/authorization_controller_spec.rb | 2 +- spec/controllers/openid_connect/user_info_controller_spec.rb | 2 +- spec/controllers/sign_up/passwords_controller_spec.rb | 2 +- .../two_factor_authentication/options_controller_spec.rb | 2 +- spec/controllers/users/email_language_controller_spec.rb | 2 +- spec/controllers/users/phone_setup_controller_spec.rb | 2 +- spec/controllers/users/rules_of_use_controller_spec.rb | 2 +- spec/controllers/users/verify_personal_key_controller_spec.rb | 2 +- spec/features/openid_connect/redirect_uri_validation_spec.rb | 2 +- spec/features/reports/authorization_count_spec.rb | 2 +- spec/features/visitors/password_recovery_spec.rb | 2 +- spec/features/visitors/set_password_spec.rb | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spec/controllers/openid_connect/authorization_controller_spec.rb b/spec/controllers/openid_connect/authorization_controller_spec.rb index d0948ae6505..0cf937f8e6a 100644 --- a/spec/controllers/openid_connect/authorization_controller_spec.rb +++ b/spec/controllers/openid_connect/authorization_controller_spec.rb @@ -1,7 +1,7 @@ # rubocop:disable Layout/LineLength require 'rails_helper' -RSpec.describe OpenidConnect::AuthorizationController, allowed_extra_analytics: [:*] do +RSpec.describe OpenidConnect::AuthorizationController do include WebAuthnHelper before do # All the tests here were written prior to the interstitial diff --git a/spec/controllers/openid_connect/user_info_controller_spec.rb b/spec/controllers/openid_connect/user_info_controller_spec.rb index cc9ed4e6851..40467f5ea85 100644 --- a/spec/controllers/openid_connect/user_info_controller_spec.rb +++ b/spec/controllers/openid_connect/user_info_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe OpenidConnect::UserInfoController, allowed_extra_analytics: [:*] do +RSpec.describe OpenidConnect::UserInfoController do let(:json_response) { JSON.parse(response.body).with_indifferent_access } describe '#show' do diff --git a/spec/controllers/sign_up/passwords_controller_spec.rb b/spec/controllers/sign_up/passwords_controller_spec.rb index 13ab19211bd..2e26813a633 100644 --- a/spec/controllers/sign_up/passwords_controller_spec.rb +++ b/spec/controllers/sign_up/passwords_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe SignUp::PasswordsController, allowed_extra_analytics: [:*] do +RSpec.describe SignUp::PasswordsController do let(:token) { 'new token' } describe '#create' do diff --git a/spec/controllers/two_factor_authentication/options_controller_spec.rb b/spec/controllers/two_factor_authentication/options_controller_spec.rb index 69627d830fa..b8105b120e9 100644 --- a/spec/controllers/two_factor_authentication/options_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/options_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe TwoFactorAuthentication::OptionsController, allowed_extra_analytics: [:*] do +RSpec.describe TwoFactorAuthentication::OptionsController do describe '#index' do it 'renders the page' do sign_in_before_2fa diff --git a/spec/controllers/users/email_language_controller_spec.rb b/spec/controllers/users/email_language_controller_spec.rb index eac8d20e0fd..1aaccdaf48b 100644 --- a/spec/controllers/users/email_language_controller_spec.rb +++ b/spec/controllers/users/email_language_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Users::EmailLanguageController, allowed_extra_analytics: [:*] do +RSpec.describe Users::EmailLanguageController do describe 'before_actions' do it 'includes appropriate before_actions' do expect(subject).to have_actions( diff --git a/spec/controllers/users/phone_setup_controller_spec.rb b/spec/controllers/users/phone_setup_controller_spec.rb index 1102b8fa847..b5b1d462b76 100644 --- a/spec/controllers/users/phone_setup_controller_spec.rb +++ b/spec/controllers/users/phone_setup_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Users::PhoneSetupController, allowed_extra_analytics: [:*] do +RSpec.describe Users::PhoneSetupController do let(:mfa_selections) { ['voice'] } before do allow(IdentityConfig.store).to receive(:phone_service_check).and_return(true) diff --git a/spec/controllers/users/rules_of_use_controller_spec.rb b/spec/controllers/users/rules_of_use_controller_spec.rb index 9877d11e30b..012635be0b7 100644 --- a/spec/controllers/users/rules_of_use_controller_spec.rb +++ b/spec/controllers/users/rules_of_use_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Users::RulesOfUseController, allowed_extra_analytics: [:*] do +RSpec.describe Users::RulesOfUseController do let(:rules_of_use_updated_at) { 1.day.ago } let(:accepted_terms_at) { nil } let(:user) { create(:user, :fully_registered, accepted_terms_at: accepted_terms_at) } diff --git a/spec/controllers/users/verify_personal_key_controller_spec.rb b/spec/controllers/users/verify_personal_key_controller_spec.rb index e46fcdf6467..06720ad6d67 100644 --- a/spec/controllers/users/verify_personal_key_controller_spec.rb +++ b/spec/controllers/users/verify_personal_key_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Users::VerifyPersonalKeyController, allowed_extra_analytics: [:*] do +RSpec.describe Users::VerifyPersonalKeyController do let(:user) { create(:user, personal_key: personal_key) } let!(:profiles) { [] } let(:personal_key) { 'key' } diff --git a/spec/features/openid_connect/redirect_uri_validation_spec.rb b/spec/features/openid_connect/redirect_uri_validation_spec.rb index 17f76594690..9815881d9d1 100644 --- a/spec/features/openid_connect/redirect_uri_validation_spec.rb +++ b/spec/features/openid_connect/redirect_uri_validation_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'redirect_uri validation', allowed_extra_analytics: [:*] do +RSpec.describe 'redirect_uri validation' do include OidcAuthHelper context 'when the redirect_uri in the request does not match one that is registered' do diff --git a/spec/features/reports/authorization_count_spec.rb b/spec/features/reports/authorization_count_spec.rb index 44be18cd863..a82067f5d68 100644 --- a/spec/features/reports/authorization_count_spec.rb +++ b/spec/features/reports/authorization_count_spec.rb @@ -33,7 +33,7 @@ def visit_idp_from_ial2_saml_sp(issuer:) ) end -RSpec.describe 'authorization count', allowed_extra_analytics: [:*] do +RSpec.describe 'authorization count' do include IdvFromSpHelper include OidcAuthHelper include DocAuthHelper diff --git a/spec/features/visitors/password_recovery_spec.rb b/spec/features/visitors/password_recovery_spec.rb index 5f29af416ab..dfc4c00878a 100644 --- a/spec/features/visitors/password_recovery_spec.rb +++ b/spec/features/visitors/password_recovery_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'Password Recovery', allowed_extra_analytics: [:*] do +RSpec.feature 'Password Recovery' do include IdvHelper include PersonalKeyHelper include SamlAuthHelper diff --git a/spec/features/visitors/set_password_spec.rb b/spec/features/visitors/set_password_spec.rb index a0f92e90f2e..6c7edfe9d99 100644 --- a/spec/features/visitors/set_password_spec.rb +++ b/spec/features/visitors/set_password_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'Visitor sets password during signup', allowed_extra_analytics: [:*] do +RSpec.feature 'Visitor sets password during signup' do scenario 'visitor is redirected back to password form when password is blank' do create(:user, :unconfirmed) confirm_last_user From 0917b2bb5878fb6dd71a2711a1fb334282914d39 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 18:02:27 -0400 Subject: [PATCH 09/19] Revert unused error_details from webauthn_setup_submitted --- app/services/analytics_events.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 5b7b0b0aed3..1c3526c30f0 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -5652,13 +5652,11 @@ def webauthn_delete_submitted( # @param [Hash] platform_authenticator # @param [Boolean] success # @param [Hash, nil] errors - # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # Tracks whether or not Webauthn setup was successful def webauthn_setup_submitted( platform_authenticator:, success:, errors: nil, - error_details: nil, **extra ) track_event( @@ -5666,7 +5664,6 @@ def webauthn_setup_submitted( platform_authenticator:, success:, errors:, - error_details:, **extra, ) end From daa38930c7a50e8d2103380ecf1943f25f543cac Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 18:02:51 -0400 Subject: [PATCH 10/19] Add missing error_details in spec assertions --- .../account_reset/delete_account_controller_spec.rb | 1 + .../idv/by_mail/enter_code_controller_spec.rb | 5 +++++ .../controllers/idv/image_uploads_controller_spec.rb | 12 ++++++++++++ .../idv/in_person/state_id_controller_spec.rb | 1 + .../idv/otp_verification_controller_spec.rb | 1 + .../controllers/sign_up/passwords_controller_spec.rb | 1 + .../backup_code_verification_controller_spec.rb | 2 ++ .../options_controller_spec.rb | 1 + .../otp_verification_controller_spec.rb | 2 ++ spec/controllers/users/edit_phone_controller_spec.rb | 1 + .../two_factor_authentication_controller_spec.rb | 2 ++ spec/features/idv/analytics_spec.rb | 10 +++++----- spec/forms/idv/api_image_upload_form_spec.rb | 3 +++ 13 files changed, 37 insertions(+), 5 deletions(-) diff --git a/spec/controllers/account_reset/delete_account_controller_spec.rb b/spec/controllers/account_reset/delete_account_controller_spec.rb index 4f147b4ddf9..8be4a6ba3a5 100644 --- a/spec/controllers/account_reset/delete_account_controller_spec.rb +++ b/spec/controllers/account_reset/delete_account_controller_spec.rb @@ -22,6 +22,7 @@ user_id: user.uuid, success: true, errors: {}, + error_details: nil, mfa_method_counts: { backup_codes: 10, webauthn: 2, phone: 2 }, pii_like_keypaths: [[:mfa_method_counts, :phone]], account_age_in_days: 0, diff --git a/spec/controllers/idv/by_mail/enter_code_controller_spec.rb b/spec/controllers/idv/by_mail/enter_code_controller_spec.rb index afc63cc6d7e..d49a7995d64 100644 --- a/spec/controllers/idv/by_mail/enter_code_controller_spec.rb +++ b/spec/controllers/idv/by_mail/enter_code_controller_spec.rb @@ -201,6 +201,7 @@ 'IdV: enter verify by mail code submitted', success: true, errors: {}, + error_details: nil, pending_in_person_enrollment: false, fraud_check_failed: false, enqueued_at: pending_profile.gpo_confirmation_codes.last.code_sent_at, @@ -243,6 +244,7 @@ 'IdV: enter verify by mail code submitted', success: true, errors: {}, + error_details: nil, pending_in_person_enrollment: true, fraud_check_failed: false, enqueued_at: pending_profile.gpo_confirmation_codes.last.code_sent_at, @@ -271,6 +273,7 @@ 'IdV: enter verify by mail code submitted', success: true, errors: {}, + error_details: nil, pending_in_person_enrollment: false, fraud_check_failed: true, enqueued_at: pending_profile.gpo_confirmation_codes.last.code_sent_at, @@ -299,6 +302,7 @@ 'IdV: enter verify by mail code submitted', success: true, errors: {}, + error_details: nil, pending_in_person_enrollment: false, fraud_check_failed: true, enqueued_at: user.pending_profile.gpo_confirmation_codes.last.code_sent_at, @@ -332,6 +336,7 @@ 'IdV: enter verify by mail code submitted', success: true, errors: {}, + error_details: nil, pending_in_person_enrollment: false, fraud_check_failed: true, enqueued_at: user.pending_profile.gpo_confirmation_codes.last.code_sent_at, diff --git a/spec/controllers/idv/image_uploads_controller_spec.rb b/spec/controllers/idv/image_uploads_controller_spec.rb index 4fc67bb5b26..dc57c502128 100644 --- a/spec/controllers/idv/image_uploads_controller_spec.rb +++ b/spec/controllers/idv/image_uploads_controller_spec.rb @@ -344,6 +344,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, @@ -358,6 +359,7 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, + error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -406,6 +408,7 @@ 'IdV: doc auth image upload vendor pii validation', success: true, errors: {}, + error_details: nil, attention_with_barcode: false, user_id: user.uuid, submit_attempts: 1, @@ -441,6 +444,7 @@ response: DocAuth::Response.new( success: true, errors: {}, + error_details: nil, extra: { doc_auth_result: 'Passed', billed: true, @@ -488,6 +492,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, @@ -586,6 +591,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, @@ -684,6 +690,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, @@ -698,6 +705,7 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, + error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -778,6 +786,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, @@ -792,6 +801,7 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, + error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -896,6 +906,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, @@ -986,6 +997,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: IdentityConfig.store.doc_auth_max_attempts - 1, diff --git a/spec/controllers/idv/in_person/state_id_controller_spec.rb b/spec/controllers/idv/in_person/state_id_controller_spec.rb index eb6ec940606..881484d7bb8 100644 --- a/spec/controllers/idv/in_person/state_id_controller_spec.rb +++ b/spec/controllers/idv/in_person/state_id_controller_spec.rb @@ -166,6 +166,7 @@ { success: true, errors: {}, + error_details: nil, analytics_id: 'In Person Proofing', flow_path: 'standard', step: 'state_id', diff --git a/spec/controllers/idv/otp_verification_controller_spec.rb b/spec/controllers/idv/otp_verification_controller_spec.rb index 775ce466c22..cf8fb56a3f5 100644 --- a/spec/controllers/idv/otp_verification_controller_spec.rb +++ b/spec/controllers/idv/otp_verification_controller_spec.rb @@ -163,6 +163,7 @@ expected_result = { success: true, errors: {}, + error_details: nil, code_expired: false, code_matches: true, otp_delivery_preference: :sms, diff --git a/spec/controllers/sign_up/passwords_controller_spec.rb b/spec/controllers/sign_up/passwords_controller_spec.rb index 2e26813a633..80597c6f9a4 100644 --- a/spec/controllers/sign_up/passwords_controller_spec.rb +++ b/spec/controllers/sign_up/passwords_controller_spec.rb @@ -24,6 +24,7 @@ { success: true, errors: {}, + error_details: nil, user_id: user.uuid, } end diff --git a/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb b/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb index e86f49cc3fd..d7f959620b5 100644 --- a/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb @@ -93,6 +93,7 @@ 'Multi-Factor Authentication', success: true, errors: {}, + error_details: nil, multi_factor_auth_method: 'backup_code', multi_factor_auth_method_created_at: Time.zone.now.strftime('%s%L'), new_device: true, @@ -171,6 +172,7 @@ 'Multi-Factor Authentication', success: false, errors: {}, + error_details: nil, multi_factor_auth_method: 'backup_code', new_device: true, ) diff --git a/spec/controllers/two_factor_authentication/options_controller_spec.rb b/spec/controllers/two_factor_authentication/options_controller_spec.rb index b8105b120e9..14c9c5d8368 100644 --- a/spec/controllers/two_factor_authentication/options_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/options_controller_spec.rb @@ -87,6 +87,7 @@ selection: 'sms', success: true, errors: {}, + error_details: nil, ) end end diff --git a/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb b/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb index dc18bd26fa1..b87fad16fbf 100644 --- a/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb @@ -469,6 +469,7 @@ properties = { success: true, errors: nil, + error_details: nil, confirmation_for_add_phone: true, context: 'confirmation', multi_factor_auth_method: 'sms', @@ -620,6 +621,7 @@ properties = { success: true, errors: nil, + error_details: nil, context: 'confirmation', multi_factor_auth_method: 'sms', multi_factor_auth_method_created_at: nil, diff --git a/spec/controllers/users/edit_phone_controller_spec.rb b/spec/controllers/users/edit_phone_controller_spec.rb index c9df63102fd..6396421d5fb 100644 --- a/spec/controllers/users/edit_phone_controller_spec.rb +++ b/spec/controllers/users/edit_phone_controller_spec.rb @@ -15,6 +15,7 @@ attributes = { success: true, errors: {}, + error_details: nil, delivery_preference: 'voice', make_default_number: true, phone_configuration_id: phone_configuration.id, diff --git a/spec/controllers/users/two_factor_authentication_controller_spec.rb b/spec/controllers/users/two_factor_authentication_controller_spec.rb index 3e34dd01523..729e3460001 100644 --- a/spec/controllers/users/two_factor_authentication_controller_spec.rb +++ b/spec/controllers/users/two_factor_authentication_controller_spec.rb @@ -326,6 +326,7 @@ def index analytics_hash = { success: true, errors: {}, + error_details: nil, **otp_preference_sms, resend: true, context: 'authentication', @@ -494,6 +495,7 @@ def index analytics_hash = { success: true, errors: {}, + error_details: nil, otp_delivery_preference: 'voice', resend: false, context: 'authentication', diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index 508519c4c6f..98e184f0539 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -124,7 +124,7 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp submitted' => { - success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, error_details: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -250,7 +250,7 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp submitted' => { - success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, error_details: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -442,7 +442,7 @@ step: 'state_id', flow_path: 'standard', step_count: 1, analytics_id: 'In Person Proofing', opted_in_to_in_person_proofing: nil }, 'IdV: in person proofing state_id submitted' => { - success: true, flow_path: 'standard', step: 'state_id', step_count: 1, analytics_id: 'In Person Proofing', errors: {}, same_address_as_id: false, opted_in_to_in_person_proofing: nil + success: true, flow_path: 'standard', step: 'state_id', step_count: 1, analytics_id: 'In Person Proofing', errors: {}, error_details: nil, same_address_as_id: false, opted_in_to_in_person_proofing: nil }, 'IdV: in person proofing address visited' => { step: 'address', flow_path: 'standard', analytics_id: 'In Person Proofing', same_address_as_id: false, opted_in_to_in_person_proofing: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil @@ -486,7 +486,7 @@ proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' } }, 'IdV: phone confirmation otp submitted' => { - success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, error_details: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -624,7 +624,7 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp submitted' => { - success: true, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, + success: true, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, error_details: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, diff --git a/spec/forms/idv/api_image_upload_form_spec.rb b/spec/forms/idv/api_image_upload_form_spec.rb index fd23fdc71a6..eadccab3fad 100644 --- a/spec/forms/idv/api_image_upload_form_spec.rb +++ b/spec/forms/idv/api_image_upload_form_spec.rb @@ -169,6 +169,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: document_capture_session.user.uuid, @@ -268,6 +269,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: document_capture_session.user.uuid, @@ -401,6 +403,7 @@ 'IdV: doc auth image upload form submitted', success: true, errors: {}, + error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: document_capture_session.user.uuid, From a44f4b0b5b3b46681ae61b357f06d26294665ff5 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 22:24:03 -0400 Subject: [PATCH 11/19] Remove unused error_details from idv_in_person_locations_searched --- app/services/analytics_events.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 1c3526c30f0..ea0412bf5e1 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -1844,7 +1844,6 @@ def idv_in_person_locations_request_failure( # @param [Boolean] success Whether form validation was successful # @param [Integer] result_total # @param [Hash] errors Errors resulting from form validation - # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception_class # @param [String] exception_message # @param [Integer] response_status_code @@ -1853,7 +1852,6 @@ def idv_in_person_locations_searched( success:, errors:, result_total: 0, - error_details: nil, exception_class: nil, exception_message: nil, response_status_code: nil, @@ -1864,7 +1862,6 @@ def idv_in_person_locations_searched( success:, result_total:, errors:, - error_details:, exception_class:, exception_message:, response_status_code:, From f64f98ebe19eabd91d877c3217f0521e2bdf766a Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 31 May 2024 22:24:44 -0400 Subject: [PATCH 12/19] Remove invalid error_details Remove invalid errors property from idv_in_person_locations_searched --- app/services/analytics_events.rb | 3 -- .../idv/image_uploads_controller_spec.rb | 1 - ...ackup_code_verification_controller_spec.rb | 2 -- spec/features/idv/analytics_spec.rb | 32 +++++++++---------- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index ea0412bf5e1..b11eeae059a 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -1843,14 +1843,12 @@ def idv_in_person_locations_request_failure( # @param [Boolean] success Whether form validation was successful # @param [Integer] result_total - # @param [Hash] errors Errors resulting from form validation # @param [String] exception_class # @param [String] exception_message # @param [Integer] response_status_code # User submitted a search on the location search page and response received def idv_in_person_locations_searched( success:, - errors:, result_total: 0, exception_class: nil, exception_message: nil, @@ -1861,7 +1859,6 @@ def idv_in_person_locations_searched( 'IdV: in person proofing location search submitted', success:, result_total:, - errors:, exception_class:, exception_message:, response_status_code:, diff --git a/spec/controllers/idv/image_uploads_controller_spec.rb b/spec/controllers/idv/image_uploads_controller_spec.rb index dc57c502128..b1855264360 100644 --- a/spec/controllers/idv/image_uploads_controller_spec.rb +++ b/spec/controllers/idv/image_uploads_controller_spec.rb @@ -444,7 +444,6 @@ response: DocAuth::Response.new( success: true, errors: {}, - error_details: nil, extra: { doc_auth_result: 'Passed', billed: true, diff --git a/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb b/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb index d7f959620b5..e86f49cc3fd 100644 --- a/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/backup_code_verification_controller_spec.rb @@ -93,7 +93,6 @@ 'Multi-Factor Authentication', success: true, errors: {}, - error_details: nil, multi_factor_auth_method: 'backup_code', multi_factor_auth_method_created_at: Time.zone.now.strftime('%s%L'), new_device: true, @@ -172,7 +171,6 @@ 'Multi-Factor Authentication', success: false, errors: {}, - error_details: nil, multi_factor_auth_method: 'backup_code', new_device: true, ) diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index 98e184f0539..0d2828a7b43 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -62,7 +62,7 @@ step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth hybrid handoff submitted' => { - success: true, errors: {}, error_details: nil, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean + success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean @@ -74,20 +74,20 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean + success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean }, 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth ssn submitted' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' + success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' @@ -96,7 +96,7 @@ flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -124,7 +124,7 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp submitted' => { - success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, error_details: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -200,11 +200,11 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'hybrid', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'hybrid', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'hybrid', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'hybrid', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, error_details: nil, flow_path: 'hybrid', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean @@ -222,7 +222,7 @@ flow_path: 'hybrid', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, error_details: nil, flow_path: 'hybrid', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, errors: {}, flow_path: 'hybrid', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -323,11 +323,11 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean @@ -345,7 +345,7 @@ flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { @@ -420,7 +420,7 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: true, doc_auth_result: 'Attention', liveness_checking_required: boolean), 'IdV: verify in person troubleshooting option clicked' => { @@ -463,7 +463,7 @@ analytics_id: 'In Person Proofing', step: 'verify', flow_path: 'standard', same_address_as_id: false, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'In Person Proofing', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, same_address_as_id: false, skip_hybrid_handoff: nil, + success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'In Person Proofing', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, same_address_as_id: false, skip_hybrid_handoff: nil, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: 'aaa-bbb-ccc', success: true, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone confirmation form' => { @@ -596,7 +596,7 @@ flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify proofing results' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, + success: true, errors: {}, flow_path: 'standard', address_edited: false, address_line2_present: false, analytics_id: 'Doc Auth', ssn_is_unique: true, step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: anything, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { attributes_requiring_additional_verification: [], can_pass_with_additional_verification: false, errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired', vendor_workflow: nil }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, requested_attributes: {}, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { From 50761764edcbe0f1179852ca13773352711b2199 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 09:09:02 -0400 Subject: [PATCH 13/19] Restore idv_in_person_locations_searched errors as nil-able Sometimes it's sent --- app/services/analytics_events.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index b11eeae059a..6ee04c83dd0 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -1843,12 +1843,14 @@ def idv_in_person_locations_request_failure( # @param [Boolean] success Whether form validation was successful # @param [Integer] result_total + # @param [Hash] errors Errors resulting from form validation # @param [String] exception_class # @param [String] exception_message # @param [Integer] response_status_code # User submitted a search on the location search page and response received def idv_in_person_locations_searched( success:, + errors: nil, result_total: 0, exception_class: nil, exception_message: nil, @@ -1859,6 +1861,7 @@ def idv_in_person_locations_searched( 'IdV: in person proofing location search submitted', success:, result_total:, + errors:, exception_class:, exception_message:, response_status_code:, From a51d15ad00d91f6bcf579041ddb1205853237007 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 09:14:31 -0400 Subject: [PATCH 14/19] Remove error_details from vendor submitted event Not passed (via DocAuthClient response) Remove unused analytics YARDoc error_details --- app/services/analytics_events.rb | 3 --- spec/controllers/idv/image_uploads_controller_spec.rb | 5 ----- spec/forms/idv/api_image_upload_form_spec.rb | 2 -- 3 files changed, 10 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 6ee04c83dd0..0685997e6c6 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -1142,7 +1142,6 @@ def idv_doc_auth_submitted_image_upload_form( # @param [Boolean] success Whether form validation was successful # @param [Hash] errors Errors resulting from form validation - # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception # @param [Boolean] billed # @param [String] doc_auth_result @@ -1203,7 +1202,6 @@ def idv_doc_auth_submitted_image_upload_vendor( client_image_metrics:, flow_path:, liveness_checking_required:, - error_details: nil, billed: nil, doc_auth_result: nil, vendor_request_time_in_ms: nil, @@ -1234,7 +1232,6 @@ def idv_doc_auth_submitted_image_upload_vendor( 'IdV: doc auth image upload vendor submitted', success:, errors:, - error_details:, exception:, billed:, doc_auth_result:, diff --git a/spec/controllers/idv/image_uploads_controller_spec.rb b/spec/controllers/idv/image_uploads_controller_spec.rb index b1855264360..f029a085d88 100644 --- a/spec/controllers/idv/image_uploads_controller_spec.rb +++ b/spec/controllers/idv/image_uploads_controller_spec.rb @@ -359,7 +359,6 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, - error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -506,7 +505,6 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, - error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -605,7 +603,6 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, - error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -704,7 +701,6 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, - error_details: nil, attention_with_barcode: false, async: false, billed: true, @@ -800,7 +796,6 @@ 'IdV: doc auth image upload vendor submitted', success: true, errors: {}, - error_details: nil, attention_with_barcode: false, async: false, billed: true, diff --git a/spec/forms/idv/api_image_upload_form_spec.rb b/spec/forms/idv/api_image_upload_form_spec.rb index eadccab3fad..f1b69b835e5 100644 --- a/spec/forms/idv/api_image_upload_form_spec.rb +++ b/spec/forms/idv/api_image_upload_form_spec.rb @@ -210,7 +210,6 @@ doc_auth_result: 'Passed', decision_product_status: nil, errors: {}, - error_details: nil, exception: nil, flow_path: anything, remaining_submit_attempts: 3, @@ -315,7 +314,6 @@ decision_product_status: nil, doc_auth_result: 'Passed', errors: {}, - error_details: nil, exception: nil, flow_path: anything, image_metrics: nil, From 6d9266ecb7bb69ce13fbc559e54d198c4cc43799 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 09:51:57 -0400 Subject: [PATCH 15/19] Update IdV analytics spec expectations --- spec/features/idv/analytics_spec.rb | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index 0d2828a7b43..e6652de97cb 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -56,7 +56,7 @@ checked: true, }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean @@ -74,11 +74,11 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean @@ -124,7 +124,7 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp submitted' => { - success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, + success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, error_details: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -182,7 +182,7 @@ checked: true, }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean @@ -200,20 +200,20 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'hybrid', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'hybrid', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'hybrid', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'hybrid', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { - success: true, errors: {}, error_details: nil, flow_path: 'hybrid', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean + success: true, errors: {}, flow_path: 'hybrid', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean }, 'IdV: doc auth ssn visited' => { flow_path: 'hybrid', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth ssn submitted' => { - success: true, errors: {}, error_details: nil, flow_path: 'hybrid', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' + success: true, errors: {}, flow_path: 'hybrid', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify visited' => { flow_path: 'hybrid', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' @@ -241,7 +241,7 @@ proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: phone confirmation otp sent' => { - success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, + success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, error_details: nil, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, @@ -305,13 +305,13 @@ step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth hybrid handoff submitted' => { - success: true, errors: {}, error_details: nil, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean + success: true, errors: {}, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean @@ -323,20 +323,20 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean + success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: boolean }, 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth ssn submitted' => { - success: true, errors: {}, error_details: nil, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' + success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' }, 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth' @@ -402,13 +402,13 @@ step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth agreement submitted' => { - success: true, errors: {}, error_details: nil, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default + success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default }, 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth hybrid handoff submitted' => { - success: true, errors: {}, error_details: nil, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean + success: true, errors: {}, destination: :document_capture, flow_path: 'standard', redo_document_capture: nil, step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean }, 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, selfie_check_required: boolean, liveness_checking_required: boolean @@ -420,7 +420,7 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: true, doc_auth_result: 'Attention', liveness_checking_required: boolean), 'IdV: verify in person troubleshooting option clicked' => { @@ -477,7 +477,7 @@ proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' } }, 'IdV: phone confirmation otp sent' => { - success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, + success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', adapter: :test, errors: {}, error_details: nil, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything, active_profile_idv_level: nil, pending_profile_idv_level: nil, proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' } }, @@ -571,11 +571,11 @@ width: 284, height: 38, mimeType: 'image/png', source: 'upload', size: 3694, captureAttempts: 1, flow_path: 'standard', acuant_sdk_upgrade_a_b_testing_enabled: 'false', use_alternate_sdk: anything, acuant_version: kind_of(String), acuantCaptureMode: nil, fingerprint: anything, failedImageResubmission: boolean, documentType: nil, dpi: nil, glare: nil, glareScoreThreshold: nil, isAssessedAsBlurry: nil, isAssessedAsGlare: nil, isAssessedAsUnsupported: nil, moire: nil, sharpness: nil, sharpnessScoreThreshold: nil, assessment: nil, liveness_checking_required: boolean }, 'IdV: doc auth image upload form submitted' => { - success: true, errors: {}, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: an_instance_of(String), liveness_checking_required: boolean + success: true, errors: {}, error_details: nil, submit_attempts: 1, remaining_submit_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: an_instance_of(String), liveness_checking_required: boolean }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: an_instance_of(String), liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' + success: true, errors: {}, error_details: nil, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: an_instance_of(String), liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', selfie_check_required: boolean, liveness_checking_required: true From 70c5a882f16d97fa63027121aaf71b20311fea57 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 11:22:46 -0400 Subject: [PATCH 16/19] Revert unused error_details in fraud review events --- app/services/analytics_events.rb | 22 ++++++++-------------- spec/lib/action_account_spec.rb | 6 ------ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 0685997e6c6..e87d05ae913 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -625,7 +625,6 @@ def forget_all_browsers_visited # @param [Boolean] success Whether form validation was successful # @param [Hash] errors Errors resulting from form validation - # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception # @param [String] profile_fraud_review_pending_at # The user was passed by manual fraud review @@ -634,23 +633,20 @@ def fraud_review_passed( errors:, exception:, profile_fraud_review_pending_at:, - error_details: nil, **extra ) track_event( 'Fraud: Profile review passed', - success:, - errors:, - error_details:, - exception:, - profile_fraud_review_pending_at:, + success: success, + errors: errors, + exception: exception, + profile_fraud_review_pending_at: profile_fraud_review_pending_at, **extra, ) end # @param [Boolean] success Whether form validation was successful # @param [Hash] errors Errors resulting from form validation - # @param [Hash] error_details Details for errors that occurred in unsuccessful submission # @param [String] exception # @param [String] profile_fraud_review_pending_at # The user was rejected by manual fraud review @@ -659,16 +655,14 @@ def fraud_review_rejected( errors:, exception:, profile_fraud_review_pending_at:, - error_details: nil, **extra ) track_event( 'Fraud: Profile review rejected', - success:, - errors:, - error_details:, - exception:, - profile_fraud_review_pending_at:, + success: success, + errors: errors, + exception: exception, + profile_fraud_review_pending_at: profile_fraud_review_pending_at, **extra, ) end diff --git a/spec/lib/action_account_spec.rb b/spec/lib/action_account_spec.rb index 719fdd5443c..474954a44d7 100644 --- a/spec/lib/action_account_spec.rb +++ b/spec/lib/action_account_spec.rb @@ -169,7 +169,6 @@ 'Fraud: Profile review rejected', success: true, errors: nil, - error_details: nil, exception: nil, profile_fraud_review_pending_at: profile_fraud_review_pending_at, ) @@ -177,7 +176,6 @@ 'Fraud: Profile review rejected', success: false, errors: { message: 'Error: User does not have a pending fraud review' }, - error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) @@ -185,7 +183,6 @@ 'Fraud: Profile review rejected', success: false, errors: { message: 'Error: Could not find user with that UUID' }, - error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) @@ -232,7 +229,6 @@ 'Fraud: Profile review passed', success: true, errors: nil, - error_details: nil, exception: nil, profile_fraud_review_pending_at: profile_fraud_review_pending_at, ) @@ -240,7 +236,6 @@ 'Fraud: Profile review passed', success: false, errors: { message: 'Error: User does not have a pending fraud review' }, - error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) @@ -248,7 +243,6 @@ 'Fraud: Profile review passed', success: false, errors: { message: 'Error: Could not find user with that UUID' }, - error_details: nil, exception: nil, profile_fraud_review_pending_at: nil, ) From f7670b978a671658f6a2c4efc36f8a8f12c496b9 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 11:22:57 -0400 Subject: [PATCH 17/19] Simplify diff --- app/services/analytics_events.rb | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index e87d05ae913..ddc4aa4d330 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -1232,8 +1232,8 @@ def idv_doc_auth_submitted_image_upload_vendor( state:, state_id_type:, async:, - submit_attempts:, - remaining_submit_attempts:, + submit_attempts: submit_attempts, + remaining_submit_attempts: remaining_submit_attempts, client_image_metrics:, flow_path:, vendor_request_time_in_ms:, @@ -1841,8 +1841,8 @@ def idv_in_person_locations_request_failure( # User submitted a search on the location search page and response received def idv_in_person_locations_searched( success:, - errors: nil, result_total: 0, + errors: nil, exception_class: nil, exception_message: nil, response_status_code: nil, @@ -1850,12 +1850,12 @@ def idv_in_person_locations_searched( ) track_event( 'IdV: in person proofing location search submitted', - success:, - result_total:, - errors:, - exception_class:, - exception_message:, - response_status_code:, + success: success, + result_total: result_total, + errors: errors, + exception_class: exception_class, + exception_message: exception_message, + response_status_code: response_status_code, **extra, ) end @@ -5641,17 +5641,12 @@ def webauthn_delete_submitted( # @param [Boolean] success # @param [Hash, nil] errors # Tracks whether or not Webauthn setup was successful - def webauthn_setup_submitted( - platform_authenticator:, - success:, - errors: nil, - **extra - ) + def webauthn_setup_submitted(platform_authenticator:, success:, errors: nil, **extra) track_event( :webauthn_setup_submitted, - platform_authenticator:, - success:, - errors:, + platform_authenticator: platform_authenticator, + success: success, + errors: errors, **extra, ) end From 67ab47f8e117d50c782e7966ceadea4072cb1e44 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 11:29:19 -0400 Subject: [PATCH 18/19] Expect success, errors always in logout events --- app/services/analytics_events.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index ddc4aa4d330..b6b2940379d 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -3664,14 +3664,14 @@ def invalid_authenticity_token( # @param [String] method # Logout Initiated def logout_initiated( - success: nil, + success:, + errors:, client_id: nil, sp_initiated: nil, oidc: nil, client_id_parameter_present: nil, id_token_hint_parameter_present: nil, saml_request_valid: nil, - errors: nil, error_details: nil, method: nil, **extra @@ -4035,15 +4035,15 @@ def no_js_detect_stylesheet_loaded(location:, **extra) # @param [String] original_method Method of referring request # OIDC Logout Requested def oidc_logout_requested( - success: nil, + success:, + errors:, + error_details: nil, client_id: nil, sp_initiated: nil, oidc: nil, client_id_parameter_present: nil, id_token_hint_parameter_present: nil, saml_request_valid: nil, - errors: nil, - error_details: nil, method: nil, original_method: nil, **extra @@ -4117,14 +4117,14 @@ def oidc_logout_submitted( # @param [String] method # OIDC Logout Visited def oidc_logout_visited( - success: nil, + success:, + errors:, client_id: nil, sp_initiated: nil, oidc: nil, client_id_parameter_present: nil, id_token_hint_parameter_present: nil, saml_request_valid: nil, - errors: nil, error_details: nil, method: nil, **extra From 529de8e084d49f134b1ccecade226ae360d26fb4 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 3 Jun 2024 12:28:34 -0400 Subject: [PATCH 19/19] Make success, errors nilable for logout_initiated Not always provided: https://github.com/18F/identity-idp/blob/a10bd0b98d30d64d08eac23df91db3aa0830e363/app/controllers/sign_out_controller.rb#L7 --- app/services/analytics_events.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index b6b2940379d..6c00179f47c 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -3664,14 +3664,14 @@ def invalid_authenticity_token( # @param [String] method # Logout Initiated def logout_initiated( - success:, - errors:, + success: nil, client_id: nil, sp_initiated: nil, oidc: nil, client_id_parameter_present: nil, id_token_hint_parameter_present: nil, saml_request_valid: nil, + errors: nil, error_details: nil, method: nil, **extra