shuwenwei opened a new pull request, #19125:
URL: https://github.com/apache/iotdb/pull/19125

   ## Description
   
   Allow callers on the trusted cluster network to reuse the existing client 
session protocol through the DataNode internal RPC endpoint. Internal callers 
can run queries and writes under an existing user's identity without 
maintaining a separate query protocol or using an ingress account.
   
   ### RPC and session lifecycle
   
   - Make `IDataNodeRPCService` extend `IClientRPCService` and inherit its Java 
implementation.
   - Register a connection-scoped session on internal connections, clean up 
resources on disconnect, and restore the previous session after CQ execution.
   - Rename the existing internal configuration and audit-write operations to 
`showConfigurationInternal` and `insertRecordInternal`, preserving their 
distinct behavior and updating ConfigNode callers.
   
   ### Identity and clients
   
   - Add an overridable login hook. External sessions retain password 
validation and login-lock behavior. The internal implementation trusts the 
supplied username on the internal endpoint, resolves its actual user ID, 
rejects unknown users, and retains existing operation-level permission checks.
   - Share protocol validation, session initialization, and login auditing 
between the two login paths.
   - Add `IInternalSessionBuilder<T>` and `buildInternal(INodeSupplier)` entry 
points for tree sessions, table sessions, and table subscription-management 
sessions.
   - Let callers supply internal endpoints through the existing 
`INodeSupplier`; disable external discovery and endpoint redirection for 
internal sessions. Reuse existing session connections and result sets.
   
   ### Compatibility and trust boundary
   
   Username-only login is available exclusively through the trusted DataNode 
internal endpoint; it is not a client-facing authentication option. This change 
inherits the full client RPC surface and is not restricted to read-only 
queries. Existing CN/DN internal callers must use the renamed configuration and 
audit-write RPCs. Subscription Pull/Push consumers and connection pools are not 
adapted in this change.
   
   ### Validation
   
   - Reviewed the source-level execution and cleanup paths and ran `git diff 
--check`.
   - No compilation, Thrift generation, formatter, unit tests, integration 
tests, or cluster validation was run, as requested.
   
   ##### Key changed/added classes
   
   `IDataNodeRPCService`, `DataNodeInternalRPCServiceImpl`, 
`ClientRPCServiceImpl`, `SessionManager`, `InternalServiceThriftHandler`, 
`IInternalSessionBuilder`, `InternalSession`, and 
`InternalSubscriptionTableSession`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to