Add add_ssh_key audit event type
What does this MR do and why?
User audit event already existed, however, it had no event name. This MR adds the add_ssh_key audit event type and extends to a Group audit event if the user is an Enterprise User.
References
Screenshots or screen recordings
| Before | After |
|---|---|
Before:
{
"id": 32,
"author_id": 76,
"entity_id": 76,
"entity_type": "User",
"event_name": null,
"details": {
"custom_message": "Added SSH key",
"author_name": "Test User",
"target_id": 16,
"target_type": "User",
"target_details": "SSH Key",
"ip_address": "127.0.0.1",
"entity_path": "test",
"author_email": "test@test.test"
},
"created_at": "2025-06-23T16:51:18.317Z"
}
After:
{
"id": 34,
"author_id": 76,
"entity_id": 76,
"entity_type": "User",
"event_name": "add_ssh_key",
"details": {
"event_name": "add_ssh_key",
"author_name": "Test User",
"author_class": "User",
"target_id": 17,
"target_type": "Key",
"target_details": "SSH Key",
"custom_message": "Added SSH key",
"ip_address": "127.0.0.1",
"entity_path": "test",
"author_email": "test@test.test"
},
"created_at": "2025-06-23T16:52:13.785Z"
}
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Jio Castillo