Skip to content

Comments

Add FGAC policy governance to Unity Catalog skill#98

Open
SREERAMTHOOM wants to merge 33 commits intodatabricks-solutions:mainfrom
SREERAMTHOOM:feature/uc-fgac-governance
Open

Add FGAC policy governance to Unity Catalog skill#98
SREERAMTHOOM wants to merge 33 commits intodatabricks-solutions:mainfrom
SREERAMTHOOM:feature/uc-fgac-governance

Conversation

@SREERAMTHOOM
Copy link
Collaborator

@SREERAMTHOOM SREERAMTHOOM commented Feb 12, 2026

Summary

  • Add FGAC (Fine-Grained Access Control) policy management: create, update, delete column masks and row filters with approval token and admin group enforcement
  • Add analysis & discovery functions: coverage analysis, quota checks, table policy listing, schema/catalog info
  • Add comprehensive skill docs, routing triggers, and ground-truth evaluation test suite (40 integration tests, all passing)
  • Address all PR Add FGAC policy governance to Unity Catalog skill #98 review comments: type annotations, token security, validation ordering, SDK compatibility fixes

Test plan

  • Full integration test suite: 40/40 tests passing (test_fgac_policies.py)
  • Ruff lint & format clean with CI flags
  • Approval token enforcement: expired, mismatched, cross-action replay, missing admin group
  • CRUD lifecycle: create, get, update, delete for both column masks and row filters
  • Analysis functions: coverage, quota, table policies, schema/catalog info

Copy link
Collaborator

@calreynolds calreynolds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Sreeram! thanks for the PR 👍

Can you remove the .claude skills you contributed, the FGAC_README.md in the main folder? otherwise looks good

@calreynolds calreynolds linked an issue Feb 12, 2026 that may be closed by this pull request
New `uc-abac-governance` skill with 4 reference files covering governed
tags, masking UDFs, column mask/row filter policies, SQL generation
patterns, Python SDK (`w.policies.*`) CRUD examples, 12 MCP tools
reference, and human-in-the-loop governance workflow. Adds SDK example
`6-abac-policies.py`. Updates `install_skills.sh` and
`databricks-python-sdk/SKILL.md`. Content derived from companion UCABAC
repo (drift detection excluded).
Implement 9 ABAC policy functions (list, get, create, update, delete,
get_table_policies, get_masking_functions, check_policy_quota,
preview_policy_changes) using Databricks Python SDK v0.85.0 policies API.
Add 24 integration tests with programmatic governed tag creation/cleanup
via Tag Policies API. Update UC __init__.py exports, conftest fixtures
(cleanup_policies, cleanup_governed_tags), and MCP tools reference docs.
…mes, ACLs, FGAC

Add new UC ACL reference file (10-uc-acls.md) covering GRANT/REVOKE,
ownership, privilege hierarchy, SDK patterns, and common role-based
access patterns. Restructure SKILL.md with clear category separations
and per-category quick starts, reference tables, and best practices.
…roup check

- Add HMAC-SHA256 approval token: preview_policy_changes() returns a
  cryptographic token binding params + timestamp; create/update/delete
  reject calls without a valid, unexpired token
- Add admin group check: mutating operations verify the caller belongs
  to a configurable admin group (default: admins) via current_user API
- Update MCP tool wrapper to pass approval_token through to mutations
- Add TestApprovalTokenEnforcement and TestAdminGroupCheck test classes
- Update existing CRUD tests to use preview-then-execute token flow
- Update conftest cleanup fixture to use SDK directly (bypass guardrails)
- Update conftest warehouse fixture to auto-start stopped serverless warehouses
- Update skill docs (both mirrors) with guardrails section and new signatures
- Add FGAC_GUARDRAILS.md with architecture diagrams and workflow documentation
Add udf_catalog/udf_schema params to MCP tool for discovering masking
UDFs in a different catalog/schema than the policy scope. Update core
function docstrings and skill docs with cross-catalog examples.
Covers SQL generation (column mask, row filter, masking UDF, cross-catalog),
Python SDK (create policy, list policies, row filter), MCP workflows
(human-in-the-loop, cross-catalog discovery), and error handling
(invalid SQL like SHOW POLICIES).
FGAC SDK examples are now covered by the databricks-unity-catalog
skill in 9-fgac-sdk-and-tools.md.
…ts and SDK docs

- Delete old uc-fgac-governance skill from both .claude/skills/ and databricks-skills/
- Delete DEV_CHANGELOG.md and PLAN_UC_FGAC_SKILLS.md (no longer needed)
- Add 7 FGAC routing test cases to _routing/ground_truth.yaml
- Register fgac_policies tool in MCP server
- Update databricks-python-sdk SKILL.md with correct SDK types and all scope levels
- Add COMMIT_REVIEW.md to .gitignore
…oc, gitignore .claude/

