[Response Ops][Connectors] New xpack.actions.webhook.ssl.pfx.enabled config#222507
[Response Ops][Connectors] New xpack.actions.webhook.ssl.pfx.enabled config#222507jcger merged 21 commits intoelastic:mainfrom
xpack.actions.webhook.ssl.pfx.enabled config#222507Conversation
This comment was marked as outdated.
This comment was marked as outdated.
21734de to
69fbd57
Compare
…config-disable-ptx-files
…config-disable-ptx-files
|
Pinging @elastic/response-ops (Team:ResponseOps) |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8359[✅] x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/config.ts: 100/100 tests passed. |
azasypkin
left a comment
There was a problem hiding this comment.
Changes in src/platform/test/plugin_functional/test_suites/core_plugins/rendering.ts LGTM.
That being said, maybe it's just me, but xpack.actions.webhook.ssl.pfx for a boolean config looks a bit confusing compared to something with an xxxEnabled or xxxSupported postfix, but I'll defer to the code owners 🙂
x-pack/platform/plugins/shared/actions/server/actions_config.test.ts
Outdated
Show resolved
Hide resolved
| ); | ||
| } | ||
|
|
||
| if (configObject.certType === SSLCertType.PFX) { |
There was a problem hiding this comment.
In the UI, the change was done in public/common/auth/ssl_cert_fields.tsx. That component is shared by all connectors that allow SSL authentication, so whenever the configuration option is set, it will not be visible. Not only for the webhook connector.
By chance, for now, the only connectors that allow SSL/PFX are the webhook connectors(cases webhook too).
On the other hand, in the backend, we validate specifically in server/connector_types/webhook/index.ts. If a connector is added or updated to allow SSL authentication, we will have to remember to copy this validation block there.
So, although the config option is webhook.ssl.pfx, in the FE we hide it everywhere, and in the BE we throw only for webhooks.
Even if the original ticket only mentions the webhook connector, wouldn't it make more sense to disallow PFX completely if the option is set?
We could move this validation somewhere else (maybe to action_executor.ts?), rename the configuration option to something like xpack.actions.ssl.pfx, and be done with it.
There was a problem hiding this comment.
Thanks! To make it affect just the webhook connector I'm adding a prop isPfxEnabled to the AuthConfig component (this is shared by the cases-webhook and the webhook connectors). By default it's set to true and for the webhook connector it's gonna be set to the value of xpack.actions.webhook.ssl.pfx.
Asking if it also should affect cases-webhook. If it does, it's just activating that new prop
Edit: Got the answer, we won't add it to cases-webhook
x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.ts
Outdated
Show resolved
Hide resolved
Thanks for the suggestion! We'll rename it to |
xpack.actions.webhook.ssl.pfx config| </EuiFlexGroup> | ||
| <EuiSpacer size="m" /> | ||
| <AuthConfig readOnly={readOnly} /> | ||
| <AuthConfig readOnly={readOnly} isPfxEnabled={isPfxEnabled} /> |
There was a problem hiding this comment.
Yup, this is better now 🙌
nastasha-solomon
left a comment
There was a problem hiding this comment.
Just a couple minor fixes. Thanks for writing this!
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
|
Starting backport for target branches: 8.19 |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
|
💔 All backports failedManual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…` config (elastic#222507) ## Summary Closes elastic#220416 ## Release note New `xpack.actions.webhook.ssl.pfx.enabled` Kibana setting to disable Webhook connector PFX file support for SSL client authentication --------- Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> (cherry picked from commit 25b4f50) # Conflicts: # docs/reference/configuration-reference/alerting-settings.md # docs/settings-gen/source/kibana-alert-action-settings.yml
…c#228215) Available since 9.1 - 8.19 - elastic#223363 - elastic#221389 - elastic#221389 - elastic#222507 (cherry picked from commit 39dda35)
…c#228215) Available since 9.1 - 8.19 - elastic#223363 - elastic#221389 - elastic#221389 - elastic#222507
…c#228215) Available since 9.1 - 8.19 - elastic#223363 - elastic#221389 - elastic#221389 - elastic#222507
Summary
Closes #220416
Release note
New
xpack.actions.webhook.ssl.pfx.enabledKibana setting to disable Webhook connector PFX file support for SSL client authentication