Skip to content

[Response Ops][Connectors][Email] xpack.actions.email.services.ses.host/port kibana config#221389

Merged
jcger merged 17 commits intoelastic:mainfrom
jcger:issue-220286-email-ses-kbn-cfg
Jun 12, 2025
Merged

[Response Ops][Connectors][Email] xpack.actions.email.services.ses.host/port kibana config#221389
jcger merged 17 commits intoelastic:mainfrom
jcger:issue-220286-email-ses-kbn-cfg

Conversation

@jcger
Copy link
Contributor

@jcger jcger commented May 23, 2025

Summary

Closes #220286

Release note

New AWS SES Email configuration options xpack.actions.email.services.ses.host and xpack.actions.email.services.ses.port.

@jcger jcger marked this pull request as ready for review May 26, 2025 11:24
@jcger jcger requested review from a team as code owners May 26, 2025 11:24
@jcger jcger added backport:skip This PR does not require backporting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// release_note:feature Makes this part of the condensed release notes v9.1.0 v8.19.0 labels May 26, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#8296

[✅] x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/with_aws_ses_kibana_config/config.ts: 100/100 tests passed.
[✅] x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/config.ts: 100/100 tests passed.

see run history

@jcger jcger requested a review from a team as a code owner May 26, 2025 13:37
@jeramysoucy jeramysoucy self-requested a review May 27, 2025 12:37
@jbudz
Copy link
Contributor

jbudz commented May 27, 2025

Can we add this to src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker too?

jcger and others added 2 commits May 29, 2025 16:19
@jcger
Copy link
Contributor Author

jcger commented May 29, 2025

Can we add this to src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker too?

Done in 5b776e7

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the creation of the connector with the new configuration and it works as expected. I left some comments. Also:

  • I noticed that based on the docs, if the service is set and is a well-known service, nodemailer will override the host and port even if they are passed. Should we handle that before sending the email?

  • Could you please run the flaky test runner?

expect(result.email?.domain_allowlist).toEqual(['a.com', 'b.c.com', 'd.e.f.com']);
});

test('email.services.ses', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Let's create one test for each assertion. I know this is what we did above, but I think it is more readable and better to reason about the tests if each assertion is on its own test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in c5c13f1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some tests in x-pack/platform/plugins/shared/actions/server/actions_config.test.ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in c5c13f1

if (config.tenantId == null) {
throw new Error('[tenantId] is required');
}
} else if (config.service === AdditionalEmailServices.AWS_SES) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation here is a breaking change. Before this PR I could create the following connector without issues:

{
    "name": "test",
    "config": {
        "from": "foo@foo.com",
        "service": "ses",
        "host": "foo.com",
        "port": 123,
        "secure": true,
        "hasAuth": false
    },
    "secrets": {},
    "connector_type_id": ".email"
}

Should we validate only if the configuration is set or even not at all? @pmuellr wdyt?

Copy link
Contributor Author

@jcger jcger Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what's the point then in having defaults for this service? Also, in the UI that was not possible. Shouldn't you use "other" for that?

Copy link
Member

@cnasikas cnasikas Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can validate only when the configuration is set. This is not a breaking change. Here we validate even if the validation is not set (aside the defaults), right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 7707502

Data type: `string`

`xpack.actions.email.services.ses.host` ![logo cloud](https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg "Supported on {{ech}}")
: The hostname for an Amazon Simple Email Service (SES) service provider that can be used by email connectors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
: The hostname for an Amazon Simple Email Service (SES) service provider that can be used by email connectors.
: The SMTP endpoint for an Amazon Simple Email Service (SES) service provider that can be used by email connectors.

Monstly to emphasize that HTTPS is not supported and to be more inline with the AWS terminology.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean HTTP? done in c5c13f1

@jcger jcger force-pushed the issue-220286-email-ses-kbn-cfg branch from 7bfacf8 to 7707502 Compare June 5, 2025 12:15
: The SMTP endpoint for an Amazon Simple Email Service (SES) service provider that can be used by email connectors.

::::{warning}
This setting alone is insufficient to override system defaults for the SES SMTP endpoint. You must also configure the `xpack.actions.email.services.ses.port` setting
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nastasha-solomon, could you review it again, please? I did some changes + this warning section is new

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor edits - thanks!

