Repository navigation
[Pipe] Refresh credential user IDs and retain privilege metadata across retries - #18914
Merged
jt2594838 merged 2 commits intoOct 20, 2026
Merged
Conversation
jt2594838
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A pipe created from a root session receives an injected
source.user-id=0. AfterALTER PIPE ... MODIFY SOURCEchanges its username and password to another account, merged attributes retain that root ID. Table permission checks can continue treating the pipe as root and transfer data before SELECT permission is granted.Resolve user IDs from explicit source and write-back sink usernames during create, replace and modify operations. Password-only modifications preserve the existing user ID.
Correctly enforcing the new identity also exposes a TsFile retry defect:
throwIfNoPrivilege()clears table names and tree schema metadata after each check. A denied table event then throws a null-pointer exception on retry and cannot recover after SELECT is granted. Retain this metadata until the event releases its resources, including when processing fails after a successful check.Regression coverage includes attribute merging, explicit credentials, password-only updates, repeated denial, grant/retry, revoke/retry, and repeated realtime tree permission checks.
Validation
tableNamesnull-pointer exception as the original CI logs.PipeTsFileInsertionEventTest,PipeAuthenticationIdentityTestandShowCreateTaskTest: 15 tests passed.IoTDBPipePermissionIT#testSourcePermission: passed in 61 seconds with twoHighPerformanceModeclusters (Ratis/Ratis/IoT, schema replication 3, data replication 2).git diff --checkpassed.This PR has:
Key changed/added classes
TableConfigTaskVisitorPipeAuthenticationIdentityTestPipeTsFileInsertionEventPipeTsFileInsertionEventTest