Skip to content

[ResponseOps][Connectors] Support for encrypted headers (frontend)#233695

Merged
adcoelho merged 112 commits intoelastic:mainfrom
georgianaonoleata1904:test-encrypted-headers
Sep 30, 2025
Merged

[ResponseOps][Connectors] Support for encrypted headers (frontend)#233695
adcoelho merged 112 commits intoelastic:mainfrom
georgianaonoleata1904:test-encrypted-headers

Conversation

@georgianaonoleata1904
Copy link
Contributor

@georgianaonoleata1904 georgianaonoleata1904 commented Sep 2, 2025

Fixes to https://github.com/elastic/kibana-team/issues/1857

  • This PR introduces frontend support for sending encrypted headers alongside config headers and authentication headers both in the webhook and cases webhook connectors.

Headers Refactor Summary:

  • Header type selection:
    • users can now choose between config headers and secret headers when adding a header
    • the form dynamically updates the value field depending on the selected header type -> secret headers values are not displayed in the UI for security reasons
  • Validations and restrictions:
    • maximum of 20 headers per connector
    • headers key must be unique; duplicates are not allowed
  • Secret headers handling:
    • secret headers values are not returned when fetching the connector
    • when editing the connector, user must re-enter secret header values to successfully submit
    • both config headers and secret headers are stored in internal for UI purposes, but serialized into config.headers and secrets.secretHeaders when saving
  • Form Serialization/Deserialization:
    • config headers remain in config.headers
    • secret headers are stored in secrets.secretHeaders during form submission
    • both types are merged in the form UI (internal.headers) for display

Backend PR: #230042

Release notes

Add support for encrypted headers in the Webhook connector

georgianaonoleata1904 and others added 30 commits July 31, 2025 12:02
Copy link
Contributor

@js-jankisalvi js-jankisalvi left a comment

Choose a reason for hiding this comment

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

Screen.Recording.2025-09-29.at.13.54.34.mov
And then if I add new headers and try to click the toggle, this happens:

Screen.Recording.2025-09-29.at.13.52.01.mov

Above issues seems to have been fixed, can't reproduce it 👍

Secret headers are still visible after toggling off and on the https headers switch

headers-toggle.mov

Above issue still happens:

webhhok.error.mov
@adcoelho adcoelho force-pushed the test-encrypted-headers branch from 60f160a to 3315325 Compare September 30, 2025 13:04
await objectRemover.removeAll();
});

it.skip('creates a connector via API with config and secret headers and verifies UI', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

just in case, skipped on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it's wip

@adcoelho adcoelho enabled auto-merge (squash) September 30, 2025 16:33
@adcoelho adcoelho merged commit d0e8a3b into elastic:main Sep 30, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
stackConnectors 365 368 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
stackConnectors 707.5KB 714.0KB +6.5KB
triggersActionsUi 1.6MB 1.6MB +143.0B
total +6.6KB
Unknown metric groups

ESLint disabled in files

id before after diff
stackConnectors 4 5 +1

Total ESLint disabled count

id before after diff
stackConnectors 152 153 +1

History

cc @georgianaonoleata1904

adcoelho added a commit that referenced this pull request Oct 1, 2025
## Summary

This test is flaky #205708. This PR caused it #233695
adcoelho added a commit that referenced this pull request Oct 2, 2025
Fixes #237196

## Summary

Reverts some of the changes from #233695 to keep the OpenAI-specific
serializer logic.
adcoelho added a commit to adcoelho/kibana that referenced this pull request Oct 2, 2025
…37234)

Fixes elastic#237196

## Summary

Reverts some of the changes from elastic#233695 to keep the OpenAI-specific
serializer logic.

