argoproj / argoproj/notifications-engine

Enhancement Proposal: Add OAuth2 support for webhooks in addition to already existing BasicAuth

Open
#396 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
334
Forks
217
PR merge metrics
No merged PRs in 30d

Description

# Summary

Today the webhook notification service already supports [BasicAuth](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/services/webhook/#parameters).
An OAuth2 setting should also be added to support more 'modern' usecases and make it more 'complete'.

# Motivation

I ran into a situation where the notification service(**ServiceNow**) was no longer accepting BasicAuth as means of authentication.
It was accepting only OAuth2 for security reasons. _(I'm sure more and more third party services will also stop accepting basic auth in future, hence this proposal)_

So to make it work in the current setup I had to implement a _"not-so-elegant" workaround_ in which a CronJob was periodically creating tokens which could be used by the notification configuration(within the argocd-notifications-cm) whenever required.

# Proposal

Add an optional OAuth2 setting in the already existing parameters for webhook so endusers can choose to their liking between basic and oauth2.
It should be a straightforward implementation by making use of the standard [oauth2 ](https://pkg.go.dev/golang.org/x/oauth2) package.

I can already start working on it :) (unless there are some good reasons why this should not be added)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the webhook notification service's existing BasicAuth parameters and review how the standard golang.org/x/oauth2 package could support an optional OAuth2 configuration. Confirm the expected webhook authentication parameters and document or test that users can choose OAuth2 instead of BasicAuth, including the ServiceNow use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.