Event type information in streaming audit event for deploy token
What does this MR do and why?
Add event type information in streaming audit event while creation and revoking deploy token
event type names are as follow:
action | event type |
---|---|
creation | deploy_token_created |
revoke | deploy_token_revoked |
delete | deploy_token_destroyed |
creation failed | deploy_token_creation_failed |
How to set up and validate locally
- Create a deploy token from Project -> Settings -> Repository.
- Check streamed audit event contains correct event type information both in payload and headers.
- Check audit event is saved in database and is visible at {{base url}}/admin/audit_logs.
- Revoke a deploy token from UI.
- Repeat step 2 and 3.
- Create Deploy token using API https://docs.gitlab.com/ee/api/deploy_tokens.html#create-a-project-deploy-token
- Repeat step 2 and 3
- Delete Deploy token using API https://docs.gitlab.com/ee/api/deploy_tokens.html#delete-a-project-deploy-token
- Repeat step 2 and 3
- Try to Create Deploy token using API https://docs.gitlab.com/ee/api/deploy_tokens.html#create-a-project-deploy-token with empty scopes so that it throws error
- Repeat step 2 and 3
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.
Related to #363087 (closed)
Edited by Harsimar Sandhu