Commit 4f047783 authored by Tan Le's avatar Tan Le

Add remote IP address on smart-card audit event

parent 2a53eb6c
...@@ -64,7 +64,7 @@ class SmartcardController < ApplicationController ...@@ -64,7 +64,7 @@ class SmartcardController < ApplicationController
end end
store_active_session 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) sign_in_and_redirect(user)
end 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 ...@@ -168,7 +168,7 @@ RSpec.describe SmartcardController, type: :request do
expect(AuditEventService).to( expect(AuditEventService).to(
receive(:new) 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)) .and_return(audit_event_service))
expect(audit_event_service).to receive_message_chain(:for_authentication, :security_event) 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