feat(auth,framework,react): implement extensible RBAC contract and gu…#3
Open
gs-layer wants to merge 1 commit intofeat/auth-providerfrom
Open
feat(auth,framework,react): implement extensible RBAC contract and gu…#3gs-layer wants to merge 1 commit intofeat/auth-providerfrom
gs-layer wants to merge 1 commit intofeat/auth-providerfrom
Conversation
…ard API - add provider-agnostic AccessEvaluation shape with extensible reason/constraints/meta - keep fail-closed runtime behavior while validating evaluation payload shape - remove buildCapabilities from framework public exports - add React RBAC guard API (useCanAccess, CanAccess) with pessimistic defaults - add/refresh Keycloak/Auth0 mock contract tests and RBAC guard tests - deduplicate overlapping RBAC test coverage Signed-off-by: G S <grigoriis.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implemented a minimal, sufficient, and extensible RBAC contract in FrontX across
auth,framework, andreact, with fail-closed behavior and a React guard API.What Changed
@hai3/authcanAccess(allow | deny) as the primary path.AccessEvaluationprovider-agnostic and extensible (without hard-coupling to a specific PDP format).AuthProvidermethods.@hai3/frameworkauthplugin runtime:evaluateAccess/evaluateManynormalization remains fail-closed for truly malformed payloads.buildCapabilitiesfrom the public framework surface (kept as internal helper).@hai3/reactuseCanAccessCanAccessuseCanAccesswas decoupled from shadow runtime-shape and now uses the explicit framework contract.Behavior / Contract Notes
Validation
The following checks were executed and passed:
npm run type-check:packages:sdknpm run type-check:packages:frameworknpm run type-check:packages:reactnpm run test --workspace=@cyberfabric/frameworknpm run test --workspace=@cyberfabric/reactnpm run build:packages:sdknpm run build:packages:frameworknpm run build:packages:reactnpm run arch:checknpm run lint:frameworknpm run lint:reactScope Hygiene
This PR includes only changes in
packages/auth,packages/framework,packages/react, and related tests.architecture/**andtmp/**are intentionally excluded.Follow-ups (Non-blocking)
Closes cyberfabric#274