Repository navigation
[CELEBORN-2468] Support pluggable transport authentication and authorization - #3857
Kalvin2077 wants to merge 12 commits into
Conversation
|
CI has six failing service checks that need investigation: Java 8 / Scala 2.12.18 and 2.13.16, Java 11 / Scala 2.12.18 and 2.13.16, and Java 17 / Scala 2.12.18 and 2.13.16. The Java 11 / Scala 2.13 log reports a The code review looks good; no introduced P0/P1 issues found. I checked bootstrap ordering and failure handling, native SASL compatibility, request/reply authorization, and verified quota/resource ownership. Added tests cover authentication rejection, cross-application access, reconnects, and Flink context cleanup. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical authorization gaps remain for PbWorkerLost and PbCheckWorkersAvailable paths.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3
Open (3)
What changed in this PR
Adds configurable transport authentication/authorization hooks, verified identity propagation, and client lifecycle updates.
Changes:
- Adds per-module transport bootstrap loading and cleanup.
- Introduces application and service authorization policies.
- Adds security coverage across RPC, Master, Worker, and Flink integrations.
| File | Description |
|---|---|
worker/src/test/scala/org/apache/celeborn/service/deploy/worker/ControllerSecuritySuite.scala |
Tests verified worker ownership. |
worker/src/test/scala/org/apache/celeborn/service/deploy/cluster/AuthenticatedShuffleSuite.scala |
Tests authenticated shuffle operations. |
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala |
Closes replication resources. |
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Controller.scala |
Uses verified identities. |
master/src/test/scala/org/apache/celeborn/service/deploy/master/MasterSuite.scala |
Updates transport test fixtures. |
master/src/test/scala/org/apache/celeborn/service/deploy/master/MasterSecuritySuite.scala |
Tests service policies and quota identity. |
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala |
Enforces service policies and verified identities. |
common/src/test/scala/org/apache/celeborn/common/rpc/RpcEndpointSecuritySuite.scala |
Tests RPC security policies. |
common/src/test/scala/org/apache/celeborn/common/rpc/RpcApplicationAuthorizationSuite.scala |
Tests application authorization. |
common/src/test/resources/auth-plugin/TokenBootstrap.java |
Provides an external authentication fixture. |
common/src/test/java/org/apache/celeborn/common/network/security/TransportBootstrapSuiteJ.java |
Tests bootstrap loading and cleanup. |
common/src/test/java/org/apache/celeborn/common/network/security/ExternalAuthenticationSuiteJ.java |
Tests external authentication flows. |
common/src/main/scala/org/apache/celeborn/common/rpc/RpcEndpoint.scala |
Adds authorization and identity helpers. |
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala |
Defines bootstrap configuration. |
common/src/main/java/org/apache/celeborn/common/network/util/TransportConf.java |
Exposes bootstrap configuration. |
common/src/main/java/org/apache/celeborn/common/network/TransportContext.java |
Loads and manages bootstraps. |
common/src/main/java/org/apache/celeborn/common/network/server/TransportServerBootstrap.java |
Adds server bootstrap lifecycle support. |
common/src/main/java/org/apache/celeborn/common/network/server/TransportServer.java |
Applies configured server bootstraps. |
common/src/main/java/org/apache/celeborn/common/network/server/BaseMessageHandler.java |
Delegates application authorization. |
common/src/main/java/org/apache/celeborn/common/network/security/ServiceAuthorizer.java |
Defines service authorization operations. |
common/src/main/java/org/apache/celeborn/common/network/security/ApplicationAuthorizer.java |
Defines application authorization. |
common/src/main/java/org/apache/celeborn/common/network/client/TransportClientFactory.java |
Applies configured client bootstraps. |
common/src/main/java/org/apache/celeborn/common/network/client/TransportClientBootstrap.java |
Adds client bootstrap lifecycle support. |
common/src/main/java/org/apache/celeborn/common/network/client/TransportClient.java |
Stores connection policies and identity. |
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java |
Delays secured transport initialization. |
client-flink/common/src/test/java/org/apache/celeborn/plugin/flink/FlinkAuthenticationSuiteJ.java |
Tests Flink bootstrap cleanup. |
client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/client/FlinkShuffleClientImpl.java |
Defers transport initialization and manages cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
9f88255 to
a203e6b
Compare
|
CI currently has failing checks: flink2 (11, 2.2); service (11); service (8); service (17). Other checks are still running. I revisited the current revision and am withholding a positive code-review conclusion. The earlier “Looks good” comment should not be treated as clearance for this revision. |
|
CI is still failing: Maven service (8), service (11), and service (17). The Java 11 log shows a ConfigurationSuite golden-file mismatch for Looks good from my code review of |
|
CI update for |
|
CI on Looks good from my code review; no P0/P1 issues found. I verified that this revision adds only two trailing spaces to the generated configuration table, with all production and test files unchanged. The previously checked RPC authorization, identity propagation, replication and stream controls—and their test coverage—remain intact. CI investigation is still outstanding. |
|
CI update for |
Initialize and clean up MemoryManager per test to avoid failures caused by suite discovery and execution order. Forward parent JVM module-access options to worker startup probes. Use a bounded wait for asynchronous NIO socket release while retaining the port reuse and resource cleanup assertions.
|
CI on Looks good from my code review; no P0/P1 issues found. Production authorization code is unchanged from |
|
CI update for |
|
PTAL. @SteNicholas @zaynt4606 @RexXiong |

A large portion of the new lines of code are test code, but the feature involves quite a few files.
What changes were proposed in this pull request?
Add configurable transport authentication and connection-bound authorization across Celeborn's built-in RPC, shuffle data and replication paths:
TransportClientBootstrapandTransportServerBootstrapimplementations from exact-module configuration, and manage configured instances throughTransportContextstartup and shutdown.ConnectionSecurityContextpolicy for operation-specific application/service access and effective-user resolution. Keep plugin identity separate from nativeclientId; make native-policy composition explicit.Why are the changes needed?
Deployments use different identity providers, credentials and authorization policies. Bootstrap interfaces alone do not provide configurable loading, lifecycle ownership and consistent request authorization across Celeborn's transports. A connection-bound policy lets an external mechanism retain its verified identity and participate in resource and accounting decisions without spreading provider-specific code through the OSS handlers.
Reply semantics do not determine whether an operation needs authorization: one-way RPCs and stream controls can also change protected state. Both paths need the receiving connection and the relevant resource facts before business handling.
Does this PR resolve a correctness bug?
A chunk fetch for a stream that is no longer registered previously dereferenced
streamState.buffersbefore checking whetherstreamStatewas null. It now returnsChunkFetchFailure. The focused regression test fails with the old implementation and passes with this change.Does this PR introduce any user-facing change?
Adds
celeborn.<module>.client.bootstrap.classesandceleborn.<module>.server.bootstrap.classes, both empty by default, plus plugin authorization APIs and deployment guidance. Configured bootstraps also run when native authentication is disabled. Configured handshakes precede native registration/SASL where those are enabled. Installing a plugin policy replaces native authorization; a policy that also requires native restrictions calls them explicitly.Built-in request paths now apply operation-specific checks before processing protected requests. Public and internal RPC listeners still share
rpc_serviceconfiguration. The policy request does not expose stream ID or creator channel. Native mode does not add SASL to internal RPC or replication connections; configured bootstraps can authenticate those peers. Custom RPC endpoints must implement their own authorization hook.How was this patch tested?