Skip to content

Comments

feat(authz): route who_can_access and what_can_target_access through FGA cache#767

Open
orius123 wants to merge 2 commits intomainfrom
feat/authz-cache-url
Open

feat(authz): route who_can_access and what_can_target_access through FGA cache#767
orius123 wants to merge 2 commits intomainfrom
feat/authz-cache-url

Conversation

@orius123
Copy link
Member

Related Issues

https://github.com/descope/etc/issues/13966

Description

Pass fga_cache_url to the Authz module and set base_url on HTTP requests for who_can_access and what_can_target_access, matching the existing FGA cache routing pattern. When fga_cache_url is configured, these calls route through the cache proxy; when empty, behavior is unchanged.

Must

  • Tests
  • Documentation (if applicable)

…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.
Copilot AI review requested due to automatic review settings February 19, 2026 11:26
@orius123 orius123 requested a review from yosiharan February 19, 2026 11:27
@orius123 orius123 enabled auto-merge (squash) February 19, 2026 11:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_url parameter support to the Authz class constructor
  • Routed who_can_access and what_can_target_access HTTP 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.

@github-actions
Copy link

Coverage report

The coverage rate went from 98.36% to 98.36% ⬆️

100% of new lines are covered.

Diff Coverage details (click to unfold)

descope/mgmt.py

100% of new lines are covered (100% of the complete file).

descope/management/authz.py

100% of new lines are covered (100% of the complete file).

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.

1 participant