Description
This is the highest-effort task because it connects the new declarative layer to the enforcement behavior already validated by the PoC with Casbin.
- Loader/transformer: build the component that translates validated YAML/dict definitions into Casbin policies (roles → grouping policies, permissions → policy rules).
- Two input sources (per the document's diagram): static definitions specified by a plugin at startup, and dynamic policies specified by an admin at runtime via REST API — both must converge into the same "Extended/Loaded Policy."
- Synchronization: define when the policy gets reloaded (only at startup, or should hot-reload be supported when a module is installed/updated without restarting the process).
- Preserve metadata after loading: Casbin only understands policy strings; ensure
display_name, description, and resource aren't lost in translation to Casbin, and remain accessible for the metadata APIs.
- Compatibility with existing core roles/permissions: don't break current built-in roles during the migration to this unified loader.
Concrete deliverable: a role or permission defined declaratively (by core or an external module) can be assigned to a user and correctly enforced by Casbin, with its metadata intact.
Description
This is the highest-effort task because it connects the new declarative layer to the enforcement behavior already validated by the PoC with Casbin.
display_name,description, andresourcearen't lost in translation to Casbin, and remain accessible for the metadata APIs.Concrete deliverable: a role or permission defined declaratively (by core or an external module) can be assigned to a user and correctly enforced by Casbin, with its metadata intact.