Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4f047783
Commit
4f047783
authored
Oct 19, 2020
by
Tan Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add remote IP address on smart-card audit event
parent
2a53eb6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
ee/app/controllers/smartcard_controller.rb
ee/app/controllers/smartcard_controller.rb
+1
-1
ee/changelogs/unreleased/239305-audit-remote-ip-smartcard-controller.yml
...nreleased/239305-audit-remote-ip-smartcard-controller.yml
+5
-0
ee/spec/requests/smartcard_controller_spec.rb
ee/spec/requests/smartcard_controller_spec.rb
+1
-1
No files found.
ee/app/controllers/smartcard_controller.rb
View file @
4f047783
...
@@ -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
...
...
ee/changelogs/unreleased/239305-audit-remote-ip-smartcard-controller.yml
0 → 100644
View file @
4f047783
---
title
:
Add remote IP address on smart-card audit event
merge_request
:
45512
author
:
type
:
changed
ee/spec/requests/smartcard_controller_spec.rb
View file @
4f047783
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment