You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2026/09/09 07:39:25 UTC

[PR] [SPARK-59360] Run the multi-tenant routing end-to-end walkthrough in CI [spark-connect-gateway]

viirya opened a new pull request, #23:
URL: https://github.com/apache/spark-connect-gateway/pull/23

   The e2e workflow covers baseline routing, JWT identity, and the backend
   trust boundary, but nothing in CI exercises per-tenant backend pools. The
   multi-tenant walkthrough under deploy/examples/e2e-multitenant has never
   run automatically, so the chart's tenantPools.overrides templating and
   the gateway's pool-isolation behaviour are only verified by hand.
   
   This adds an e2e-multitenant job that stands up two independent Spark
   Connect deployments, one per tenant, and asserts:
   
   (1) The chart renders both tenant pool overrides plus the strict
   onUnknownTenant=reject policy, and the gateway starts one Kubernetes
   Endpoints watcher per override pool with no default pool at all.
   
   (2) Two clients with JWTs claiming different tenants both succeed, and
   the session.create audit events show each tenant reached only its own
   backend Endpoint. This is the isolation assertion: the backend IPs are
   captured from the two Services beforehand and compared exactly, so a
   routing regression that sent both tenants to one pool would fail.
   
   (3) A JWT claiming a tenant with no configured pool is rejected with
   PermissionDenied, while a JWT carrying no tenant claim is rejected with
   Unauthenticated. The two rejects must stay distinct: one identified
   itself and was refused, the other never identified a tenant.
   
   (4) Both rejects are observable -- the unknown tenant as an rpc.error
   audit event, the missing claim as an auth.failure with
   reason=missing_tenant plus its metric -- and only the two successful
   sessions bound a backend.
   
   Verified locally against a kind cluster before wiring it up: each tenant
   stayed pinned to its own backend across repeated sessions, and both
   reject paths returned the documented status codes and messages.
   
   Co-authored-by: Claude Code
   
   ---
   
   Verified locally against a kind cluster (`scg-mt`) before writing the workflow.
   Each tenant stayed pinned to its own backend across repeated sessions:
   
   ```
   team-a -> ['10.244.0.5:15002']
   team-b -> ['10.244.0.6:15002']
   ```
   
   matching the two Services' Endpoints exactly. Both reject paths returned the
   documented status codes and messages, and audit/metrics agreed (2
   `session.create`, 1 `rpc.error`, 1 `auth.failure{reason=missing_tenant}`,
   `scg_backend_pool_size 0` as documented for strict mode).
   
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59360] Run the multi-tenant routing end-to-end walkthrough in CI [spark-connect-gateway]

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on PR #23:
URL: https://github.com/apache/spark-connect-gateway/pull/23#issuecomment-5625279293

   Thanks @dongjoon-hyun !


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59360] Run the multi-tenant routing end-to-end walkthrough in CI [spark-connect-gateway]

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya closed pull request #23: [SPARK-59360] Run the multi-tenant routing end-to-end walkthrough in CI
URL: https://github.com/apache/spark-connect-gateway/pull/23


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org