Skip to content

Fine-Grained Authorization

Fine-Grained Authorization (FGA) is the practice of enforcing security controls at the most atomic level of your data architecture. Moving beyond broad application roles, FGA controls individual resources, specific data fields, and even single database rows. In a modern ecosystem, FGA ensures that a user doesn’t just have “Read Access,” but rather “Read Access to Document X, only while it’s in a ‘Draft’ state, and only if they are the designated ‘Reviewer’ in the organizational hierarchy.” This model is mandatory for multi-tenant SaaS, healthcare, and any system where “Least Privilege” is a hard requirement.

FGA

Atomic Control
Core Mission
Universal Object Privacy. Protecting data objects and attributes with absolute precision, ensuring that access decisions are inherently tied to the unique relationship between a subject and a specific resource.
Like a Research Lab Keycard: A standard office key gets you into the building (Coarse). A smart lab keycard (Fine-Grained) gets you into the building, then into the specific chemistry lab, then only allows you to open one specific refrigerated locker, and even then, only lets you view the temperature log but not the chemical containers. Each step is independently verified based on your specific certifications.
Patient Record Security / Multi-Tenant SaaS Isolation / B2B Collaboration

Authorization evolves from broad “gates” to narrow “needles,” where each level increases security but also adds logic complexity.

TierGranularityLogic ExampleStrategic Value
CoarseGlobal App/RoleisAdmin == trueBulk Access Management.
MediumResource Categoryuser.dept == 'Sales'Departmental Silos.
FineIndividual Objectuser.id == doc.ownerOwnership-Based Access.
AtomicAttribute/Fieldmask(SSN) if !HRData Privacy & Redaction.

FGA often requires a high-performance Relationship-Based Access Control (ReBAC) engine to evaluate billions of potential connection paths at sub-millisecond speeds.

sequenceDiagram
    participant User
    participant App as Application
    participant Engine as FGA Service (Zanzibar)
    
    User->>App: Request Action on Object X
    App->>Engine: check(User, Action, ObjectX)
    Note over Engine: Traverses Relationship Graph
    Engine-->>App: PERMIT/DENY
    App->>App: Apply Dynamic Redaction
    App-->>User: Delivers Filtered Content
1

Define Relationships

The system stores "Tuples" that define precise connections between subjects and objects. For example: `User:123` is a `member` of `Group:Marketing` which is an `owner` of `Folder:Q4-Strategy`.

2

Traverse & Resolve

Upon a request, the engine traverses the relationship graph to find all valid paths from the user to the resource. Access is granted if any path satisfies the required permission level (e.g., inherited via group membership).

3

Atomic Filtering

Once object-level access is confirmed, the system applies secondary filters to the data fields themselves, redacting PII or sensitive metadata that the specific user is not authorized to see.


Modern FGA requires a specialized “Externalized Authorization” service to maintain performance and consistency.

// Simplified Fine-Grained Relationship Check
async function canUserEditDocument(userId: string, docId: string): Promise<boolean> {
// 1. Identify Subject and Object
const subject = `user:${userId}`;
const object = `document:${docId}`;
// 2. Perform Relation Check (Recursive)
const result = await fgaClient.check({
user: subject,
relation: 'editor',
object: object
});
return result.allowed;
}

Master the implementation of granular and relationship-based security architectures.