Your JWT Is Lying to You - The Authorization Problem Nobody Solves Correctly
From the publisher’s feed, collected in the ZeroLabs newsroom.
A valid token proves who you are. It says almost nothing about what you’re actually allowed to do.The gap between those two sentences is where most authorization architectures silently collapse - and where botnets quietly walk in.Reading time: ~20 minutesLevel: Senior Engineers, Platform/Security Architects, Engineering LeadsTags: Authorization OPA Open Policy Agent Policy as Code Keycloak Security Microservices RBAC ABAC BotnetPart 2 of 2 — Read Part 1: Authentication & Authorization Explained: Okta vs Keycloak, Flows & Real Request/Response →The Token TrapYou’ve done everything right.You implemented OAuth 2.0 with PKCE. Your JWTs are short-lived. You validate the signature, the issuer, the audience, the expiry - every claim. You’ve read Part 1 of this series and you’re nodding along.And then your product manager says:“Finance users in the EU region should only be able to export reports during business hours, but only if the report doesn’t contain PII, and only if their manager has approved the data access request in the last 30 days.”Your JWT says "role": "finance".That’s it. That’s the entire authorization signal in your token. And now you have a decision tree with six branches that can change at any time, can’t be hardcoded, and needs to be auditable for your SOC 2 Type II audit.Welcome to the real authorization problem.This article is about what happens after the token is validated - the layer most applications get dangerously wrong. We’ll cover:Why token-based authorization breaks down at scaleThe four authorization models and when each appliesCode-based authz and why it becomes a liabilityRule engines: power and pitfallsOpen Policy Agent (OPA) — architecture, Rego language, real request/responseThe policy engine landscape: Cedar, Casbin, Cerbos, SpiceDB — with honest tradeoffsHow botnets exploit weak authorization — and how to stop them at the policy layerLet’s build the system that actually holds.Part 1 — Why Your JWT Isn’t EnoughThe JWT Authorization IllusionA JWT access token encodes claims. Claims are static assertions baked into the token at issuance time. The problem: authorization decisions are almost never static.Consider what a real authorization decision requires:QUESTION: Can user U perform action A on resource R?Requires: ✓ Who is U? ← JWT tells you this ✓ What roles/groups does U belong to? ← JWT might tell you this ✗ What is the current state of R? ← JWT knows nothing ✗ What are R's ownership rules? ← JWT knows nothing ✗ What is the current time/context? ← JWT knows nothing ✗ Has U's access been revoked since ← JWT knows nothing the token was issued? (tokens are valid until exp) ✗ Does U have a pending approval ← JWT knows nothing for this specific resource?The JWT knows only about the user at the moment of issuance. Everything dynamic — resource state, organizational policy, time-based rules, approval workflows — lives outside the token.The Microservices Explosion ProblemIn a monolith, your authorization logic lives in one place. Imperfect, but manageable.In a microservices architecture with 40 services:Without a centralized authorization layer, you get:Policy drift — 6 teams implementing the same rule 6 different waysShadow access — services calling other services with no authz check at allAudit hell — no single place to answer “who could access X last Tuesday?”Deployment coupling — changing a business rule requires deploying 12 servicesThis is the architectural forcing function for external policy engines.Part 2 — The Four Authorization ModelsBefore picking a tool, get clear on which model your problem requires. Most real systems need a combination.Model 1: RBAC — Role-Based Access ControlThe most widely implemented model. Permissions are attached to roles; roles are assigned to users.User ──→ Role ──→ Permissions─────────────────────────────alice → admin → [read, write, delete, manage_users]bob → editor → [read, write]carol → viewer → [read]Strengths: Simple, auditable, intuitive, well-supported everywhereWeaknesses: Role explosion (enterprises with 500+ roles), no context awareness, coarse-grainedUse when: Permissions map cleanly to a small set of organizational rolesModel 2: ABAC — Attribute-Based Access ControlAccess decisions are computed from attributes of the subject (user), resource, action, and environment, evaluated against a policy.POLICY: allow_access = ( subject.clearance_level >= resource.classification AND subject.department IN resource.allowed_departments AND environment.ip_address IN subject.trusted_ip_ranges AND action IN ["read", "download"] AND NOT resource.is_archived)Strengths: Extremely flexible, context-aware, handles complex multi-dimensional rulesWeaknesses: Complex to reason about, harder to debug, policy sprawl riskUse when: Permissions are contextual, multi-dimensional, or change frequentlyModel 3: ReBAC — Relationship-Based Access ControlAccess is determined by the graph of relationships between users and resources. This is the model behind Google Drive, Google Docs, and Google Calendar — and the model described in Google’s Zanzibar paper (published at USENIX 2019).alice owner-of document:budget_q3bob editor-of document:budget_q3carol viewer-of folder:finance ──→ (inherits) viewer-of document:budget_q3Strengths: Scales for social-graph and SaaS permission models, very expressiveWeaknesses: Complex graph traversal, harder to implement from scratchUse when: Permissions are hierarchical, inherited, or relationship-based (think Google Drive, GitHub, Notion)Model 4: Policy-as-CodePolicies are expressed as code or structured data in a domain-specific language, stored in version control, tested, and enforced by a dedicated policy engine.rego# OPA Policy - Rego languagepackage finance.reportsdefault allow = falseallow { input.user.role == "analyst" input.user.department == "finance" input.resource.classification != "pii" is_business_hours}is_business_hours { hour := time.clock(time.now_ns())[0] hour >= 9 hour }Strengths: Versionable (Git), testable (unit tests), auditable, decoupled from application codeWeaknesses: New language/toolchain to learn, external call latency, ops overheadUse when: Policies change independently of code, need audit trails, or span multiple servicesPart 3 — Code-Based Authorization: The Comfortable TrapAlmost every application starts here. Authorization logic lives inline in the application code.python# Python example - inline authorization@app.route("/api/reports/", methods=["GET"])def get_report(report_id): user = get_current_user() report = db.get_report(report_id)# Authorization logic - inline if user.role not in ["admin", "analyst", "finance_manager"]: return jsonify({"error": "Forbidden"}), 403 if report.classification == "confidential" and user.clearance return jsonify({"error": "Insufficient clearance"}), 403 if report.region == "EU" and user.department != "finance": return jsonify({"error": "Region restriction"}), 403 return jsonify(report.to_dict())Why This Works — Until It Doesn’tWhen you have 1 service and 3 rules: Perfect. Simple, fast, zero infra, easy to debug.When you have 20 services and 40 rules: Disaster.The real costs of code-based authorization at scale:✅ Use for simple apps, early-stage products, single-service architectures.❌ Do not scale beyond 3–5 services without an externalized authorization strategy.Part 4 — Rule Engines: Power and PitfallsRule engines externalize decision logic from code into a rules repository that can be modified without redeployment. Classic examples: Drools (Java), Easy Rules, NRules (.NET).A Drools Examplejava// Drools DRL rulerule "Finance EU Region Restriction" when $user : User(department == "finance", region != "EU") $report : Report(region == "EU", classification == "confidential") $req : AccessRequest(user == $user, resource == $report, action == "export") then $req.setDecision(Decision.DENY); $req.setReason("EU confidential reports require EU region membership");endRule Engine StrengthsBusiness-readable rules — non-engineers can often read and modify themExternalized from code — rule changes don’t require code deploymentPriority and conflict resolution — most engines handle rule orderingWide ecosystem — Drools has 20+ years of production useRule Engine WeaknessesRule sprawl — hundreds of rules become impossible to reason about holisticallyVersion control friction — rules often live in databases, not GitLimited composability — rules don’t compose as cleanly as code or DSLsPerformance — complex rule sets with forward chaining can be slowNot cloud-native — most rule engines weren’t designed for microservices or KubernetesTesting is hard — rule interactions create emergent behavior that’s difficult to test✅ Excellent for business-logic-heavy domains (insurance, banking, compliance).❌ Awkward fit for distributed microservice authorization.Part 5 — Open Policy Agent (OPA): The Policy Engine for the Cloud-Native EraWhat Is OPA?Open Policy Agent is a CNCF graduated project — the same category as Kubernetes, Prometheus, and Envoy. It graduated from CNCF in February 2021 and is used in production by organizations like Goldman Sachs, Netflix, Pinterest, and T-Mobile. It’s a general-purpose policy engine that decouples policy decisions from policy enforcement.The core idea:Your Service: "Can user alice DELETE document:budget_q3?" ↓ OPA: evaluates policy against input data ↓Decision: { "allow": true } or { "allow": false, "reason": "..." }OPA doesn’t know anything about your specific application. You define the policy in Rego (OPA’s purpose-built policy language), and OPA evaluates it against arbitrary JSON input.OPA ArchitectureThe Rego Language — Learning It in One SectionRego is a declarative language. You describe what the policy is, not how to evaluate it.Basic Structure:regopackage myapp.authz # Namespace for this policyimport future.keywords # Use modern Rego syntax# Default decisiondefault allow := false# Rule: allow if ALL conditions are trueallow if { input.user.role == "admin"}allow if { input.user.role == "analyst" input.resource.type == "report" input.action == "read"}Input & Data — the two JSON objects OPA evaluates:json// input - sent by your service per request{ "user": { "id": "user_123", "role": "analyst", "department": "finance", "mfa_verified": true, "ip": "10.0.5.12" }, "resource": { "id": "report_456", "type": "report", "classification": "internal", "owner_dept": "finance", "is_pii": false }, "action": "export", "context": { "timestamp": "2024-03-15T14:32:00Z", "environment": "production" }}json// data - preloaded context (user approvals, resource ACLs, etc.){ "approved_exports": { "user_123": ["report_456", "report_789"] }, "trusted_ips": ["10.0.0.0/8", "192.168.1.0/24"]}A Production-Grade OPA Policy — Step by Stepregopackage finance.reportsimport future.keywords# ─── Defaults ────────────────────────────────────────────────────────────────default allow := falsedefault deny_reason := "Access denied by default policy"# ─── Main Decision ────────────────────────────────────────────────────────────# Full allow: admin users bypass all checksallow if { input.user.role == "admin"}# Conditional allow: analysts with all conditions satisfiedallow if { is_analyst is_authorized_department not is_pii_restricted is_business_hours has_export_approval is_trusted_network input.user.mfa_verified == true}# ─── Sub-rules (composable) ───────────────────────────────────────────────────is_analyst if { input.user.role in {"analyst", "senior_analyst", "finance_manager"}}is_authorized_department if { input.user.department == input.resource.owner_dept}is_pii_restricted if { input.resource.is_pii == true input.user.role != "data_officer"}is_business_hours if { hour := time.clock(time.parse_rfc3339_ns(input.context.timestamp))[0] hour >= 9 hour }has_export_approval if { input.resource.id in data.approved_exports[input.user.id]}# CIDR check for trusted network (OPA built-in)is_trusted_network if { net.cidr_contains_ip("10.0.0.0/8", input.user.ip)}# ─── Deny Reasons (for audit / UX) ────────────────────────────────────────────deny_reasons[msg] if { not is_analyst msg := "User role is not authorized for report exports"}deny_reasons[msg] if { is_analyst not is_business_hours msg := "Report exports are only allowed during business hours (9AM-6PM UTC)"}deny_reasons[msg] if { is_analyst not has_export_approval msg := "No active approval found for this report. Request access via the data portal."}deny_reasons[msg] if { is_pii_restricted msg := "Report contains PII. Only Data Officers can export PII-classified reports."}OPA Request & Response — Full HTTPRequest from your service to OPA:httpPOST /v1/data/finance/reports HTTP/1.1Host: localhost:8181Content-Type: application/json{ "input": { "user": { "id": "user_123", "role": "analyst", "department": "finance", "mfa_verified": true, "ip": "10.0.5.12" }, "resource": { "id": "report_456", "type": "report", "classification": "internal", "owner_dept": "finance", "is_pii": false }, "action": "export", "context": { "timestamp": "2024-03-15T14:32:00Z", "environment": "production" } }}OPA Response — Allowed:httpHTTP/1.1 200 OKContent-Type: application/json{ "result": { "allow": true, "deny_reasons": [] }}OPA Response — Denied:httpHTTP/1.1 200 OKContent-Type: application/json{ "result": { "allow": false, "deny_reasons": [ "Report exports are only allowed during business hours (9AM-6PM UTC)", "No active approval found for this report. Request access via the data portal." ] }}How Your Service Uses the Decisionjavascript// Node.js / Express middlewareasync function authorizeWithOPA(req, res, next) { const input = { user: req.user, // from JWT claims resource: req.resource, // loaded by resource middleware action: req.method.toLowerCase(), context: { timestamp: new Date().toISOString(), environment: process.env.NODE_ENV, } };const opaResponse = await fetch("http://opa-sidecar:8181/v1/data/finance/reports", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ input }) }); const { result } = await opaResponse.json(); if (!result.allow) { return res.status(403).json({ error: "Forbidden", reasons: result.deny_reasons }); } next();}OPA in Kubernetes — Admission ControlOPA’s most widespread production use: Kubernetes admission control via OPA Gatekeeper. Policies govern what can be deployed to your cluster.rego# Gatekeeper policy: require resource limits on all containerspackage k8srequiredresourcesviolation[{"msg": msg}] { container := input.review.object.spec.containers[_] not container.resources.limits.memory msg := sprintf("Container '%v' must specify memory limits", [container.name])}violation[{"msg": msg}] { container := input.review.object.spec.containers[_] not container.resources.limits.cpu msg := sprintf("Container '%v' must specify CPU limits", [container.name])}Writing OPA Unit TestsOne of OPA’s biggest strengths — policies are testable like regular code:rego# policy_test.regopackage finance.reports_testimport data.finance.reports# ─── Test: admin always allowed ──────────────────────────────────────────────test_admin_always_allowed if { reports.allow with input as { "user": {"id": "u1", "role": "admin", "mfa_verified": true}, "resource": {"id": "r1", "is_pii": true}, "action": "export", "context": {"timestamp": "2024-03-15T02:00:00Z"} }}# ─── Test: analyst denied outside business hours ──────────────────────────────test_analyst_denied_outside_hours if { not reports.allow with input as { "user": { "id": "u2", "role": "analyst", "department": "finance", "mfa_verified": true, "ip": "10.0.5.1" }, "resource": { "id": "r1", "is_pii": false, "owner_dept": "finance" }, "action": "export", "context": {"timestamp": "2024-03-15T02:00:00Z"} # 2AM UTC }}# ─── Test: correct deny reason returned ───────────────────────────────────────test_deny_reason_outside_hours if { reasons := reports.deny_reasons with input as { "user": { "id": "u2", "role": "analyst", "department": "finance", "mfa_verified": true, "ip": "10.0.5.1" }, "resource": {"id": "r1", "is_pii": false, "owner_dept": "finance"}, "action": "export", "context": {"timestamp": "2024-03-15T02:00:00Z"} } "Report exports are only allowed during business hours (9AM-6PM UTC)" in reasons}Run with:bashopa test ./policies/ -v# PASS: 12/12OPA Strengths & Weaknesses✅ Strengths:CNCF graduated — production battle-tested at Goldman Sachs, Netflix, Pinterest, and T-MobilePolicies are code: versioned in Git, reviewed via PR, tested in CICompletely decoupled from your application language/frameworkRich built-in functions (CIDR checks, JWT decode, time, crypto)Partial evaluation — OPA can generate SQL/Elasticsearch filters for data-layer enforcementFirst-class Kubernetes integration via Gatekeeper❌ Weaknesses:Rego learning curve — the declarative, logic-programming paradigm is unfamiliarNetwork latency — each authorization check is an HTTP call (mitigated by sidecar deployment)Operational overhead — you manage OPA instances, bundle serving, policy distributionDebugging complexity — understanding why a complex Rego policy evaluated a certain way requires tooling (opa eval --explain)Not a great fit for ReBAC — graph traversal in Rego is possible but awkwardPart 6 — The Policy Engine LandscapeOPA isn’t the only option. Here’s an honest assessment of the alternatives.Casbin — The Developer-Friendly Embedded EngineCasbin uses a PERM model (Policy, Effect, Request, Matchers) defined in a simple .conf file. It's embedded directly in your application — no separate service.ini# model.conf[request_definition]r = sub, obj, act[policy_definition]p = sub, obj, act[role_definition]g = _, _[policy_effect]e = some(where (p.eft == allow))[matchers]m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.actcsv# policy.csvp, alice, /reports, readp, alice, /reports, writep, bob, /reports, readg, alice, adming, bob, viewergo// Go usagee, _ := casbin.NewEnforcer("model.conf", "policy.csv")ok, _ := e.Enforce("alice", "/reports", "write") // trueStrengths: Zero infra, 20+ language SDKs, no network hop, familiar ACL/RBAC/ABAC modelsWeaknesses: Policies in CSV or DB (not ideal for complex logic), no built-in audit, limited policy languageBest for: Application-level RBAC/ABAC in a single service, adding authz to an existing app quicklyCedar (AWS) — Type-Safe Policy for Fine-Grained AuthorizationCedar is AWS’s open-source policy language and engine, open-sourced in May 2023, and built for Amazon Verified Permissions. It’s written in Rust and strongly typed — the schema validates that your policies reference real entities. It has since joined CNCF as a Sandbox project.cedar// Cedar policypermit( principal == User::"alice", action in [Action::"read", Action::"export"], resource == Report::"budget_q3")when { principal.department == resource.ownerDepartment && context.mfaVerified && context.currentHour >= 9 && context.currentHour };The type system means this is a compile-time error:cedar// ❌ Cedar rejects this - Report has no field "nonExistentField"when { resource.nonExistentField == true };Strengths: Type safety catches policy errors at write time, excellent for AWS workloads, clean and readable syntax, formal verification via automated reasoningWeaknesses: Newer ecosystem (open-sourced 2023), AWS-native origin (though open-source and now in CNCF Sandbox), fewer built-in functions vs RegoBest for: AWS-native applications, teams wanting type-safe policies, Amazon Verified Permissions managed serviceCerbos — Developer-First Self-Hosted Policy EngineCerbos is the “developer-friendly OPA” — policies written in YAML (not a custom DSL), with a built-in playground, audit trail, and a managed cloud option (Cerbos Hub).yaml# report_policy.yamlapiVersion: api.cerbos.dev/v1resourcePolicy: resource: report version: "default" rules: - actions: ["read"] effect: EFFECT_ALLOW roles: ["analyst", "finance_manager", "admin"] - actions: ["export"] effect: EFFECT_ALLOW roles: ["analyst", "finance_manager"] condition: match: all: of: - expr: request.resource.attr.is_pii == false - expr: request.principal.attr.department == request.resource.attr.owner_dept - expr: request.principal.attr.mfa_verified == trueRequest:json{ "principal": { "id": "user_123", "roles": ["analyst"], "attr": { "department": "finance", "mfa_verified": true } }, "resources": [{ "kind": "report", "id": "report_456", "attr": { "is_pii": false, "owner_dept": "finance" } }], "actions": ["read", "export"]}Response:json{ "results": [{ "resource": { "id": "report_456", "kind": "report" }, "actions": { "read": { "effect": "EFFECT_ALLOW" }, "export": { "effect": "EFFECT_ALLOW" } } }]}Strengths: YAML policies (no new language to learn), built-in audit log, query planner for data filtering, Cerbos Hub for managed policy distribution, excellent developer experienceWeaknesses: Less expressive than Rego for very complex logic, smaller ecosystem than OPABest for: Teams wanting OPA-like architecture without Rego’s learning curve, greenfield microservicesSpiceDB — Google Zanzibar for EveryoneSpiceDB implements Google’s Zanzibar paper — the authorization system that powers Google Drive, Docs, Calendar, YouTube, Maps, and Photos. It’s a graph-based ReBAC engine.zed// SpiceDB schema (Zed language)definition user {}definition organization { relation member: user relation admin: user permission manage = admin permission view = member + admin}definition document { relation owner: user relation editor: user | organization#member relation viewer: user | organization#member permission edit = owner + editor permission view = viewer + edit // edit implies view permission delete = owner}Strengths: Handles complex inheritance and relationship graphs, solves Zanzibar’s “new enemy” problem (consistent permission updates), purpose-built for SaaS permission modelsWeaknesses: Overkill for simple RBAC, requires relationship data to be maintained in SpiceDB (sync overhead), graph traversal latency at scaleBest for: SaaS products with complex sharing models, multi-tenant apps where users share resources with other users, teams building “Google Drive-like” permission modelsThe Comparison MatrixPart 7 — Botnets, Credential Stuffing & Authorization as a Defense LayerThis is the section most authorization articles skip entirely. Let’s change that.How Botnets Exploit Weak AuthorizationA botnet doesn’t break your authentication. It passes your authentication — using credentials stolen from other breaches (credential stuffing) or by generating valid tokens at massive scale. Then it exploits the gaps in your authorization layer.Attack vectors that weak authorization enables:BOLA (Broken Object Level Authorization) has held the #1 spot on the OWASP API Security Top 10 since 2019 — through both the 2019 and 2023 editions. It’s not an authentication failure — it’s an authorization failure. The token is valid. The user exists. The resource exists. But the user doesn’t own the resource, and the code never checked.Building Threat-Aware Authorization with OPAThe key insight: authorization decisions can consume threat signals as input.OPA policy with risk-aware authorization:regopackage api.securityimport future.keywordsdefault allow := falsedefault require_stepup_mfa := false# Low-risk users: allow normallyallow if { valid_token risk_score not is_sensitive_action}# Medium-risk users: allow with step-up MFAallow if { valid_token risk_score >= 30 risk_score input.context.stepup_mfa_completed == true}# High-risk: always block, trigger alert# (no allow rule fires → default false)# ─── Step-up MFA trigger ──────────────────────────────────────────────────────require_stepup_mfa if { valid_token risk_score >= 30 risk_score input.context.stepup_mfa_completed != true}# ─── Risk score computation ───────────────────────────────────────────────────risk_score := score if { score := sum([ ip_risk_points, velocity_risk_points, anomaly_risk_points, device_risk_points ])}ip_risk_points := 40 if { input.context.ip_reputation == "botnet" }ip_risk_points := 20 if { input.context.ip_reputation == "vpn" }ip_risk_points := 0 if { input.context.ip_reputation == "clean" }velocity_risk_points := 30 if { input.context.requests_last_minute > 100 }velocity_risk_points := 0 if { input.context.requests_last_minute anomaly_risk_points := 25 if { input.context.geo_velocity_anomaly == true }anomaly_risk_points := 0 if { input.context.geo_velocity_anomaly == false }device_risk_points := 20 if { input.context.known_device == false }device_risk_points := 0 if { input.context.known_device == true }# ─── Helper rules ─────────────────────────────────────────────────────────────valid_token if { input.token.verified == true input.token.exp > time.now_ns() / 1000000000}is_sensitive_action if { input.action in {"delete", "export", "bulk_download", "admin"}}Enriched input sent to OPA with threat signals — blocked botnet example:json{ "input": { "token": { "verified": true, "sub": "user_123", "role": "analyst", "exp": 1715000000 }, "action": "export", "resource": { "id": "report_456", "type": "report" }, "context": { "ip": "185.220.101.45", "ip_reputation": "botnet", "known_device": false, "geo_velocity_anomaly": false, "requests_last_minute": 12, "stepup_mfa_completed": false } }}OPA Decision:json{ "result": { "allow": false, "require_stepup_mfa": false, "risk_score": 60 }}Bot Detection Tools to Feed OPAPart 8 — How to Choose: The Decision TreeThe Tradeoff SummaryThe Authorization Maturity ModelWhere does your organization sit today?Most production systems live at Level 1 or 2. The goal of this article is to help you understand what Level 3–5 looks like — and when it’s worth building there.Conclusion: Authorization Is a First-Class SystemThe pattern across every major breach, every compliance failure, every “how did they get access to that?” postmortem is the same: authentication was treated as the security boundary. Authorization was an afterthought.Your authentication layer proves identity. It’s the passport check. Authorization is everything after — every gate, every room, every cabinet. And in a world of 40 microservices, dynamic user permissions, shared resources, and sophisticated botnets that pass authentication trivially, coarse-grained token-based authorization isn’t enough.The tools exist. OPA is mature, battle-tested, and free. Cerbos makes it accessible. Cedar makes it type-safe. SpiceDB makes it scalable for relationship graphs. The question is no longer “is this possible?” — it’s “when do we prioritize it?”The answer, increasingly, is: before your next security audit finds it for you.Series RecapPart 1 — Authentication & Authorization Explained: Okta vs Keycloak covered:AuthN vs AuthZ mental modelsOAuth 2.0, OIDC, SAML, JWT internalsEvery OAuth flow with real HTTP request/responseOkta vs Keycloak deep-divePart 2 (this article) covered:Why JWTs aren’t enough for fine-grained authorizationRBAC, ABAC, ReBAC, Policy-as-code modelsOPA, Rego, and production-grade policies with real API callsCasbin, Cedar, Cerbos, SpiceDB — honest tradeoffsThreat-aware authorization to stop botnets at the policy layerFurther ReadingOPA DocumentationCerbos DocumentationCedar Language SpecificationSpiceDB DocumentationGoogle Zanzibar Paper (USENIX 2019)OWASP API Security Top 10NIST ABAC GuideIf this changed how you think about authorization architecture, hit that clap button. If your team is making one of these mistakes right now — share this with them. It might save you a very expensive incident report.Questions about your specific architecture? Drop them in the comments.Your JWT Is Lying to You - The Authorization Problem Nobody Solves Correctly was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.