Skip to content

fix(access-control): stop logging bearer tokens - #9574

Open
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:fix/access-control-no-token-logging
Open

Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:fix/access-control-no-token-logging

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • checkComputingUnitAccess no longer logs the extracted bearer token or the full request URI and header map (which carry the Authorization token and the access-token query parameter); it now logs only the request path.

Any related issues, documentation, discussions?

Closes: #9571

How was this PR tested?

  • This is a logging-only change with no behavior change, so it has no unit test; run sbt "AccessControlService/compile" under JDK 17 and expect success.
  • Make a request that hits the computing-unit access check and confirm the service log no longer contains the bearer token or the Authorization header, only the request path.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.8 in compliance with ASF

checkComputingUnitAccess logged the extracted bearer token in full at INFO, and alongside it the whole request URI and header map, which also carry the Authorization token and the access-token query parameter. Both lines wrote live credentials into the logs on every authorize call. The token log is removed and the request log now records only the request path, which carries no secret.
@github-actions github-actions Bot added fix platform Non-amber Scala service paths labels Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @zyratlo
    You can notify them by mentioning @zyratlo in a comment.

@Yicong-Huang Yicong-Huang added the release/v1.3 back porting to release/v1.3 label Nov 20, 2026
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Nov 20, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 November 20, 2026 21:47
@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.
✅ release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.

Auto-label run.

@codecov-commenter

codecov-commenter commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.14%. Comparing base (7f9bdf3) to head (104c5b8).

Files with missing lines Patch % Lines
...exera/service/resource/AccessControlResource.scala 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9574      +/-   ##
============================================
- Coverage     91.57%   91.14%   -0.43%     
+ Complexity     5158     5115      -43     
============================================
  Files          1300     1291       -9     
  Lines         58092    58274     +182     
  Branches       7615     7730     +115     
============================================
- Hits          53195    53116      -79     
- Misses         2959     3227     +268     
+ Partials       1938     1931       -7     
Flag Coverage Δ *Carryforward flag
access-control-service 79.91% <0.00%> (+2.46%) ⬆️
agent-service 99.56% <ø> (ø) Carriedforward from 7f9bdf3
amber 85.43% <ø> (ø) Carriedforward from 7f9bdf3
computing-unit-managing-service 59.97% <ø> (-3.91%) ⬇️
config-service 80.57% <ø> (-6.93%) ⬇️
file-service 61.72% <ø> (-20.45%) ⬇️
frontend 96.45% <ø> (ø) Carriedforward from 7f9bdf3
notebook-migration-service 85.84% <ø> (+2.06%) ⬆️
pyamber 98.38% <ø> (ø) Carriedforward from 7f9bdf3
result-service 85.71% <ø> (ø)
workflow-compiling-service 69.41% <ø> (-8.90%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix platform Non-amber Scala service paths release/v1.2 back porting to release/v1.2 release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Access-control service logs bearer tokens in plaintext

3 participants