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
bundle: warn when a workspace path is in /Workspace/Shared without users CAN_MANAGE
Renames ValidateSharedRootPermissions to ValidateWorkspaceSharedPermissions and
extends it to also cover workspace.state_path. It warns when root_path or state_path
is in /Workspace/Shared — granting read/write to all workspace users — but the
top-level permissions section does not declare that access via group_name: users
CAN_MANAGE.
The state_path warning is suppressed only when state_path is nested under root_path,
since the root warning already covers it. When state_path is a separate shared
folder, both warnings fire.
Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
// root_path is in /Workspace/Shared without users CAN_MANAGE.
36
+
ifrootIsShared&&!usersCanManage {
37
+
diags=diags.Append(diag.Diagnostic{
38
+
Severity: diag.Warning,
39
+
Summary: fmt.Sprintf("the bundle root path %s is writable by all workspace users", rootPath),
40
+
Detail: "The bundle root path is in /Workspace/Shared, giving read/write access to all workspace users that is not reflected in the permissions section. If this is intentional, add CAN_MANAGE for 'group_name: users' to your bundle permissions. Otherwise, move the bundle to a restricted path such as /Workspace/Users/<username>.",
41
+
})
40
42
}
41
43
42
-
if!allUsers {
44
+
// state_path is in /Workspace/Shared without users CAN_MANAGE. Skip only when
45
+
// state_path is nested under root_path, since the root warning above already
46
+
// covers it. When state_path is a separate folder, warn about it on its own.
Summary: fmt.Sprintf("the bundle root path %s is writable by all workspace users", b.Config.Workspace.RootPath),
46
-
Detail: "The bundle is configured to use /Workspace/Shared, which will give read/write access to all users. If this is intentional, add CAN_MANAGE for 'group_name: users' permission to your bundle configuration. If the deployment should be restricted, move it to a restricted folder such as /Workspace/Users/<username or principal name>.",
50
+
Summary: fmt.Sprintf("the bundle state path %s is writable by all workspace users", statePath),
51
+
Detail: "The bundle state path is in /Workspace/Shared, giving read/write access to all workspace users that is not reflected in the permissions section. If this is intentional, add CAN_MANAGE for 'group_name: users' to your bundle permissions. Otherwise, move the state path to a restricted location such as /Workspace/Users/<username>.",
47
52
})
48
53
}
49
54
50
55
returndiags
51
56
}
57
+
58
+
// hasUsersGroupManagePermission returns true if the top-level permissions include
0 commit comments