Skip to content

[BugFix] insert files credential redaction 3.5 (backport #71245)#71864

Merged
kevincai merged 1 commit into
StarRocks:branch-3.5from
srihithg:backport-insert-files-credential-redaction-3.5
Apr 23, 2026
Merged

[BugFix] insert files credential redaction 3.5 (backport #71245)#71864
kevincai merged 1 commit into
StarRocks:branch-3.5from
srihithg:backport-insert-files-credential-redaction-3.5

Conversation

@srihithg
Copy link
Copy Markdown
Contributor

@srihithg srihithg commented Apr 17, 2026

Why I'm doing:

manual backport of #71245

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
    • This pr needs auto generate documentation
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.1
    • 4.0
    • 3.5
    • 3.4

@srihithg srihithg requested review from a team as code owners April 17, 2026 19:24
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 17, 2026
@srihithg srihithg changed the base branch from main to branch-3.5 April 17, 2026 19:30
@srihithg srihithg force-pushed the backport-insert-files-credential-redaction-3.5 branch from 64f59d4 to a43893a Compare April 17, 2026 19:32
@github-actions github-actions Bot removed the documentation Improvements or additions to documentation label Apr 17, 2026
@srihithg srihithg force-pushed the backport-insert-files-credential-redaction-3.5 branch from a43893a to 9bd287d Compare April 17, 2026 19:37
@srihithg srihithg changed the title [BugFix] insert files credential redaction (backport #71245) [BugFix] insert files credential redaction 3.5 (backport #71245) Apr 17, 2026
@kevincai kevincai removed request for a team April 20, 2026 13:52
@kevincai kevincai requested review from kevincai and removed request for a team April 20, 2026 13:52
Comment thread fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java Outdated
@srihithg srihithg requested a review from kevincai April 21, 2026 20:32
@srihithg srihithg force-pushed the backport-insert-files-credential-redaction-3.5 branch from 1cf7703 to ea14c41 Compare April 22, 2026 04:18
Backport credential redaction for INSERT INTO FILES and related flows
to branch-3.5.

Compared with the upstream PR on main (StarRocks#71245), this backport:

- Preserves the full set of credential regex patterns, including the
  user-authentication clauses (IDENTIFIED BY / IDENTIFIED WITH /
  SET PASSWORD) that were introduced by StarRocks#70360 and are also present on
  branch-3.5.
- Adapts SqlCredentialRedactor to the re2j regex engine used on this
  branch (no backreferences), so the single-/double-quoted KEY = 'value'
  matching is expressed as two alternatives rather than a backref.
- Applies redaction to the same StmtExecutor call sites as branch-4.1
  (planner-error log, explain exec-plan failure log, retry loop,
  LargeInPredicate retry, registerQuery / QueryInfo for both the
  normal and load paths, DDL QueryStateException + delete-handler +
  generic-throwable logs, DML fail log, crash-cancel SQL log, insert
  throwable log) via a new getRedactedOriginStmtInString() helper.

Tests:
- SqlCredentialRedactorTest mirrors the upstream PR scenarios,
  including the user-auth clauses.
- StmtExecutorTest ports the two redaction-focused scenarios
  (testGetRedactedOriginStmtInStringScenarios,
  testBuildTopLevelProfileSqlStatementScenarios). The remaining
  StatementPlanner / Coordinator / profile-digest tests from StarRocks#71245
  depend on APIs (WarehouseManager.getWarehouseComputeResourceName,
  Config.enable_sql_desensitize_in_log, FormatOptions#setEnableDigest)
  that don't exist on branch-3.5 and are intentionally skipped.
- AuditEncryptionCheckerTest is identical to the upstream PR.

Signed-off-by: Srihith Garlapati <srihith.garlapati@gmail.com>
Made-with: Cursor
@srihithg srihithg force-pushed the backport-insert-files-credential-redaction-3.5 branch from ea14c41 to 297117b Compare April 22, 2026 21:37
@kevincai kevincai enabled auto-merge (squash) April 23, 2026 03:00
@kevincai kevincai merged commit db34f66 into StarRocks:branch-3.5 Apr 23, 2026
37 checks passed
@trueeyu
Copy link
Copy Markdown
Contributor

trueeyu commented May 4, 2026

@mergify backport branch-3.5-cc

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 4, 2026

backport branch-3.5-cc

✅ Backports have been created

Details

wanpengfei-git pushed a commit that referenced this pull request May 4, 2026
…kport #71864) (#72643)

Signed-off-by: Srihith Garlapati <srihith.garlapati@gmail.com>
Co-authored-by: srihithg <78094568+srihithg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants