feat(authz): route who_can_access and what_can_target_access through FGA cache#767
Open
feat(authz): route who_can_access and what_can_target_access through FGA cache#767
Conversation
…FGA cache Accept fga_cache_url in Authz constructor and pass base_url override to HTTP calls for who_can_access and what_can_target_access, matching the existing FGA cache routing pattern.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds FGA cache routing support for the who_can_access and what_can_target_access methods in the Authz module, allowing these query operations to be routed through a cache proxy when configured. This matches the existing FGA cache pattern used by other authorization methods.
Changes:
- Added
fga_cache_urlparameter support to theAuthzclass constructor - Routed
who_can_accessandwhat_can_target_accessHTTP requests through the FGA cache when configured - Added comprehensive tests verifying cache URL routing for both methods
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| descope/management/authz.py | Added __init__ method to accept and store fga_cache_url, and added base_url parameter to who_can_access and what_can_target_access method calls |
| descope/mgmt.py | Passed fga_cache_url parameter to Authz constructor |
| tests/management/test_authz.py | Added tests verifying cache URL routing for who_can_access and what_can_target_access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)descope/mgmt.py
descope/management/authz.py
|
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.
Related Issues
https://github.com/descope/etc/issues/13966
Description
Pass
fga_cache_urlto theAuthzmodule and setbase_urlon HTTP requests forwho_can_accessandwhat_can_target_access, matching the existing FGA cache routing pattern. Whenfga_cache_urlis configured, these calls route through the cache proxy; when empty, behavior is unchanged.Must