opa-authz-react
CommunityGate Backstage UI elements with OPA policies
AuthorParsifal-M
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill helps Backstage frontend developers control UI visibility by delegating authorization decisions to Open Policy Agent, making client-side gating consistent with centralized policy logic and reducing hard-coded checks.
Core Features & Use Cases
- RequireOpaAuthz component renders children only when the evaluated Rego entry point returns allow:true, ideal for hiding buttons and sensitive UI elements.
- useOpaAuthz and useOpaAuthzManual hooks enable on-mount and on-demand policy evaluations to implement custom auth flows, conditional dialogs, and guarded actions.
- API factory wiring and testing guidance demonstrates registering OpaAuthzClientReact in apis.ts, shaping input for Rego, and mocking the hooks for unit tests and CI validation.
Quick Start
Install the frontend package, register the OpaAuthzClientReact API factory in packages/app/src/apis.ts, and wrap the protected UI with RequireOpaAuthz referencing your Rego entry point.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: opa-authz-react Download link: https://github.com/Parsifal-M/backstage-opa-plugins/archive/main.zip#opa-authz-react Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.