Suggested change
This setting alone is insufficient to override system defaults for the SES SMTP endpoint. You must also configure the `xpack.actions.email.services.ses.port` setting
This setting alone is insufficient for overriding system defaults for the SES SMTP endpoint. You must also configure the `xpack.actions.email.services.ses.port` setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 269bc6b

@jcger jcger added backport:version Backport to applied version labels and removed backport:skip This PR does not require backporting labels Jun 9, 2025
Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I tested various scenarios with and without configuration and everything is working as expected!

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#8363

[✅] x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/with_aws_ses_kibana_config/config.ts: 100/100 tests passed.

see run history

@jcger jcger enabled auto-merge (squash) June 11, 2025 15:03
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
stackConnectors 60.5KB 60.5KB +16.0B

History

@nastasha-solomon nastasha-solomon self-requested a review June 11, 2025 19:02
Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs LGTM too

@jcger jcger merged commit f5b6aa2 into elastic:main Jun 12, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15614985008

@jcger
Copy link
Contributor Author

jcger commented Jun 13, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jcger added a commit to jcger/kibana that referenced this pull request Jun 13, 2025
…ost/port` kibana config (elastic#221389)

## Summary

Closes elastic#220286

## Release note

New AWS SES Email configuration options
`xpack.actions.email.services.ses.host` and
`xpack.actions.email.services.ses.port`.

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
(cherry picked from commit f5b6aa2)

# Conflicts:
#	docs/reference/configuration-reference/alerting-settings.md
#	docs/settings-gen/source/kibana-alert-action-settings.yml
jcger added a commit that referenced this pull request Jun 13, 2025
…s.ses.host/port` kibana config (#221389) (#223870)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Response Ops][Connectors][Email]
`xpack.actions.email.services.ses.host/port` kibana config
(#221389)](#221389)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-12T15:38:08Z","message":"[Response
Ops][Connectors][Email] `xpack.actions.email.services.ses.host/port`
kibana config (#221389)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/220286\n\n## Release
note\n\nNew AWS SES Email configuration
options\n`xpack.actions.email.services.ses.host`
and\n`xpack.actions.email.services.ses.port`.\n\n---------\n\nCo-authored-by:
Lisa Cawley
<lcawley@elastic.co>","sha":"f5b6aa241f08723282c84cb877c7a470611915ed","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:ResponseOps","release_note:feature","backport:version","v9.1.0","v8.19.0"],"title":"[Response
Ops][Connectors][Email] `xpack.actions.email.services.ses.host/port`
kibana
config","number":221389,"url":"https://github.com/elastic/kibana/pull/221389","mergeCommit":{"message":"[Response
Ops][Connectors][Email] `xpack.actions.email.services.ses.host/port`
kibana config (#221389)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/220286\n\n## Release
note\n\nNew AWS SES Email configuration
options\n`xpack.actions.email.services.ses.host`
and\n`xpack.actions.email.services.ses.port`.\n\n---------\n\nCo-authored-by:
Lisa Cawley
<lcawley@elastic.co>","sha":"f5b6aa241f08723282c84cb877c7a470611915ed"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221389","number":221389,"mergeCommit":{"message":"[Response
Ops][Connectors][Email] `xpack.actions.email.services.ses.host/port`
kibana config (#221389)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/220286\n\n## Release
note\n\nNew AWS SES Email configuration
options\n`xpack.actions.email.services.ses.host`
and\n`xpack.actions.email.services.ses.port`.\n\n---------\n\nCo-authored-by:
Lisa Cawley
<lcawley@elastic.co>","sha":"f5b6aa241f08723282c84cb877c7a470611915ed"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
iblancof pushed a commit to iblancof/kibana that referenced this pull request Jun 16, 2025
…ost/port` kibana config (elastic#221389)

## Summary

Closes elastic#220286

## Release note

New AWS SES Email configuration options
`xpack.actions.email.services.ses.host` and
`xpack.actions.email.services.ses.port`.

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
jcger added a commit that referenced this pull request Jul 18, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 18, 2025
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
florent-leborgne added a commit to florent-leborgne/kibana that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:feature Makes this part of the condensed release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ResponseOps][Connectors][Email] Allow users to specify the host when selecting the Amazon SES service

9 participants