Skip to content

bug(ross): #252: disallow wildcards in apis route roles - #259

Open
imdeepmind wants to merge 1 commit into
developfrom
bug/#252-disallow-wildcards-in-api-roles
Open

imdeepmind wants to merge 1 commit into
developfrom
bug/#252-disallow-wildcards-in-api-roles

Conversation

@imdeepmind

Copy link
Copy Markdown
Owner

Summary

Closes #252

Restricts RBAC wildcard patterns (* and prefix:*) strictly to role inheritance definitions (rbac.roles.<role>.includes) and disallows them in route policy role requirements (apis.<key>.roles).

Changes

  • ross/src/validators/config/validate-rbac.ts: Reject * and prefix:* in apis.<key>.roles with a clear validation error on startup.
  • ross/src/lib/config/api.ts: Remove expandWildcards from resolveApiPolicy and construct roles directly as new Set(rawRoles).
  • ross/src/lib/server/prevalidation.ts: Remove expandWildcards from buildPreValidation when normalizing array roles.
  • Tests & Fixtures: Updated validate-rbac.test.ts, api.test.ts, prevalidation.test.ts, rbac-enforcement.test.ts, full.json, full.resolved.json, and e2e/rbac.spec.ts to use concrete roles and verify wildcard rejection.

Verification

  • ./dev.sh ross check: 118 test files, 2136 tests passed (plus compile and lint).
  • npm run test:e2e -- e2e/rbac.spec.ts (in ross/): 52 passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(rbac): disallow wildcards in apis route roles

1 participant