Skip to content

[fs] Mask S3 delegation token access keys in logs#3421

Open
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:s3-mask-keys
Open

[fs] Mask S3 delegation token access keys in logs#3421
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:s3-mask-keys

Conversation

@QuakeWang
Copy link
Copy Markdown

Purpose

Linked issue: close #1989

The S3 delegation token provider and receiver logged full access key IDs when obtaining or updating temporary session credentials. This exposed credential identifiers in logs, while the log only needs enough information to confirm which key path is being used.

Brief change log

  • Add a package-local S3 token log utility to keep a short access-key prefix and mask the rest.
  • Mask access key IDs in S3 delegation token provider and receiver logs.
  • Add unit tests for null, short, and normal access key values.

Tests

  • mvn -pl fluss-filesystems/fluss-fs-s3 -am -Dtest=S3TokenLogUtilsTest -DfailIfNoTests=false clean test

API and Format

Documentation

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Copy link
Copy Markdown
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM

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.

[FileSystem] Mask user secret in the S3DelegationTokenProvider/S3DelegationTokenReceiver

2 participants