Release 0.5.0: Manifest-based authorization with package grants#31
Merged
Release 0.5.0: Manifest-based authorization with package grants#31
Conversation
Add comprehensive documentation for package grants and manifest authority: - Add rajee-manifest.md explaining immutable manifest authorization model - Add specs/4-manifest/01-package-grant.md with detailed package grant design - Documents Quilt+ URI scheme for immutable package references - Specifies Cedar model for Package entity type and quilt:ReadPackage actions - Details RAJEE enforcement via package resolution and membership checking - Includes implementation plan and security considerations This extends RAJA/RAJEE to support content-based authorization anchored to immutable Quilt packages, complementing existing location-based path grants. Co-Authored-By: Claude <noreply@anthropic.com>
Add support for package-based authorization using Quilt URIs: - Add PackageToken and PackageAccessRequest models for package grants - Add create_token_with_package_grant() for issuing package tokens - Add validate_package_token() for validating package tokens - Add enforce_package_grant() with membership checking callback - Add quilt_uri.py module for Quilt URI validation - Export new functions and models from raja package - Add comprehensive unit tests for package grant functionality Package grants enable authorization based on manifest membership: - Tokens contain quilt+s3:// URIs referencing specific packages - Membership checked via callback to external manifest resolver - Supports read and readwrite modes for S3 operations Co-Authored-By: Claude <noreply@anthropic.com>
Implements package map functionality that enables: - Logical → physical S3 key translation via manifest - New PackageMapToken model with logical_bucket/logical_key claims - enforce_translation_grant() that returns translated physical targets - Comprehensive unit and integration tests Key components: - PackageMap class for managing logical→physical mappings - Translation enforcement with manifest resolver callback - S3Location model for physical target representation - Updated Decision model to include translated_targets Co-Authored-By: Claude <noreply@anthropic.com>
Auto-formatting applied by ruff format during ./poe all Co-Authored-By: Claude <noreply@anthropic.com>
This commit completes the manifest-based authorization work: - Add new Package entity and quilt:ReadPackage action to Cedar schema - Implement enforce_with_routing for routing between scope-based and package grant enforcement - Add manifest.py module with Quilt manifest parsing and validation - Add package_resolver Lambda handler for resolving package metadata - Enhance QuiltURI to support revision references and better validation - Update models with PackageMetadata and enhanced grant structures - Add comprehensive test coverage for manifest parsing and package resolution - Document package authorization gaps and hardening requirements Co-Authored-By: Claude <noreply@anthropic.com>
- Add return type annotation to _load_quilt3() in manifest.py - Fix Any return type in control_plane.py by explicitly typing decision - Apply ruff formatting to imports and line wrapping Co-Authored-By: Claude <noreply@anthropic.com>
This commit enhances the demo command to fully address the manifest-based authorization specifications in specs/4-manifest/. New demonstration files: - tests/integration/test_rajee_package_grant.py: 4 comprehensive tests demonstrating package grants (RAJ-package tokens) for content-based authorization anchored to immutable Quilt packages - tests/integration/test_rajee_translation_grant.py: 6 comprehensive tests demonstrating translation grants (TAJ-package tokens) for logical-to- physical path translation with package manifests Updated commands: - ./poe demo: Now runs all 3 authorization modes (17 tests total) - ./poe demo-envoy: S3 proxy demonstrations only (7 tests) - ./poe demo-package: Package grant demonstrations only (4 tests) - ./poe demo-translation: Translation grant demonstrations only (6 tests) New specification documents: - specs/4-manifest/05-package-more.md: Additional gaps analysis from post-implementation review - specs/4-manifest/06-demo-coverage.md: Complete documentation of demo coverage, test scenarios, and gap analysis Test results: 17 passed, 1 skipped in ~10 seconds Key features demonstrated: - Package grants: membership checking, scalability, fail-closed semantics - Translation grants: logical→physical translation, multi-region support - Write protection: both token types enforce read-only mode - Mock resolvers: deterministic testing without Quilt3 dependencies Known gaps (documented in 06-demo-coverage.md): - Cedar compiler doesn't support Package resources yet - Package wildcard matching not integrated - Real Quilt3 integration tested separately Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive CHANGELOG documenting all manifest features - Move CEDAR_INTEGRATION_README.md to docs/ directory - Clean up Cedar parser and test files Co-Authored-By: Claude <noreply@anthropic.com>
Closed
The /compile endpoint was architecturally incorrect. AVP is the authoritative policy store and evaluator - there's no need to: 1. Fetch policies back from AVP 2. Parse Cedar with a local Python parser 3. "Compile" them to scopes The correct flow is: - scripts/load_policies.py expands templates and loads to AVP - AVP is the source of truth for policy evaluation - No compilation step needed Changes: - Removed POST /compile endpoint from control plane router - Removed scripts/invoke_compiler.py script - Removed compile-policies task from pyproject.toml - Updated deploy task to only run load-policies (not compile) - Fixed integration test to verify policies exist in AVP - Removed unit tests for the deleted compile endpoint Co-Authored-By: Claude <noreply@anthropic.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
This PR introduces manifest-based authorization - a content-based authorization model where authority is anchored to immutable Quilt package manifests rather than mutable S3 paths.
Key Features
Packageentity type andquilt:ReadPackageactionWhat's Changed
See CHANGELOG.md for complete details:
PackageToken,PackageMapToken,PackageAccessRequest,PackageMapenforce_package_grant(),enforce_translation_grant(),enforce_with_routing()create_token_with_package_grant(),create_token_with_package_map()Testing
All tests pass with comprehensive coverage of:
Documentation
docs/rajee-manifest.md- Admin guide for manifest-based authorizationspecs/4-manifest/- Complete design documentation (6 documents, 2,849 lines)🤖 Generated with Claude Code