Kerberos v3.1: Add Query Plans (planResources) - #4
Merged
Conversation
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.
This pull request introduces a major feature release for
@alexify/kerberos(v3.1.0), adding a Cerbos-compatible resources query plan API (planResources) and related infrastructure, improving wire safety, and enhancing documentation and tooling. It also updates CI to track bundle size and expands lint/format coverage. The most important changes are summarized below.Major Feature: Query Planning
kerberos.planResources(args), a Cerbos-compatible resources query plan API that partially evaluates policies and returns a filter tree for unknown resource fields, supporting complex policy features and full parity withisAllowed. Includes partial evaluator, ReBAC bridge, multi-action planning, and observability/metrics.src/planning/for plan node modeling, partial evaluation, and ReBAC operand expansion, with detailed documentation and invariants inCLAUDE.md.planResources, with a new section inCLAUDE.mdand expanded README references. [1] [2]Wire Safety, Security, and Stability
opaqueoperator. Compiled$exprASTs are now deeply frozen at parse time to prevent mutation attacks. Documented these guarantees and security implications inSECURITY.md. [1] [2]Tooling and CI Enhancements
pnpm sizescript (usingesbuild) to measure browser bundle size, with CI integration for smoke testing and visibility in logs. [1] [2] [3] [4]scripts/andbench/directories for improved code quality.Benchmarks and Examples
planResourcesinbench/bench.js, demonstrating partial evaluation and filter generation for complex policies.Documentation and Versioning
CHANGELOG.mdfor v3.1.0 with a comprehensive list of features and fixes.3.1.0and clarified supported versions inSECURITY.md. [1] [2]These changes significantly expand Kerberos.js's capabilities for query planning and Cerbos compatibility, while improving safety, observability, and developer experience.