Skip to content

Skip deploying identity's own CAN_MANAGE in folder permissions validator#4796

Open
tplass-ias wants to merge 2 commits intodatabricks:mainfrom
tplass-ias:skip-deploying-identity-folder-permission-warning
Open

Skip deploying identity's own CAN_MANAGE in folder permissions validator#4796
tplass-ias wants to merge 2 commits intodatabricks:mainfrom
tplass-ias:skip-deploying-identity-folder-permission-warning

Conversation

@tplass-ias
Copy link

Summary

  • Databricks automatically grants the deploying identity CAN_MANAGE on the workspace folder, so warning about it being absent from the bundle's permissions: block is noise.
  • ObjectAclToResourcePermissions now accepts a currentUser string parameter and skips ACL entries matching the deploying identity (by UserName or ServicePrincipalName), parallel to the existing admins skip.
  • A nil guard is added in checkFolderPermission for bundles where CurrentUser is not yet populated.

Test plan

  • go test ./bundle/permissions/... ./bundle/config/validate/... passes
  • New unit tests cover skip-by-UserName, skip-by-ServicePrincipalName, and that other users are not skipped
  • New integration-style test (TestValidateFolderPermissionsNoWarnForDeployingIdentity) verifies no warning when deployer's CAN_MANAGE is the only ACL entry not in bundle permissions
  • Manually: deploy a bundle with no permissions: block using a service principal — warning no longer fires for the SP's own CAN_MANAGE

🤖 Generated with Claude Code

Databricks automatically grants the deploying identity CAN_MANAGE on
the workspace folder. The folder permissions validator was warning when
this implicit permission wasn't listed in the bundle's permissions
block, which is noise for a grant the user never configured.

Fix: pass the current user's identity to ObjectAclToResourcePermissions
and skip ACL entries matching it (by UserName or ServicePrincipalName),
parallel to the existing admins skip.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 4796
  • Commit SHA: 8ccb378ec8044631cc19d8f68316aa070cf45e03

Checks will be approved automatically on success.

@tplass-ias
Copy link
Author

forgive me maintainers for I have slop-PR'd. Happy to answer questions about the intent and problem being addressed. Claude can answer code questions better than me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant