feat: Add OpenID AuthZEN integration for fine-grained authorization (v1)#381
Open
RazcoDev wants to merge 4 commits intoagntcy:mainfrom
Open
feat: Add OpenID AuthZEN integration for fine-grained authorization (v1)#381RazcoDev wants to merge 4 commits intoagntcy:mainfrom
RazcoDev wants to merge 4 commits intoagntcy:mainfrom
Conversation
Implements iteration 1 of AuthZEN integration into SLIM providing standards-based policy enforcement for agent operations. Core features: - Complete AuthZEN v1 API client with caching and fallback policies - SLIM service integration for route/publish/subscribe authorization - Comprehensive demo application with real-world scenarios - Agent to AuthZEN Subject/Resource conversions - Configurable PDP endpoints and graceful degradation This establishes foundation for policy-driven authorization beyond simple JWT claims, enabling centralized policy management. Signed-off-by: Razco <razchn@gmail.com>
- Add minimal SLIM config file for demo with insecure TLS - Fix rustls crypto provider setup to resolve 'No provider set' error - Clean up unused imports and variables in demo code - Demo now runs successfully and shows AuthZEN integration behavior The demo correctly demonstrates fail-closed authorization when no PDP is available. Signed-off-by: Razco <razchn@gmail.com>
- Change default to fail-open (fallback_allow=true) for positive demo experience - Add --fail-closed flag for easy testing of security-first behavior - Improve authorization result messaging to be less alarming: * 'DENIED by policy' instead of error messages * Clear explanations about expected behavior * Better distinction between policy decisions and network failures - Update README with both fail-open and fail-closed usage examples - Add informative headers showing PDP endpoint and fallback policy Demo now provides excellent user experience while demonstrating both security models clearly. Signed-off-by: Razco <razchn@gmail.com>
- Added `mock_pdp` and `no_mock_pdp` flags for local testing with a mock PDP server. - Implemented realistic authorization policies in the mock server for testing. - Updated `Args` struct to include flags for mock PDP usage. - Enhanced README with mock PDP details and usage instructions. - Improved demo output to focus on authorization decisions without actual SLIM operations. This update provides a more user-friendly experience for testing AuthZEN authorization scenarios. Signed-off-by: Razco <razchn@gmail.com>
ae5e35c to
9695b5b
Compare
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.
AuthZEN Integration v1 - Fine-Grained Authorization for SLIM
📖 Proposal
This PR implements iteration 1 of OpenID AuthZEN integration into SLIM, providing standards-based policy enforcement for agent operations beyond simple JWT claims.
🎯 Problem Statement
SLIM currently uses JWT-based authentication but lacks fine-grained authorization capabilities for:
🚀 Solution Overview
Complete AuthZEN v1 implementation providing policy-driven authorization for all SLIM operations:
Core Components Added
1. AuthZEN Client (
data-plane/core/auth/src/authzen.rs)2. SLIM Service Integration (
data-plane/core/service/src/authzen_integration.rs)AuthZenServicewrapper for seamless integrationAgent→AuthZenSubjectAgentType→AuthZenResourceauthorize_route()- Agent-to-agent route establishmentauthorize_publish()- Message publishing with metadataauthorize_subscribe()- Subscription permissions3. Comprehensive Demo (
data-plane/examples/src/authzen-demo/)📊 Technical Details
Dependencies Added:
Error Handling:
Configuration:
🔧 Usage Example
🧪 Demo Application
Run the comprehensive demo:
Expected demo output: