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

[Actions] ensure built-in email action works with cloud smtp relay #50646

Closed
pmuellr opened this issue Nov 14, 2019 · 7 comments
Closed

[Actions] ensure built-in email action works with cloud smtp relay #50646

pmuellr opened this issue Nov 14, 2019 · 7 comments
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture v7.6.0 v8.0.0

Comments

@pmuellr
Copy link
Member

pmuellr commented Nov 14, 2019

Our current built-in email action has only been tested with mail "services" (like the nodemailer built-in "gmail" service). For cloud, sounds like every cluster will have an smtp relay available.

We should make sure we can actually use this relay successfully, using the built-in email. We may need to provide some additional functionality to make it work.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services (Team:Stack Services)

@pmuellr
Copy link
Member Author

pmuellr commented Nov 26, 2019

This should be easy to test once #50209 lands - "Enable alerting plugins by default". Spin up a cloud instance using Kibana master, and try creating an email action with the existing email action type, and then executing it.

@bmcconaghy bmcconaghy added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Stack Services labels Dec 12, 2019
@peterschretlen
Copy link
Contributor

I tried this out today and it looks like we have a similar problem to #55359. The email action requires a user and password but the internal service does not have authentication, and fails because we're trying to give it credentials:


$ curl -s -k -Hkbn-xsrf:true -u elastic:########## -HContent-Type:application/json -d '{"name":"relay", "actionTypeId":".email", "config":{"host":"########## ", "port": #######, "secure":true, "from":"[email protected]" }, "secrets": {"user":"x", "password":"x"} }' https://######################.europe-west1.gcp.cloud.es.io:9243/api/action | jq .
{
  "id": "beda7d95-ad21-4900-880d-12ea326d25ae",
  "actionTypeId": ".email",
  "name": "relay",
  "config": {
    "host": "###############",
    "port": #########,
    "secure": true,
    "from": "[email protected]",
    "service": null
  }
}

$ curl -s -k -Hkbn-xsrf:true -u elastic:########## -HContent-Type:application/json -d '{ "params":{"to":["##########@elastic.co"],"subject":"test email","message":"this is a test"} }' https://######################.europe-west1.gcp.cloud.es.io:9243/api/action/beda7d95-ad21-4900-880d-12ea326d25ae/_execute | jq .
{
  "status": "error",
  "actionId": "beda7d95-ad21-4900-880d-12ea326d25ae",
  "message": "error sending email",
  "serviceMessage": "Invalid login: 503 5.5.1 Error: authentication not enabled"
}

@pmuellr
Copy link
Member Author

pmuellr commented Feb 8, 2020

Not sure what the remediation is here? Not require auth credentials and pass those to node mailer? I think I need more context ...

nvm - think I understand - seems like the fix for #57143 will fix this

@pmuellr
Copy link
Member Author

pmuellr commented Jun 24, 2020

I believe this was fixed for 7.7 or a patch of that, but would be good to re-test with 7.8 manually to make sure things are still working, since we don't have an automated test for this.

@YulNaumenko YulNaumenko added the technical debt Improvement of the software architecture and operational architecture label Mar 11, 2021
@ymao1
Copy link
Contributor

ymao1 commented Apr 23, 2021

Closing as done.

@ymao1 ymao1 closed this as completed Apr 23, 2021
@pmuellr
Copy link
Member Author

pmuellr commented Apr 23, 2021

We've tested this numerous times over multiple releases - should work now in recent Kibanas.

@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture v7.6.0 v8.0.0
Projects
None yet
Development

No branches or pull requests

7 participants