Skip to content
All guides
Authorization and access control4 min read

The developer’s guide to Fine-Grained Authorization (FGA)

The engineering questions that matter are rarely about which tool.

The engineering questions that matter are rarely about which tool. They are about which failure you are willing to own, and how loudly it will tell you when it happens.

This piece walks through how we think about it at Paycux, what we have changed our minds about, and where the sharp edges are.

‍FGA basics – the data model

That brings us to ‍fga basics – the data model. Idempotency is not a nice-to-have in any system with retries. Key on an identifier the caller supplies, store the outcome, and return the same answer to the same key rather than doing the work twice.

Idempotency is not a nice-to-have in any system with retries. Key on an identifier the caller supplies, store the outcome, and return the same answer to the same key rather than doing the work twice.

Building resolver logic

That brings us to building resolver logic. Make the boundary explicit. When one part of the system can only talk to another through a named interface, you can change either side without a meeting; when it cannot, every change becomes a negotiation.

Measure before you optimise, then measure the thing users feel rather than the thing that is easy to instrument. A p50 that looks fine while the p99 is unusable is a reporting failure, not a performance one.

  • Name the boundary before you cross it
  • Measure what users feel, not what is easy to instrument
  • Make every retried operation idempotent
  • Write down the assumption that would invalidate the design

Centralized vs. decentralized FGA

Consider centralized vs. decentralized fga. Measure before you optimise, then measure the thing users feel rather than the thing that is easy to instrument. A p50 that looks fine while the p99 is unusable is a reporting failure, not a performance one.

Measure before you optimise, then measure the thing users feel rather than the thing that is easy to instrument. A p50 that looks fine while the p99 is unusable is a reporting failure, not a performance one.

Outsourcing FGA (open source or otherwise)

Outsourcing FGA (open source or otherwise) deserves its own treatment. Make the boundary explicit. When one part of the system can only talk to another through a named interface, you can change either side without a meeting; when it cannot, every change becomes a negotiation.

Measure before you optimise, then measure the thing users feel rather than the thing that is easy to instrument. A p50 that looks fine while the p99 is unusable is a reporting failure, not a performance one.

Idempotency is not a nice-to-have in any system with retries.

Frontend / UI considerations

Consider frontend / ui considerations. Idempotency is not a nice-to-have in any system with retries. Key on an identifier the caller supplies, store the outcome, and return the same answer to the same key rather than doing the work twice.

Measure before you optimise, then measure the thing users feel rather than the thing that is easy to instrument. A p50 that looks fine while the p99 is unusable is a reporting failure, not a performance one.

Bonus: FGA and Identity Providers

Consider bonus: fga and identity providers. Measure before you optimise, then measure the thing users feel rather than the thing that is easy to instrument. A p50 that looks fine while the p99 is unusable is a reporting failure, not a performance one.

Make the boundary explicit. When one part of the system can only talk to another through a named interface, you can change either side without a meeting; when it cannot, every change becomes a negotiation.

Further Reading:

Further Reading: deserves its own treatment. Idempotency is not a nice-to-have in any system with retries. Key on an identifier the caller supplies, store the outcome, and return the same answer to the same key rather than doing the work twice.

Make the boundary explicit. When one part of the system can only talk to another through a named interface, you can change either side without a meeting; when it cannot, every change becomes a negotiation.

Where this leaves us

The pattern repeats across every system we have looked at: the hard part is not the mechanism, it is keeping the mechanism honest as the surrounding assumptions change.

If you are working through the same problem and want to compare notes, the docs cover the mechanics and the console shows the behaviour on your own data.

Everything here, already built

Sign-in, enterprise SSO, directory provisioning, roles and an audit trail behind one API.

Stop reading, start shipping

The quickstart takes about ten minutes and leaves you with a working sign-in.