MATIH Platform is in active MVP development. Documentation reflects current implementation status.
10. Data Catalog & Governance
Governance
Overview

Data Governance

Policy management, data classification, masking, access control, and compliance auditing.

Production

Overview

The Governance Service provides a comprehensive data governance framework covering policy lifecycle management, data classification, attribute-based access control (ABAC), row-level security (RLS), data masking, and query audit logging. It enforces data governance across all data plane services.


Architecture

                    +----------------------------------+
                    |       Governance Service         |
                    |         Port: 8080               |
                    +--+-------+-------+-------+-------+
                       |       |       |       |
          +------------+   +---+---+   +---+---+   +---+---+
          |                |       |   |       |   |       |
    +-----v-----+  +------v-+  +--v---v+  +---v---+  +----v----+
    | Governance |  | ABAC   |  | RLS   |  | Query |  | Classif |
    | Controller |  | Ctrl   |  | Ctrl  |  | Audit |  | Ctrl    |
    +-----+------+  +---+----+  +---+---+  +---+---+  +----+----+
          |              |          |           |            |
    +-----v------+  +---v----+  +--v---+  +----v----+  +----v----+
    | Policy     |  | ABAC   |  | RLS  |  | Audit   |  | Classif |
    | Service    |  | Service|  | Svc  |  | Service |  | Service |
    +-----+------+  +---+----+  +--+---+  +----+----+  +----+----+
          |              |          |           |            |
    +-----v------+  +---v----+  +--v---+  +----v----+  +----v----+
    | Masking    |  | OPA    |  | Audit|  | Query   |  | Auto    |
    | Service    |  | Integr |  | Log  |  | Audit   |  | Classify|
    +------------+  +--------+  | Repo |  | Repo    |  +---------+
                                +------+  +---------+

Service Components

ControllerBase PathPurpose
GovernanceController/api/v1/governancePolicies, classification, masking
AbacController/api/v1/abacAttribute-based access control
RlsController/api/v1/tenants/:tenantId/rlsRow-level security
QueryAuditController/v1/auditQuery execution audit logging
ClassificationController/v1/classificationTable-level data classification

Section Contents

PageDescription
PoliciesPolicy lifecycle management (create, submit, approve, activate, suspend, clone)
Data ClassificationClassify data by sensitivity level and category
Data MaskingMask, tokenize, and detokenize sensitive data
ABACAttribute-based access control with OPA integration
Row-Level SecurityRLS policy management and WHERE clause injection
Query AuditQuery execution audit logging and compliance
Sensitive DataPII, PHI, PCI discovery and management
ComplianceCompliance reporting and regulatory support
API ReferenceComplete endpoint reference for all governance APIs

Key Design Principles

  1. Policy-as-Code -- All governance rules are defined as structured policies with version control and approval workflows
  2. Multi-tenancy -- Complete tenant isolation with X-Tenant-ID header on all requests
  3. Defense in Depth -- Layered security: ABAC for access decisions, RLS for data filtering, masking for data protection
  4. Audit Everything -- Every data access is logged with full context for compliance review
  5. OPA Integration -- ABAC policies can be exported as Rego for OPA-based enforcement at the query engine level

Source Reference

ComponentFile
Governance controllerGovernanceController.java
ABAC controllerAbacController.java
RLS controllerRlsController.java
Query audit controllerQueryAuditController.java
Classification controllerClassificationController.java
Policy servicePolicyService.java
Classification serviceClassificationService.java
Data masking serviceDataMaskingService.java
ABAC serviceAbacService.java
OPA integrationOpaIntegrationService.java
RLS serviceRlsService.java
Query audit serviceQueryAuditService.java