Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for sending email with oauth2 authentication #1950

Open
mwohlin opened this issue Jul 3, 2019 · 5 comments · May be fixed by #4123
Open

Support for sending email with oauth2 authentication #1950

mwohlin opened this issue Jul 3, 2019 · 5 comments · May be fixed by #4123

Comments

@mwohlin
Copy link

mwohlin commented Jul 3, 2019

What did you do?
I need to be able to send emails from Alertmanager to o365 using oauth2 authentication. Looking at the code I see it support CRAM-MD5, PLAIN and LOGIN

What did you expect to see?
Can we get oauth2 added?

  • Alertmanager version:

0.17.0

  • Prometheus version:

2.7.1

@brian-brazil
Copy link
Contributor

I believe this requires state, and is also tricky to implement, so doesn't quite make sense here.

@mwohlin
Copy link
Author

mwohlin commented Jul 3, 2019

Thank you for responding so quickly!
I don't believe state is required. It needs to make 2 calls, one to retrieve a token and then one to send the email with the token. I did find an example go smtp which uses oauth2.
The code does not fit this use case exactly but it looks like it has all of the parts needed.
What do you think?
https://github.com/fhs/misc/blob/master/cmd/gmailsmtp/main.go

Authenticating with username and password is being deprecated at my employer.

@brian-brazil
Copy link
Contributor

I think this is something that varies by provider, so a generic implementation isn't possible. I'd suggest asking for a role account that can use a supported auth mechanism.

@mwohlin
Copy link
Author

mwohlin commented Jul 3, 2019 via email

@brian-brazil
Copy link
Contributor

A user account created solely for use of a service (e.g. alertmanager), rather than an user account that's tied to a person.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants