-
Notifications
You must be signed in to change notification settings - Fork 72
[VI-867] Audit Log - User Login #20582
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
Conversation
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/services/user_audit_logger_service.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/services/user_audit_logger_service.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: spec/services/user_audit_logger_service_spec.rb |
743fd50
to
0ee4bc5
Compare
0ee4bc5
to
c2029c3
Compare
a32783d
to
53b782a
Compare
53b782a
to
75511e5
Compare
Generated by 🚫 Danger |
75511e5
to
37b1cd8
Compare
190fbe1
to
9b55871
Compare
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.
Confirmed I was able to log in and see a new user action created. Also, confirmed if the database was not properly seeded, an error occurred but the user was still able to sign in
Summary
UserAuditLogger
logging into SiS & SSOe successful login auth flows to createUserAction
records for user login.TokenResponseGenerator
service callsUserAuditLogger
after session creation.saml_callback
processUserAuditLogger
is called after user is redirected.UserAuditLogger
to create a Rails log on successfulUserAction
creation & some basic error handling.UserActionEvent
records with attributes matching this PR's update to theconfig/audit_log/user_action_events.yml
file have been created in dev, sandbox, staging, and prod environments.Related issue(s)
Testing done
Login flow
UserAction
creationUserActionEvent
record is up to date: delete allUserAction
&UserActionEvent
records and repopulate the DB withrails db:seed
before testing.UserActionEvent
&UserAction
in a rails console following authentication.UserAuditLogger
invocation in the SiS or SSOe flow:SiS Testing
- success:
User audit log created -- { :user_action_event => 13, :user_action_event_details => "Sign in on VA.gov", :status => :success, :user_action => "a4bc236f-3fba-4dd4-9274-593c8a94c1c7" }
- You can also perform a SiS mobile/API authentication to confirm that
acting_ip_address
&acting_user_agent
values are properly set.- error:
[UserAuditLogger] error -- { :error => "undefined method 'validate!' for nil" }
- the
/token
request should still succeed & return tokensSSOe Testing
- success:
User audit log created -- { :user_action_event => 13, :user_action_event_details => "Sign in on VA.gov", :status => :success, :user_action => "80563770-88c5-48e3-8cf0-1fda9ae3b2f2" }
- error:
[UserAuditLogger] error -- { :error => "Validation failed: Status is not included in the list" }
- authentication should still be successful
What areas of the site does it impact?
SSOe & SiS PKCE authentication
Acceptance criteria