- Remove FGAC section from databricks-python-sdk SKILL.md (covered by databricks-unity-catalog skill)
- Delete FGAC_GUARDRAILS.md (guardrails documented in 9-fgac-sdk-and-tools.md)
- Add .claude/ to .gitignore (local skill installs)
Consolidates all FGAC feature details into a single root-level readme:
governed tags, tag assignments, masking UDFs, policy management, Python
SDK reference, MCP tools, and the full human-in-the-loop governance
workflow with approval token internals and threat model.
- Update databricks-unity-catalog skill description to include access
  controls and FGAC policy governance in CLAUDE.md and setup.sh
- Remove model-serving from CLAUDE.md skill list
- Add 10-uc-acls.md to unity-catalog skill extra files in install_skills.sh
These files should not be in the repo - .claude/skills are local
and FGAC_README.md is not needed at the root level.
@SREERAMTHOOM SREERAMTHOOM force-pushed the feature/uc-fgac-governance branch from d4e9784 to c6f4154 Compare February 12, 2026 16:02
@SREERAMTHOOM SREERAMTHOOM self-assigned this Feb 12, 2026
@SREERAMTHOOM SREERAMTHOOM added documentation Improvements or additions to documentation skills Related to skills. mcp-server Related to the MCP server. tools-library Related to databricks-tools-core labels Feb 12, 2026
@SREERAMTHOOM
Copy link
Collaborator Author

Hey Sreeram! thanks for the PR 👍

Can you remove the .claude skills you contributed, the FGAC_README.md in the main folder? otherwise looks good

Changed per suggestion and refreshed the PR along with the lint checks.

… tests

Reviewer noted the combined test could pass for the wrong reason.
Now tests token validation and admin group check independently.
Reorder create/update/delete_fgac_policy to validate token and
params before calling _check_admin_group(). Updated tests to
match new validation order.
Generate a unique HMAC secret per process via os.urandom(32).hex()
when FGAC_APPROVAL_SECRET env var is not set. Prevents token
forgery in the default configuration.
Token only lives within a single MCP process — no need for a
configurable secret. Simplifies setup and eliminates any risk
of a leaked/guessable default.
The token ensures preview-mutation parameter integrity, but actual
human-in-the-loop confirmation depends on the MCP client behavior
(e.g., Claude Code prompts between tool calls). Added clear notes
in module docstring and skill documentation.
Implement 5 new functions for the FGAC analysis workflow:
- get_column_tags_api: query column-level tags via information_schema
- get_schema_info / get_catalog_info: retrieve UC metadata
- list_table_policies_in_schema: enumerate tables with their policies
- analyze_fgac_coverage: cross-reference tags, policies, and UDFs to
  identify coverage gaps and suggest policy creation

Wire up MCP dispatcher actions, export from __init__.py, document
return schemas in skill docs, and add integration tests.
- Add Optional[] to all None-defaulted params in MCP dispatcher
- Add tests for expired tokens and cross-action replay attacks
- Fix GCP-specific docs URL to AWS-specific
Add 4 ground truth test cases for UC ACL operations:
read-only access, data engineer access, revoke/show grants,
and SDK grant/revoke patterns.

Add 3 routing test cases to route ACL prompts to the
databricks-unity-catalog skill.
- Add distinct error messages for each token validation failure mode
- Remove redundant _validate_identifier calls in create/update/delete
- Document why get_table_policies uses raw REST API (SDK lacks effective_masks)
- Move routing_multi_004 to single-skill section as routing_fgac_007
- Extract TAG_PROPAGATION_DELAY_SECONDS constant and module-level tag helpers
- Remove unused cleanup_governed_tags fixture from conftest
- Use PermissionsChange/Privilege/SecurableType in SDK grant examples
- Add 8 ground truth test cases (tags, drop, governed tags, quotas, etc.)
Add DDL/DCL keywords (ALTER, DROP, GRANT, REVOKE, etc.) to SQL
validation in executor and universal scorer. Add UC governance routing
triggers. Fix admin group test to reliably trigger PermissionError and
accept SDK-prefixed policy_type values.
@SREERAMTHOOM
Copy link
Collaborator Author

Refreshed the PR with changes based on the feedback.
Need @dustinvannoy-db help for finalizing the PR.

Add check_policy_quota to skill docs. Add FGAC tools section to MCP
server README with architecture diagram update. Update root, tools-core,
and unity-catalog skill READMEs to reference FGAC governance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation mcp-server Related to the MCP server. skills Related to skills. tools-library Related to databricks-tools-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill Testing: Unity Catalog

2 participants