Add shared_secret to External status check update_service
What does this MR do and why?
This MR:
- It adds option to add HMAC signature to already existing status checks
- Updates
update
service to handle new property (shared_secret) and store it in DB - Updates tests
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Go to project
- Settings -> Merge requests
- Status checks
- Create status check or update existing one
- Check in network tab that sharedSecret Param is in payload
GET:
curl --header "PRIVATE-TOKEN: <your_access_token>"
--url "http://gitlab.localdev:3000/api/v4/projects/{{project_id}}/external_status_checks"
POST:
curl --request PUT -H "Content-Type: application/json" --header "PRIVATE-TOKEN: <your_access_token>" --url "http://gitlab.localdev:3000/api/v4/projects/{{project_id}}/external_status_checks/{{check_id}}" --data '{ "name":"Test status check", "external_url": "http://test.localdev:3000/api", "shared_secret": "secret", "protected_branch_ids": [] }'
Related to #433035 (closed)
Edited by Artur Fedorov