How Uber Reinvented Access Control: Charter ABAC, SPIFFE Identities, and authfx Library
Inside Uber's microservice authorization architecture: replacing hardcoded rules with Charter Attribute-Based Access Control, SPIFFE, and authfx.
On this page
At Uber’s global operational scale, every ride request, food delivery, and driver payout traverses a massive service mesh comprising thousands of microservices handling millions of Remote Procedure Calls (RPCs) per second.
In such a sprawling architecture, answering authorization questions is a life-or-death security imperative:
- “Can the Driver Dispatch Service view rider geolocation coordinates?”
- “Is the Billing Engine authorized to debit a customer’s corporate wallet?”
- “Can an offshore support agent access raw telephone numbers during an active trip?”
Historically, authorization was fragmented. Individual engineering teams implemented their own bespoke access control rules inside application controllers.
Some checked hardcoded IP whitelists; others inspected JWT role claims; many relied on manual boolean logic written in Go or Java.
This fragmentation created severe security vulnerabilities, configuration drift, and compliance audit nightmares.
To solve this, Uber engineered Charter: a centralized, high-throughput Attribute-Based Access Control (ABAC) platform powered by SPIFFE cryptographic identities and the in-process authfx evaluation library.
+-------------------------------------------------------------------------------+
| UBER CHARTER AUTHORIZATION ARCHITECTURE |
+-------------------------------------------------------------------------------+
[Central Policy Repository (Git / Charter Management Console)]
|
v (Compiles human policies into optimized AST bytecode)
[Charter Control Plane Service]
|
v (Distributes compiled policies via streaming gRPC / Kafka)
+-------------------------------------------------------------------------------+
| MICROSERVICE CONTAINER (Local Node) |
+-------------------------------------------------------------------------------+
| |
| [Inbound RPC Request (gRPC / TChannel with SPIFFE Peer Certificate)] |
| | |
| v |
| [authfx In-Process Middleware Engine] |
| |-- Extracts Actor Identity: spiffe://uber.com/service/dispatch |
| |-- Resolves Resource UON: uon://trip/us-west-2/trip_1024 |
| |-- Evaluates Cached Policy Rules in Microseconds (Zero Network Hop!) |
| \-- Emits Cryptographic Audit Log Event |
| | |
| +---> Allowed: Pass request to Service Business Logic Handler |
| \---> Denied: Return gRPC Status: UNAUTHENTICATED / PERMISSION_DENIED |
| |
+-------------------------------------------------------------------------------+
1. The Core Authorization Primitive: Actor, Action, Resource, Context
Uber unified all authorization decisions across the company around a single universal mathematical tuple:
Can <Actor> perform <Action> on <Resource> within <Context>?
+-------------------------------------------------------------------------------+
| THE FOUR AUTHORIZATION DIMENSIONS |
+-------------------------------------------------------------------------------+
Dimension Identifier Standard Example
---------------------------------------------------------------------------------
Actor SPIFFE ID spiffe://uber.com/service/billing-srv
Action RPC Method /uber.trip.TripService/GetTripDetails
Resource Uber Object Notation (UON) uon://uber/trip/uuid_491024
Context Dynamic Runtime Attributes { "is_active_trip": true, "time": "..." }
1. Cryptographic Actor Identification via SPIFFE
Never trust caller identity based on HTTP headers or unverified payload parameters.
Uber assigns every running container a SPIFFE ID (Secure Production Identity Framework for Everyone) embedded in a mutual TLS (mTLS) X.509 certificate.
When Service A calls Service B, the hardware network layer authenticates Service A’s cryptographic certificate. The authfx library extracts the verified identity directly from the TLS handshake context.
2. Uber Object Notation (UON) for Resources
Resources are standardized using hierarchical UON URIs. This allows policies to enforce permissions at varying granularities: matching an entire resource class (uon://uber/payment/*) or a specific instance (uon://uber/trip/1024).
2. Moving from RBAC to ABAC: Why Roles Fail at Scale
Traditional Role-Based Access Control (RBAC) assigns users and services flat roles (admin, support_agent, billing_worker).
RBAC collapses under real-world contextual complexity:
- A customer support agent should be allowed to view rider trip details, but only if the trip occurred within the last 7 days AND the rider has an open support ticket assigned to that agent.
- A fraud analysis service should be allowed to inspect payment transactions, but only if the fraud score exceeds 0.85.
In RBAC, representing these conditions leads to role explosion: engineers end up creating thousands of absurdly narrow roles (support_agent_active_tickets_tier_2).
Attribute-Based Access Control (ABAC) solves this by evaluating dynamic boolean expressions over runtime attributes:
# Charter Policy Definition Example
policy_name: "rider_contact_access"
domain: "safety_and_support"
rule:
actor_matches: "spiffe://uber.com/service/support-portal"
action: "ViewRiderPhoneNumber"
resource_pattern: "uon://uber/user/{rider_id}"
condition: >
context.agent.has_active_ticket == true &&
context.ticket.rider_id == resource.rider_id &&
context.trip.status == "IN_PROGRESS"
3. The Performance Mandate: In-Process authfx Evaluation
In a microservice call graph with 20 sequential hops, adding a network call for authorization on every hop destroys tail latency:
20 hops * 5ms network authorization RPC = 100ms pure auth overhead
Uber rejected the centralized authorization server model (like Open Policy Agent running as an external daemon over HTTP). Instead, they engineered authfx: an in-process library embedded directly into the Go and Java service frameworks.
The In-Process Evaluation Mechanics
- Local Policy Caching: The Charter control plane continuously broadcasts compiled policy bundles to microservices via streaming gRPC and Kafka topics.
- Microsecond Evaluation: When an inbound RPC lands,
authfxevaluates the policy AST entirely in local CPU memory. Evaluation latency is under 15 microseconds. - Zero Network Dependencies: If the Charter central control plane crashes or network partitions sever data center connections, microservices continue evaluating authorization policies locally using cached rules.
4. Policy Life Cycle and Safe Production Rollouts
Modifying an authorization rule in a multi-billion-dollar production system carries high risk: an errant policy rule could block all drivers from completing trips or expose financial records.
Charter enforces a rigid four-stage deployment pipeline:
+-------------------------------------------------------------------------------+
| CHARTER POLICY DEPLOYMENT PIPELINE |
+-------------------------------------------------------------------------------+
[1. Git Pull Request] ---> Static Analysis & Security Policy Linter
|
v
[2. Automated Replay Simulation (Shadow Mode)]
Run new policy against 1,000,000 historical production RPC logs!
Verify zero unexpected denials on valid traffic.
|
v
[3. Canary Deployment (Audit-Only Mode)]
Deploy to 1% of production instances.
authfx evaluates policy: logs what WOULD be denied without blocking.
|
v
[4. Full Enforcement Mode]
Policy goes live across 100% of the fleet with automated rollback triggers.
Architectural Comparison Matrix
| Capability | Legacy Ad-Hoc Access Control | Uber Charter ABAC Architecture |
|---|---|---|
| Actor Verification | Unverified HTTP headers / static API keys | Cryptographic mTLS X.509 SPIFFE identities |
| Policy Storage | Hardcoded logic in Java/Go controllers | Centralized Git repository with versioned schemas |
| Access Model | Static Role-Based Access Control (RBAC) | Dynamic Attribute-Based Access Control (ABAC) |
| Evaluation Path | Out-of-band RPC or scattered local logic | In-process authfx library (< 15 microseconds) |
| Auditability | Fragmented, non-standard application logs | Unified structured cryptographic audit telemetry |
| Resilience | Central auth server downtime halts traffic | Zero network dependency; local cached policy evaluation |
Summary and Key Takeaways
- Unify around Actor, Action, Resource, and Context: Standardize all authorization decisions across microservices onto a common semantic model.
- Cryptographic identity via SPIFFE: Never trust self-reported caller identities; verify identities at the network layer using mutual TLS certificates.
- ABAC eliminates role explosion: Replace static roles with dynamic attribute-based rules that inspect contextual metadata like ticket status and trip state.
- Evaluate policies in-process: Avoid external network RPCs in the critical path; compile policies into memory for sub-20-microsecond in-process evaluation.
- Simulate policies before enforcement: Prevent catastrophic permission outages by replaying candidate policies against millions of production access logs in shadow mode prior to deployment.

/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.