Fix feature flags, U2M OAuth, and add SPOG header support#347
Open
msrathore-db wants to merge 2 commits intomainfrom
Open
Fix feature flags, U2M OAuth, and add SPOG header support#347msrathore-db wants to merge 2 commits intomainfrom
msrathore-db wants to merge 2 commits intomainfrom
Conversation
The U2M flow uses PKCE (public app) and should not send a client secret. Previously, ClientSecret was always set to "" on the oauth2.Config, which caused Go's oauth2 library to send an empty client_secret via Basic auth. The OIDC server rejects this with "Public app should not use a client secret". Only set ClientSecret when it's non-empty, so public apps use the "none" token endpoint auth method as intended. Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com> Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Feature flags:
- Fix endpoint path: /api/2.0/feature-flags -> /api/2.0/connector-service/feature-flags/GOLANG/{version}
- Fix response parsing: map format -> array of {name, value} entries
- Add extraHeaders for SPOG routing (x-databricks-org-id)
- Extract ?o=<workspaceId> from httpPath in connector
U2M OAuth:
- Don't set ClientSecret for public apps (PKCE)
- Force AuthStyleInParams to prevent Basic auth with empty password
- Server rejects "Public app should not use a client secret" otherwise
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
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
Three fixes for SPOG (Single Panel of Glass) support and pre-existing bugs:
Fix 1 — Feature flags endpoint (pre-existing bug)
/api/2.0/feature-flags(404 everywhere) →/api/2.0/connector-service/feature-flags/GOLANG/{version}(200){"flags": {"name": bool}}→ actual{"flags": [{"name": "...", "value": "..."}]}extraHeadersparameter to passx-databricks-org-idfrom?o=in httpPathFix 2 — U2M OAuth empty client secret (pre-existing bug)
ClientSecret: ""was always set onoauth2.Configfor U2M (public app using PKCE)oauth2library sendsAuthorization: Basic base64(clientID:)viaAuthStyleInHeaderClientSecretwhen empty + forceAuthStyleInParamsfor public appsFix 3 — SPOG header extraction
?o=<workspaceId>fromhttpPathusingurl.ParseQueryx-databricks-org-idheader into feature flag requests for SPOG routingTest plan
go test ./telemetry/...)NO_CHANGELOG=true
This pull request was AI-assisted by Isaac.