-
Notifications
You must be signed in to change notification settings - Fork 281
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
Redact sensitive URL parameters from audit logging #4067
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
…ameter Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
….java Co-authored-by: Peter Nied <[email protected]> Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cwperks for adding this feature. Took first pass and left couple of comments. overall looks good.
src/main/java/org/opensearch/security/auth/BackendRegistry.java
Outdated
Show resolved
Hide resolved
src/integrationTest/java/org/opensearch/security/http/JwtAuthenticationWithUrlParamTests.java
Show resolved
Hide resolved
Signed-off-by: Craig Perkins <[email protected]>
@cwperks there seem to be test failures:
Would you please look into those? |
Signed-off-by: Craig Perkins <[email protected]>
@DarshitChanpura The test failures are now resolved. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4067 +/- ##
=======================================
Coverage 65.87% 65.88%
=======================================
Files 298 298
Lines 21307 21338 +31
Branches 3469 3473 +4
=======================================
+ Hits 14037 14058 +21
- Misses 5534 5541 +7
- Partials 1736 1739 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cwperks !
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-4067-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e40efdc0fbf901a8b932bdb36d966ff769cadf53
# Push it to GitHub
git push --set-upstream origin backport/backport-4067-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x Then, create a pull request where the |
I'll create a manual backport for this. |
The backport failed because #4065 has not been merged yet. |
Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Peter Nied <[email protected]> (cherry picked from commit e40efdc) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
) Backport e40efdc from #4067. Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Peter Nied <[email protected]>
…t#4067) Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Peter Nied <[email protected]>
Description
This PR provides a generic method for redacting sensitive URL parameters from the audit log and explicitly redacts the jwtUrlParameter if jwt authentication is enabled and a token is passed via the url to authenticate a request. Previous behavior was to include the full route + all url parameters unredacted in the audit log.
This will replace the sensitive url param with
REDACTED
for the audit log entry.Enhancement
Issues Resolved
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.