Skip to content

Commit 3576c92

Browse files
committed
Revert u2m.go client_secret handling — not needed
Earlier commits in this branch (23697e5, 0ec7e06) modified u2m.go to avoid sending an empty client_secret on the PKCE public-app flow, citing server rejection with "Public app should not use a client secret". Empirical verification (2026-04-21): - Prod Legacy (adb-6436897454825492.12.azuredatabricks.net): PASS with unpatched u2m.go — server accepts the request. - Stg Legacy (adb-7064161269814046.2.staging.azuredatabricks.net): FAIL with 400 Bad Request on unpatched u2m.go. Since the production server tolerates the current behavior, the patch isn't strictly required for customers. Reverting to keep the PR minimal and matching upstream main exactly for this file. If staging server strictness later rolls out to prod, we can re-add this fix then. Signed-off-by: Madhavendra Rathore Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent bc4e923 commit 3576c92

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

auth/oauth/u2m/u2m.go

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,11 @@ func GetConfig(ctx context.Context, hostName, clientID, clientSecret, callbackUR
2525
}
2626

2727
config := oauth2.Config{
28-
ClientID: clientID,
29-
Endpoint: endpoint,
30-
RedirectURL: callbackURL,
31-
Scopes: scopes,
32-
}
33-
if clientSecret != "" {
34-
config.ClientSecret = clientSecret
35-
} else {
36-
// For U2M (public apps using PKCE), force AuthStyleInParams to avoid
37-
// sending Basic auth with empty password. AuthStyleInHeader sends
38-
// "Authorization: Basic base64(clientID:)" which the server rejects
39-
// with "Public app should not use a client secret".
40-
config.Endpoint.AuthStyle = oauth2.AuthStyleInParams
28+
ClientID: clientID,
29+
ClientSecret: clientSecret,
30+
Endpoint: endpoint,
31+
RedirectURL: callbackURL,
32+
Scopes: scopes,
4133
}
4234

4335
return config, nil

0 commit comments

Comments
 (0)