-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LG-14198: AAGUID logging #11138
LG-14198: AAGUID logging #11138
Changes from all commits
6c019a3
1485bff
b346568
fc3be21
c3def7a
7db517e
988d2e2
eb1209e
8fb750e
a420317
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ def generic_error_message | |
|
||
private | ||
|
||
attr_reader :success, :transports, :invalid_transports, :protocol | ||
attr_reader :success, :transports, :aaguid, :invalid_transports, :protocol | ||
attr_accessor :user, :challenge, :attestation_object, :client_data_json, | ||
:name, :platform_authenticator, :authenticator_data_flags, :device_name | ||
|
||
|
@@ -110,6 +110,7 @@ def valid_attestation_response?(protocol) | |
) | ||
|
||
begin | ||
@aaguid = attestation_response.authenticator_data.aaguid | ||
attestation_response.valid?(@challenge.pack('c*'), original_origin) | ||
rescue StandardError | ||
false | ||
|
@@ -141,6 +142,7 @@ def create_webauthn_configuration | |
platform_authenticator: platform_authenticator, | ||
transports: transports.presence, | ||
authenticator_data_flags: authenticator_data_flags, | ||
aaguid: aaguid, | ||
) | ||
end | ||
|
||
|
@@ -172,6 +174,7 @@ def extra_analytics_attributes | |
pii_like_keypaths: [[:mfa_method_counts, :phone]], | ||
authenticator_data_flags: authenticator_data_flags, | ||
unknown_transports: invalid_transports.presence, | ||
aaguid: aaguid, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add corresponding YARDoc updates for method documentation in I would have also expected this to be enforced by |
||
}.compact | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddAaguidToWebauthnConfiguration < ActiveRecord::Migration[7.1] | ||
def change | ||
add_column :webauthn_configurations, :aaguid, :string | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple minor comments:
rescue
'dbegin
block to code which is expected to raise.attestation_response
as a consumed parameter insubmit
and the value is derived from that, we could create a method which derives directly from that and avoids another instance variable.