Add ssh audit events
What does this MR do and why?
This MR logs the audit event when the group SSH certificate is created or deleted.
Related issue: #427413 (closed)
Screenshots or screen recordings
After:
How to set up and validate locally
- Enable the feature flag
ssh_certificates_rest_endpoints
. - add a SSH certificate to a group in your GDK:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "http://127.0.0.1:3000/api/v4/groups/GROUP_ID/ssh_certificates?title=newtitle&key="http://127.0.0.1:3000/api/v4/groups/29/ssh_certificates?title=newtitle&key=ssh-rsa%20AAAAB3NzaC1yc2EAAAADAQABAAAAgQCxT%2BaWnicS3k2ckFuoaGH3lapt28Wbif72onlVdHIhtUXZCixzs9r%2Bjw2kme4GkUP%2Fu6YUYJ0eEnEQR76uRje1xtoEUeM%2FJoC43iFX%2B3jbOd32gTSWe0NNWtdwLBbt8NqeDGv3WbYAKZfZpEfV7ipb70ju9ML1i94SC45NzbzcRQ%3D%3D%20example%40gitlab.com"
- List the SSH Certificates for a group with:
curl --header "PRIVATE-TOKEN: <your_access_token>" "http://127.0.0.1:3000/api/v4/groups/GROUP_ID/ssh_certificates
- Delete a SSH Certificate with:
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "http://127.0.0.1:3000/api/v4/groups/GROUP_ID/ssh_certificates/<ssh_cert_id_from_previous_request>"
For all the above actions, verify the audit logs.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by sameer shaik