Skip to content

Add HTTP Basic support for Alert authentication

Sean Arnold requested to merge sarnold-add-http-basic-auth-to-alerts into master

What does this MR do and why?

Adds HTTP Basic authentication support for the Alert endpoint (https://docs.gitlab.com/ee/operations/incident_management/integrations.html#customize-the-alert-payload-outside-of-gitlab).

Where the API token is someauthtoken, you can now set your username/password to:

  • username: <blank>
  • password someauthtoken

So the resulting header would be: HTTP_AUTHORIZATION: Basic OnNvbWVhdXRodG9rZW4=.

Some tools are unable to manually set headers all auth, and provide HTTP basic only.

Some others support no auth or headers at all. For these tools they can add the HTTP basic credentials inside the URL itself.

Contributes to #340962 (closed)

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sean Arnold

Merge request reports