Commit 070a788d authored by Markus Koller's avatar Markus Koller

Merge branch '239305-audit-remote-ip-smartcard-controller' into 'master'

Add remote IP address on smart-card audit event

See merge request gitlab-org/gitlab!45512
parents 9ed970a3 4f047783
......@@ -64,7 +64,7 @@ class SmartcardController < ApplicationController
end
store_active_session
log_audit_event(user, with: certificate.auth_method)
log_audit_event(user, with: certificate.auth_method, ip_address: request.remote_ip)
sign_in_and_redirect(user)
end
......
---
title: Add remote IP address on smart-card audit event
merge_request: 45512
author:
type: changed
......@@ -168,7 +168,7 @@ RSpec.describe SmartcardController, type: :request do
expect(AuditEventService).to(
receive(:new)
.with(instance_of(User), instance_of(User), with: auth_method)
.with(instance_of(User), instance_of(User), with: auth_method, ip_address: '127.0.0.1')
.and_return(audit_event_service))
expect(audit_event_service).to receive_message_chain(:for_authentication, :security_event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment