Skip to content

Add shared_secret to External status check update_service

What does this MR do and why?

This MR:

  1. It adds option to add HMAC signature to already existing status checks
  2. Updates update service to handle new property (shared_secret) and store it in DB
  3. 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

  1. Go to project
  2. Settings -> Merge requests
  3. Status checks
  4. Create status check or update existing one
  5. 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

Merge request reports

Loading