Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5d8950f
testserver: serve identity/me and group lookups from the workspace fake
andrewnester Nov 16, 2026
50c80e7
iamutil: read the current user from identity/me
andrewnester Nov 16, 2026
3750e33
cli: read the current user through iamutil.GetCurrentUser
andrewnester Nov 16, 2026
2506b1b
bundle: resolve permission group membership through IAM-v2 APIs
andrewnester Nov 16, 2026
bf34837
tests: adapt unit test fixtures to identity/me
andrewnester Nov 16, 2026
d840e70
acceptance: cover identity/me principals and cloud checks
andrewnester Nov 16, 2026
c476b41
changelog: note identity/me for the current user
andrewnester Nov 16, 2026
2d0673c
iamutil: name parent groups from identity/me
andrewnester Nov 18, 2026
38651b1
bundle: reject group principals and set the current user's name
andrewnester Nov 18, 2026
4135519
cmd: probe the current user once in auth, air and sync
andrewnester Nov 18, 2026
a6b9187
bundle/permissions: drop the unused context from analyzeBundlePermiss…
andrewnester Nov 18, 2026
0b79be3
acceptance: drop the removed groups list from the user agent golden
andrewnester Nov 18, 2026
68369d4
Merge remote-tracking branch 'origin/main' into feat/identity-me-api
andrewnester Nov 18, 2026
411ef59
testserver: drop the unused JoinGroup helper
andrewnester Nov 18, 2026
5fc2207
iamutil: retry the parent-groups call on HTTP 500 and reuse one ident…
andrewnester Nov 19, 2026
e00aa91
experimental, sync, template: reject an assumed group where a user fo…
andrewnester Nov 19, 2026
f8acf5e
bundle: cache the current user's groups with the principal
andrewnester Nov 19, 2026
4033581
testserver: set group membership from the members of a created group
andrewnester Nov 19, 2026
2492aaf
changelog: name the new current_user fields and narrow the auth descr…
andrewnester Nov 19, 2026
86c4ff5
bundle: read the current user's groups through the cache's compute path
andrewnester Nov 19, 2026
58c7b89
Merge remote-tracking branch 'origin/main' into feat/identity-me-api
andrewnester Nov 19, 2026
8f71438
acceptance: read the bundle skills user agent from the identity/me re…
andrewnester Nov 19, 2026
9474465
Merge remote-tracking branch 'origin/main' into feat/identity-me-api
andrewnester Nov 20, 2026
4dd8246
iamutil: address review on identity/me current user
andrewnester Nov 20, 2026
82dcb5a
changelog: list the current_user fields that change and the air group…
andrewnester Nov 20, 2026
3d05245
Merge remote-tracking branch 'origin/main' into feat/identity-me-api
andrewnester Nov 20, 2026
7300c24
acceptance: run the identity/me cloud tests on this head
andrewnester Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nextchanges/air/7714.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `databricks air run`, `air list` and `air cancel --all` fail with a clear error when the caller is an assumed group, since they act as a user. ([#7714](https://github.com/databricks/cli/pull/7714))
1 change: 1 addition & 0 deletions .nextchanges/bundles/7714-group-principal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Bundle commands fail with a clear error when the caller is an assumed group, because they deploy as a user or service principal. ([#7714](https://github.com/databricks/cli/pull/7714))
1 change: 1 addition & 0 deletions .nextchanges/bundles/7714.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `bundle validate` and `bundle summary` no longer include `current_user.roles` or `current_user.entitlements`. In `current_user`, `name` now holds the given and family names, `displayName` is those names joined with a space, `emails` holds the user name, `active` comes from the account status, and `groups` lists the transitive parent groups with only `value` and `display`. ([#7714](https://github.com/databricks/cli/pull/7714))
1 change: 1 addition & 0 deletions .nextchanges/cli/7714.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `databricks auth describe` works when the caller is an assumed group. ([#7714](https://github.com/databricks/cli/pull/7714))
2 changes: 1 addition & 1 deletion acceptance/air/cancel/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Pattern = "POST /api/2.2/jobs/runs/cancel"
Response.Body = '{}'

# Jobs runs/list backs `cancel --all`: two active AIR runs for the current user
# (tester@databricks.com, from the built-in scim/v2/Me handler).
# (tester@databricks.com, from the built-in identity/me handler).
[[Server]]
Pattern = "GET /api/2.2/jobs/runs/list"
Response.Body = '''
Expand Down
2 changes: 1 addition & 1 deletion acceptance/air/list/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Response.Body = ''
# `air list` reads Jobs runs/list directly (expand_tasks), filtering to AIR runs.
# The current runs carry an ai_runtime_task (not modeled by the typed SDK), which
# is why the CLI parses the response raw. Both runs belong to the default user
# (tester@databricks.com, from the built-in scim/v2/Me handler). The second run
# (tester@databricks.com, from the built-in identity/me handler). The second run
# has the shape of the official multi-task DAB (a notebook prep task before the
# ai_runtime_task) and must be listed from its AIR task. The third run has two
# AI Runtime tasks that ended differently: it lists as two rows, each naming its
Expand Down
4 changes: 2 additions & 2 deletions acceptance/auth/bundle_default_profile/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

>>> errcode [CLI] bundle validate -p other -o json
Warn: [hostmetadata] failed to fetch host metadata for https://other.test, will skip for 1m0s
Error: Get "https://other.test/api/2.0/preview/scim/v2/Me": (redacted)
Error: Get "https://other.test/api/2.0/identity/me": (redacted)


Exit code: 1
Expand All @@ -31,7 +31,7 @@ Exit code: 1
=== Bundle with workspace.profile: pinned profile wins over default_profile

>>> errcode [CLI] bundle validate -o json
Error: Get "https://other.test/api/2.0/preview/scim/v2/Me": (redacted)
Error: Get "https://other.test/api/2.0/identity/me": (redacted)


Exit code: 1
Expand Down
4 changes: 4 additions & 0 deletions acceptance/auth/bundle_default_profile/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ Ignore = [
[[Repls]]
Old = 'Get "https://other.test/api/2.0/preview/scim/v2/Me\??": .*'
New = 'Get "https://other.test/api/2.0/preview/scim/v2/Me": (redacted)'

[[Repls]]
Old = 'Get "https://other.test/api/2.0/identity/me": .*'
New = 'Get "https://other.test/api/2.0/identity/me": (redacted)'
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,20 @@
"workspace": {
"artifact_path": "/Workspace/Users/[USERNAME]/.bundle/test-pipeline-recreate/default/artifacts",
"current_user": {
"active": true,
"domain_friendly_name": "[USERNAME]",
"emails": [
{
"primary": true,
"value": "[USERNAME]"
}
],
"groups": [
{
"display": "users",
"value": "1"
}
],
"id": "[USERID]",
"short_name": "[USERNAME]",
"userName": "[USERNAME]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
[
0,
1,
880
1009
]
],
"resources.jobs": [
[
0,
1,
889
1018
]
],
"resources.jobs.my_job": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
[
0,
1,
825
954
]
],
"resources.jobs": [
[
0,
1,
834
963
]
],
"resources.jobs.my_job": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged

>>> print_requests
GET /.well-known/databricks-config
GET /api/2.0/preview/scim/v2/Me
GET /api/2.0/identity/me
GET /api/2.0/identity/me/transitive-parent-groups
GET /api/2.0/workspace/export direct_download=true path=/Workspace/Users/[USERNAME]/.bundle/request-summary/default/state/deployment.json
GET /api/2.0/workspace/export direct_download=true path=/Workspace/Users/[USERNAME]/.bundle/request-summary/default/state/resources.json
GET /api/2.0/workspace/export direct_download=true path=/Workspace/Users/[USERNAME]/.bundle/request-summary/default/state/terraform.tfstate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer [DATABRICKS_TOKEN]"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer oauth-token"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer oauth-token"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"method": "GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer [DATABRICKS_TOKEN]"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"method": "GET",
Expand All @@ -27,7 +36,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer [DATABRICKS_TOKEN]"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer oauth-token"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"method": "GET",
Expand All @@ -55,7 +64,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"Authorization": [
"Bearer oauth-token"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,6 @@ state_path_is_shared false
state_path_other true

>>> [CLI] bundle deploy -t shared_users_can_manage
Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups
If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy.

Consider using a adding a top-level permissions section such as the following:

permissions:
- user_name: [USERNAME]
level: CAN_MANAGE

See https://docs.databricks.com/dev-tools/bundles/permissions.html to learn more about permission configuration.
in databricks.yml:47:7

Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/shared_users_can_manage/files...
Files: 1 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Badness = '''(minor) error message is not great: executing "" at <user_name>: error calling user_name:'''

# The 400 keeps the golden error. The 500 retry path is not covered by this test.
[[Server]]
Pattern = "GET /api/2.0/preview/scim/v2/Me"
Pattern = "GET /api/2.0/identity/me"
Response.Body = '{}'
Response.StatusCode = 500
Response.StatusCode = 400
21 changes: 14 additions & 7 deletions acceptance/bundle/user_agent/output.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
OK deploy /api/2.0/preview/scim/v2/Me engine/direct
OK deploy /api/2.0/identity/me engine/direct
OK deploy /api/2.0/identity/me/transitive-parent-groups engine/direct
OK deploy /api/2.0/workspace/export engine/direct
OK deploy /api/2.0/workspace/export engine/direct
OK deploy /api/2.0/workspace/export engine/direct
Expand All @@ -20,7 +21,8 @@ OK deploy /api/2.0/workspace/mkdirs engine/direct
OK deploy /api/2.0/workspace/mkdirs engine/direct
OK deploy /api/2.1/unity-catalog/schemas engine/direct
MISS deploy /.well-known/databricks-config 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS]'
OK destroy /api/2.0/preview/scim/v2/Me engine/direct
OK destroy /api/2.0/identity/me engine/direct
OK destroy /api/2.0/identity/me/transitive-parent-groups engine/direct
OK destroy /api/2.0/workspace/export engine/direct
OK destroy /api/2.0/workspace/export engine/direct
OK destroy /api/2.1/unity-catalog/schemas/mycatalog.myschema engine/direct
Expand All @@ -33,27 +35,32 @@ OK destroy /api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bu
OK destroy /api/2.0/workspace/delete engine/direct
OK destroy /api/2.0/workspace/delete engine/direct
MISS destroy /.well-known/databricks-config 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS]'
OK plan /api/2.0/preview/scim/v2/Me engine/direct
OK plan /api/2.0/identity/me engine/direct
OK plan /api/2.0/identity/me/transitive-parent-groups engine/direct
OK plan /api/2.0/workspace/export engine/direct
OK plan /api/2.0/workspace/export engine/direct
OK plan /api/2.0/workspace/export engine/direct
MISS plan /.well-known/databricks-config 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS]'
OK plan2 /api/2.0/preview/scim/v2/Me engine/direct
OK plan2 /api/2.0/identity/me engine/direct
OK plan2 /api/2.0/identity/me/transitive-parent-groups engine/direct
OK plan2 /api/2.0/workspace/export engine/direct
OK plan2 /api/2.0/workspace/export engine/direct
OK plan2 /api/2.0/workspace/export engine/direct
OK plan2 /api/2.1/unity-catalog/schemas/mycatalog.myschema engine/direct
MISS plan2 /.well-known/databricks-config 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS]'
OK run /api/2.0/preview/scim/v2/Me engine/direct
OK run /api/2.0/identity/me engine/direct
OK run /api/2.0/identity/me/transitive-parent-groups engine/direct
OK run /api/2.0/workspace/export engine/direct
OK run /api/2.0/workspace/export engine/direct
MISS run /.well-known/databricks-config 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS]'
OK summary /api/2.0/preview/scim/v2/Me engine/direct
OK summary /api/2.0/identity/me engine/direct
OK summary /api/2.0/identity/me/transitive-parent-groups engine/direct
OK summary /api/2.0/preview/scim/v2/Me engine/direct
OK summary /api/2.0/workspace/export engine/direct
OK summary /api/2.0/workspace/export engine/direct
MISS summary /.well-known/databricks-config 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS]'
MISS validate /api/2.0/preview/scim/v2/Me 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_validate cmd-exec-id/[UUID] interactive/none auth/pat'
MISS validate /api/2.0/identity/me 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_validate cmd-exec-id/[UUID] interactive/none auth/pat'
MISS validate /api/2.0/identity/me/transitive-parent-groups 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_validate cmd-exec-id/[UUID] interactive/none auth/pat'
MISS validate /api/2.0/workspace/get-status 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_validate cmd-exec-id/[UUID] interactive/none auth/pat'
MISS validate /api/2.0/workspace/get-status 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_validate cmd-exec-id/[UUID] interactive/none auth/pat'
MISS validate /api/2.0/workspace/mkdirs 'cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_validate cmd-exec-id/[UUID] interactive/none auth/pat'
Expand Down
11 changes: 10 additions & 1 deletion acceptance/bundle/user_agent/simple/out.requests.deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"User-Agent": [
"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_deploy cmd-exec-id/[UUID][0] interactive/none engine/direct auth/pat"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
11 changes: 10 additions & 1 deletion acceptance/bundle/user_agent/simple/out.requests.destroy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"User-Agent": [
"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_destroy cmd-exec-id/[UUID][0] interactive/none engine/direct auth/pat"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
11 changes: 10 additions & 1 deletion acceptance/bundle/user_agent/simple/out.requests.plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"User-Agent": [
"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
11 changes: 10 additions & 1 deletion acceptance/bundle/user_agent/simple/out.requests.plan2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
]
},
"method": "GET",
"path": "/api/2.0/preview/scim/v2/Me"
"path": "/api/2.0/identity/me"
}
{
"headers": {
"User-Agent": [
"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
]
},
"method": "GET",
"path": "/api/2.0/identity/me/transitive-parent-groups"
}
{
"headers": {
Expand Down
Loading
Loading