You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
The client follows HTTP redirects returned by the OpenFGA server address, and there is no configuration option to turn this off. An authorization client should usually not follow a redirect from its OpenFGA endpoint: a misconfigured proxy or a compromised network hop can send authorization requests (including the API token) to another host.
Today the only way to stop it is to replace an internal object (OpenFgaClient._api_client / its REST client) with a subclass, which depends on private names and can break on any upgrade.
Request
One of:
A configuration option, e.g. ClientConfiguration(follow_redirects=False), applied to both the sync and async clients; or
A supported way to pass our own HTTP session / transport, so callers can set redirect behaviour themselves.
With redirects disabled, a 3xx answer would be surfaced as an error (for example an ApiException with the status code) instead of being followed.
Workaround we use
Subclassing the internal REST client to set allow_redirects=False, plus a regression test that fails if the internal attribute changes.
Activity