Architecture Overview
This package handles authorization seamlessly across microservice boundaries. Here is what happens under the hood when a user interacts with the system.
The End-User Flow
From the user's point of view, the system is just one giant, fast, cohesive platform. They have no idea they are crossing microservice boundaries.
- Authentication (The Gateway): The user logs into the portal. The central
authservice verifies the password and issues a Traefik session token. - Global Role Assignment: An HR Admin assigns the user a role (e.g.,
ownerof "Alpha folder") via the central dashboard, which silently writes this rule to ReBAC. - The Action: The user clicks a link to open a Miniapp and attempts to create a document.
- The Verification: The Miniapp intercepts the click, glances at the hidden
X-User-Idheader, and instantly asks ReBAC if the user is authorized. - The Result: The document is created, and the user gets a success message in 100 milliseconds.
- The Background Magic: Unbeknownst to the user, the Miniapp's Celery worker whispers to ReBAC to update the graph based on the newly created record.