(cherry picked from commit c7f43df)
adcoelho added a commit that referenced this pull request Oct 3, 2025
…7234) (#237312)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[ResponseOps][Connectors] Fix headers for openai connector
(#237234)](#237234)

<!--- Backport version: 10.0.2 -->

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

<!--BACKPORT
[{"author":{"name":"Antonio","email":"antonio.coelho@elastic.co"},"sourceCommit":{"committedDate":"2025-10-02T13:44:34Z","message":"[ResponseOps][Connectors]
Fix headers for openai connector (#237234)\n\nFixes #237196\n\n##
Summary\n\nReverts some of the changes from #233695 to keep the
OpenAI-specific\nserializer
logic.","sha":"c7f43dfd248cac21d35f772aa4186f0530637f40","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:ResponseOps","v9.2.0"],"title":"[ResponseOps][Connectors]
Fix headers for openai
connector","number":237234,"url":"https://github.com/elastic/kibana/pull/237234","mergeCommit":{"message":"[ResponseOps][Connectors]
Fix headers for openai connector (#237234)\n\nFixes #237196\n\n##
Summary\n\nReverts some of the changes from #233695 to keep the
OpenAI-specific\nserializer
logic.","sha":"c7f43dfd248cac21d35f772aa4186f0530637f40"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237234","number":237234,"mergeCommit":{"message":"[ResponseOps][Connectors]
Fix headers for openai connector (#237234)\n\nFixes #237196\n\n##
Summary\n\nReverts some of the changes from #233695 to keep the
OpenAI-specific\nserializer
logic.","sha":"c7f43dfd248cac21d35f772aa4186f0530637f40"}}]}]
BACKPORT-->

Co-authored-by: Janki Salvi <117571355+js-jankisalvi@users.noreply.github.com>
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…lastic#233695)

Fixes to elastic/kibana-team#1857

- This PR introduces frontend support for sending encrypted headers
alongside config headers and authentication headers both in the webhook
and cases webhook connectors.

Headers Refactor Summary: 

- `Header type selection`:
- users can now choose between config headers and secret headers when
adding a header
- the form dynamically updates the value field depending on the selected
header type -> secret headers values are not displayed in the UI for
security reasons
 - `Validations and restrictions`:
    - maximum of **20 headers** per connector 
    - headers key must be unique; duplicates are not allowed
- `Secret headers handling`:
- secret headers values are not returned when fetching the connector
- when editing the connector, user must re-enter secret header values to
successfully submit
- both config headers and secret headers are stored in __internal__ for
UI purposes, but serialized into config.headers and
secrets.secretHeaders when saving
 - `Form Serialization/Deserialization`:
     - config headers remain in config.headers 
- secret headers are stored in secrets.secretHeaders during form
submission
- both types are merged in the form UI (__internal__.headers) for
display


Backend PR: elastic#230042

## Release notes

Add support for encrypted headers in the Webhook connector

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: adcoelho <antonio.coelho@elastic.co>
Co-authored-by: Christos Nasikas <xristosnasikas@gmail.com>
Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…37234)

Fixes elastic#237196

## Summary

Reverts some of the changes from elastic#233695 to keep the OpenAI-specific
serializer logic.
georgianaonoleata1904 added a commit that referenced this pull request Oct 17, 2025
#237084)

Fixes for
#233695 (comment)

- Fix Step 1 validation for dynamic headers in Cases Webhook connector

---------

Co-authored-by: Antonio <antonio.coelho@elastic.co>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 20, 2025
elastic#237084)

Fixes for
elastic#233695 (comment)

- Fix Step 1 validation for dynamic headers in Cases Webhook connector

---------

Co-authored-by: Antonio <antonio.coelho@elastic.co>
(cherry picked from commit c4dde23)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 20, 2025
elastic#237084)

Fixes for
elastic#233695 (comment)

- Fix Step 1 validation for dynamic headers in Cases Webhook connector

---------

Co-authored-by: Antonio <antonio.coelho@elastic.co>
(cherry picked from commit c4dde23)
kibanamachine added a commit that referenced this pull request Oct 20, 2025
… up fix (#237084) (#239676)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[ResponseOps][Connectors] Support for encrypted headers, follow up
fix (#237084)](#237084)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Georgiana-Andreea
Onoleață","email":"georgiana.onoleata@elastic.co"},"sourceCommit":{"committedDate":"2025-10-17T10:40:12Z","message":"[ResponseOps][Connectors]
Support for encrypted headers, follow up fix (#237084)\n\nFixes
for\nhttps://github.com//pull/233695#issuecomment-3345880163\n\n-
Fix Step 1 validation for dynamic headers in Cases Webhook
connector\n\n---------\n\nCo-authored-by: Antonio
<antonio.coelho@elastic.co>","sha":"c4dde231b43f1b68a3c4cdc0661f63aaa1a089ae","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","backport:version","v9.2.0","v9.3.0"],"title":"[ResponseOps][Connectors]
Support for encrypted headers, follow up
fix","number":237084,"url":"https://github.com/elastic/kibana/pull/237084","mergeCommit":{"message":"[ResponseOps][Connectors]
Support for encrypted headers, follow up fix (#237084)\n\nFixes
for\nhttps://github.com//pull/233695#issuecomment-3345880163\n\n-
Fix Step 1 validation for dynamic headers in Cases Webhook
connector\n\n---------\n\nCo-authored-by: Antonio
<antonio.coelho@elastic.co>","sha":"c4dde231b43f1b68a3c4cdc0661f63aaa1a089ae"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237084","number":237084,"mergeCommit":{"message":"[ResponseOps][Connectors]
Support for encrypted headers, follow up fix (#237084)\n\nFixes
for\nhttps://github.com//pull/233695#issuecomment-3345880163\n\n-
Fix Step 1 validation for dynamic headers in Cases Webhook
connector\n\n---------\n\nCo-authored-by: Antonio
<antonio.coelho@elastic.co>","sha":"c4dde231b43f1b68a3c4cdc0661f63aaa1a089ae"}}]}]
BACKPORT-->

Co-authored-by: Georgiana-Andreea Onoleață <georgiana.onoleata@elastic.co>
Co-authored-by: Antonio <antonio.coelho@elastic.co>
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Oct 23, 2025
elastic#237084)

Fixes for
elastic#233695 (comment)

- Fix Step 1 validation for dynamic headers in Cases Webhook connector

---------

Co-authored-by: Antonio <antonio.coelho@elastic.co>
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Oct 27, 2025
elastic#237084)

Fixes for
elastic#233695 (comment)

- Fix Step 1 validation for dynamic headers in Cases Webhook connector

---------

Co-authored-by: Antonio <antonio.coelho@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.2.0

9 participants