feat(rust): add org ID header for SPOG support#379
Open
vikrantpuppala wants to merge 1 commit intomainfrom
Open
feat(rust): add org ID header for SPOG support#379vikrantpuppala wants to merge 1 commit intomainfrom
vikrantpuppala wants to merge 1 commit intomainfrom
Conversation
Multi-tenant Databricks deployments include `?o=<org_id>` in the HTTP path to route requests to the correct workspace. Without the org ID, the frontend cannot validate credentials, causing 401 errors. Parse the `?o=` query parameter from the HTTP path, strip it from the warehouse ID, and send it as an `x-databricks-org-id` header on all authenticated requests. This matches the C# driver's implementation. Also fix the integration test to set the required `databricks.auth.type` option. Co-authored-by: Isaac
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.
Summary
?o=<org_id>query parameter from the HTTP path (e.g.,/sql/1.0/warehouses/abc123?o=987654)x-databricks-org-idheader on all authenticated HTTP requests for multi-tenant workspace routingdatabricks.auth.typeoptionContext
Multi-tenant Databricks deployments (e.g.,
pecoaws.databricks.com) include?o=<org_id>in the HTTP path for request routing. Without the org ID, the frontend cannot route requests to the correct workspace, causing 401 authentication errors even with valid credentials.This matches the pattern already implemented in the C# driver (
StatementExecutionConnection.cs), which parses?o=and injects thex-databricks-org-idheader.Test plan
extract_warehouse_idwith query paramsextract_org_idparsingset_option("databricks.http_path")with?o=pecoaws.databricks.com) — verifiedSELECT 1succeedscargo fmt,cargo clippy,cargo testall passThis pull request was AI-assisted by Isaac.