Skip to main content
The proxy alllowing to forward requests from Atoti Server to another server. A request made to f"{session.url}/proxy/some/path?foo=bar" will be proxied to f"{session.proxy.url}/some/path?foo=bar": The new request will have an Authorization HTTP header containing a JWT. This JWT contains the following claims:
  • sub: The name of the user making the request to the proxy.
  • authorities: The list of roles of the user.
This JWT is signed by Atoti Server, except when using the community edition.
For maximal flexibility, f"{session.url}/proxy" does not require authentication. It is the responsibility of the server based at url to handle authentication and authorization if needed.
Using a custom JWT key pair to be able to verify JWT signatures in the local server below:
Starting a secured session:
The proxy is disabled by default:
Starting a local server:
The server above is implemented in Python but the proxy target can be any HTTP server or even a lambda function in the cloud. Configuring the proxy to forward requests to the local server:
Calling the proxy without authentication:
Without authentication, ROLE_USER is missing and thus atoti.Session.connect() will raise an error:
Adding a user to the session and calling the proxy as this user:
ROLE_USER is present so atoti.Session.connect() and the access to atoti.Session.user will both succeed:
Trying an unsupported mode:
Trying an unhandled path:
Request and response bodies are not limited to strings:
Disabling the proxy:
On a session without security, atoti.Session.connect() always succeeds, even for anonymous calls:
See atoti.Session.user for an explanation of the roles above. Stopping the local server: