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

Email action - user and password should be optional #57143

Closed
peterschretlen opened this issue Feb 7, 2020 · 2 comments · Fixed by #60839
Closed

Email action - user and password should be optional #57143

peterschretlen opened this issue Feb 7, 2020 · 2 comments · Fixed by #60839
Assignees
Labels
Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.7.0

Comments

@peterschretlen
Copy link
Contributor

peterschretlen commented Feb 7, 2020

Describe the feature:

The email action requires user and password in its secrets schema, even though an SMTP service is not required to have authentication.

Describe a specific use case for the feature:

Connecting to an internal SMTP service that does not use authentication. Currently this will give an
error like:

{
  "status": "error",
  "actionId": "...",
  "message": "error sending email",
  "serviceMessage": "Invalid login: 503 5.5.1 Error: authentication not enabled"
}

See also #50646

@peterschretlen peterschretlen added Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Feb 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@pmuellr
Copy link
Member

pmuellr commented Mar 20, 2020

So I think we want to make the secrets properties optional, using the "nullable" schema function to have them saveable as a null:

const SecretsSchema = schema.object({
user: schema.string(),
password: schema.string(),
});

And then not set them in the transport object we send to nodemailer, if they are null:

const transport: any = {
user: secrets.user,
password: secrets.password,
};

I wonder if we'll need some additional nodemailer options, for some reason. We'll see.

pmuellr added a commit to pmuellr/kibana that referenced this issue Mar 21, 2020
resolves elastic#57143

Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters.  This PR changes that requirement, so they
are no longer required.
pmuellr added a commit that referenced this issue Mar 23, 2020
resolves #57143

Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters.  This PR changes that requirement, so they
are no longer required.
pmuellr added a commit to pmuellr/kibana that referenced this issue Mar 23, 2020
resolves elastic#57143

Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters.  This PR changes that requirement, so they
are no longer required.
pmuellr added a commit that referenced this issue Mar 24, 2020
resolves #57143

Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters.  This PR changes that requirement, so they
are no longer required.
@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:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants