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

[Response Ops][Connectors] Cases webhook connector requires hasAuth=true to pass headers to request #189394

Closed
ymao1 opened this issue Jul 29, 2024 · 5 comments
Labels
Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@ymao1
Copy link
Contributor

ymao1 commented Jul 29, 2024

From this PR: #183162

When HTTP headers are specified in the cases webhook connector, the above PR made a change that required the hasAuth flag to be checked in order for those headers to be included in the request. This is a breaking change as existing case webhook connectors will no longer work as expected.

Seems like it's this specific commit: 104f881

Instead of

const headersWithBasicAuth = hasAuth
    ? combineHeadersWithBasicAuthHeader({
        username: user ?? undefined,
        password: password ?? undefined,
        headers,
      })
    : {};

we can just do

const headersWithBasicAuth = combineHeadersWithBasicAuthHeader({
        username: user ?? undefined,
        password: password ?? undefined,
        headers,
      })?
@ymao1 ymao1 added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework labels Jul 29, 2024
@elasticmachine
Copy link
Contributor

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

@ymao1
Copy link
Contributor Author

ymao1 commented Jul 29, 2024

We should also check out all the connectors that were touched in #183162 to ensure that the http headers are still passed as expected.

@ymao1
Copy link
Contributor Author

ymao1 commented Jul 29, 2024

cc @cnasikas

@cnasikas
Copy link
Member

This PR #185925 fixed the bug for 8.15+. I did an audit of all connectors using combineHeadersWithBasicAuthHeader; no other connector is affected. Also, all connectors have tests to verify that additional headers are being passed properly.

@cnasikas
Copy link
Member

PR #189583 will add the bug as a known issue to the 8.14 release notes. I am closing the issue as it is considered fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

3 participants