8000 Do not trace authn http request bodies by savonarola · Pull Request #11750 · emqx/emqx · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@savonarola
Copy link
Contributor
@savonarola savonarola commented Oct 11, 2023

Fixes EMQX-11130

Summary

🤖 Generated by Copilot at c237ddf

This pull request enhances the security, logging, and tracing of HTTP authentication and bridge requests, adds a new GitHub workflow for Scorecard analysis, fixes some bugs and flaky tests, and updates the version number of the emqx_bridge_http application. It modifies the files emqx_authn_http.erl, emqx_bridge_http_connector.erl, emqx_bridge_http_SUITE.erl, scorecard.yaml, emqx_bridge_http_connector.hrl, emqx_bridge_http.app.src, and emqx_bridge_kafka_impl_consumer_SUITE.erl.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • [na] Added tests for the changes
  • [na] Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • [] Change log has been added to changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • [na] Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

@savonarola savonarola force-pushed the 1011-redact-auth-http-request branch 5 times, most recently from b616836 to 11defc5 Compare October 11, 2023 13:59
Copy link
Contributor Author
@savonarola savonarola Oct 11, 2023

Choose a reason for hiding this comment

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

Seems that we already decided not to log request bodies, so I just chose to do that more consistently.

Also the redacted authn request (with body) is already logged in the authn provider itself.

@savonarola savonarola changed the title Do not trace authn http requests Do not trace authn http request bodies Oct 11, 2023
@savonarola
Copy link
Contributor Author

Also, a user may choose to send the password in the URL part. However, this is completely insecure in many levels, so I don't think we should try to redact the URL all.

Maybe we should just forbid password interpolation in the URL part instead.

@zmstone
Copy link
Member
zmstone commented Oct 12, 2023

we probably need to trace the parameters used to build the request body (before encoded to JSON).

@savonarola
Copy link
Contributor Author

@zmstone we trace full and secured request inside the provider https://github.com/emqx/emqx/blob/master/apps/emqx_auth_http/src/emqx_authn_http.erl#L73

@savonarola savonarola marked this pull request as ready for review October 12, 2023 10:40
@savonarola savonarola requested a review from a team as a code owner October 12, 2023 10:40
@savonarola savonarola force-pushed the 1011-redact-auth-http-request branch from 11defc5 to 68f31a9 Compare October 12, 2023 13:32
@savonarola savonarola merged commit 90a0c09 into emqx:release-53 Oct 13, 2023
@savonarola savonarola deleted the 1011-redact-auth-http-request branch April 26, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0