You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 79702a7
Browse filesBrowse the repository at this point in the historyBrowse files
Allow auth docker configure when profiles share a workspace
auth docker configure now prints a warning instead of failing when several databricks-cli profiles match the workspace. auth docker token uses the first logged-in matching profile, skipping only profiles with no cached login or a rejected refresh token; any other error is returned so the helper never switches identity on a transient failure.
Co-authored-by: Isaac <no-reply@databricks.com>
* Allow `databricks auth docker configure` when multiple profiles match the same workspace. It now prints a warning, and the Docker credential helper uses the first logged-in profile, checking `[DEFAULT]` first and then the others in `.databrickscfg` order. ([#7383](https://github.com/databricks/cli/pull/7383))
Warning: multiple Databricks profiles match workspace ID [WORKSPACE_ID]: docker-test, shared. Docker credential helper uses the first logged-in profile in this order
162
+
Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
Copy file name to clipboardExpand all lines: acceptance/cmd/auth/docker/token/output.txt
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,25 @@ Error: auth docker token does not support --workspace-id
51
51
>>> musterr [CLI] auth docker token
52
52
Error: no Databricks profile found for workspace ID 444555666 from registry host 444555666.container.us-west-2.localhost. Run databricks auth login --host <workspace-url> and set workspace_id for that profile
53
53
54
-
=== Multiple profiles for the workspace
54
+
=== Multiple profiles for the workspace use the first logged-in profile
55
+
56
+
>>> [CLI] auth docker token --no-force-refresh
57
+
{
58
+
"Secret": "docker-test-access-token",
59
+
"Username": "oauthtoken"
60
+
}
61
+
62
+
=== Profiles that are not logged in are skipped
63
+
64
+
>>> [CLI] auth docker token
65
+
{
66
+
"Secret": "oauth-token",
67
+
"Username": "oauthtoken"
68
+
}
69
+
70
+
=== No logged-in profile for the workspace
55
71
56
72
>>> musterr [CLI] auth docker token
57
-
Error: multiple Databricks profiles match workspace ID [WORKSPACE_ID]: docker-test and duplicate. Docker credential helper requires exactly one profile per workspace. Remove the duplicate profile with: databricks auth logout --profile <profile-name> --delete
73
+
Error: no logged-in Databricks profile for workspace ID 555666777 from registry host 555666777.container.us-west-2.localhost. Run databricks auth login --profile <profile-name> for one of these profiles:
74
+
profile "logged-out-a": cache: databricks OAuth is not configured for this host. no cached credentials; run `databricks auth login` to sign in
75
+
profile "logged-out-b": cache: databricks OAuth is not configured for this host. no cached credentials; run `databricks auth login` to sign in
0 commit comments