Capability tokens, not roles
category: Securitydate: 1 min read
#security#authz#macaroons#capabilities
RBAC is fine until it isn't. The moment you need "this service can call that service, but only on Tuesdays, for this tenant, for the next four minutes", roles become a combinatorial mess. Capabilities with caveats let you express that as data.
GO
// a caveat is a predicate the verifier checkstok := issuer.New(). Caveat("op", "read"). Caveat("tenant", tenantID). Caveat("exp", inFourMinutes()). Discharge()Roles answer "who are you?". Capabilities answer "what are you allowed to do, here, now?". The second question is the one attackers care about.
end of file · capability-tokens-not-roles.md