Serve FINOS Workspace over HTTPS and set the addresses
A deployment of FINOS Workspace has three services that browsers talk to: the web app, the FINOS Workspace API and the agent. A browser reaches them over HTTPS, they have to know each other's addresses, and the API has to know which web app may call it. This guide describes what the platform must provide and which settings carry the addresses, so that sign-in, file links and the Agent work. The local stack of the repository is a trial and does none of this: it uses plain HTTP on localhost.
What the platform provides
- TLS. A load balancer, an ingress or a reverse proxy ends TLS in front of the three services. The services speak plain HTTP behind it: the web app's container listens on port 8080, the API on port 8000 and the agent on port 7777.
- One site. The API's session cookie carries the attributes
Secure,HttpOnlyandSameSite=Strict, so the browser sends it only over HTTPS, withlocalhostas the one exception, and only when the API is on the same site as the page. Put the web app and the API under one registrable domain, for exampleworkspace.example.comandapi.workspace.example.com. Two unrelated domains cannot work, because the browser withholds the cookie. - Health checks. The paths
/healthand/healthzof the API answer without any other check. Every other request has to carry an allowed origin, as the next section describes.
Tell each service its own address
Set these in the environment of the API:
APPURLis the web app's address, such ashttps://workspace.example.com. The API uses it for sign-in redirects and for the links that an administrator hands to a person to set a password.SELFURLis the address at which clients reach the API, such ashttps://api.workspace.example.com. It forms the links to uploaded files, and an address that starts withhttps://tells the API that the deployment uses HTTPS, so that the FINOS Workspace MCP server hands out onlyhttps://addresses.FRONTENDURLis required but the API does not read it. Set it to the web app's address as well.
Set these in the environment of the web app's container, which writes them into the page's configuration each time that it starts:
BACKEND_URLis the API's public address, the same value asSELFURL.AI_API_URLis the agent's public address.
Set these in the environment of the agent and of its MCP server, which call the API as the web app does:
WORKSPACE_API_URLis the address that the agent uses to reach the API from inside the deployment. It need not be public, and it is usually the address of the API's service.WORKSPACE_PUBLIC_URLis the API's public address, the one that appears in the links to uploaded files. The agent rewrites such a link toWORKSPACE_API_URLbefore it fetches the file.WORKSPACE_ORIGINis the web app's origin, without a path, such ashttps://workspace.example.com.
Allow the web app to call the API and the agent
The API accepts a request only when it carries an Origin header that the deployment allows. The check covers every HTTP request and every WebSocket, and a request from another origin gets the status 403 and the text "Requests must come from an allowed origin". BACKEND_CORS_ORIGINS lists the allowed origins, written exactly as browsers send them, with the scheme, the host and the port and without a path or *. It is a comma-separated list or a JSON list, and the API does not start without it. BACKEND_CORS_ORIGIN_REGEX lets a pattern match a whole origin instead of listing each one, and it applies to the CORS headers and to the origin check alike. The API accepts the session cookie only from these origins.
The agent keeps its own list. AGENT_CORS_ORIGINS names the origins of the web app that may call the agent from a browser, as a comma-separated list. It allows every origin when it is *, and the agent refuses to start with users and no origins at all. The agent and its MCP server call the API too, and each call carries WORKSPACE_ORIGIN as its origin, so that origin must be one that BACKEND_CORS_ORIGINS allows.
Reach the data backends and the registered agents from the API
The API makes every call to a data backend and to an agent that is registered under AI Library, queries and tool round trips included. A data backend therefore needs no CORS settings for the web app, and the browser holds none of its credentials. What the backend needs instead is an address that the API can reach from the deployment's network: a public https address for every user's connection, or any address for a connection that a superuser keeps. A backend on a developer's machine cannot take part in a deployment; you develop it against the local stack of the repository instead, as Run the stack from source describes.
Set the addresses of the Compose stack
The stack that docker-compose.yml at the root of the repository starts takes the addresses from three variables of its own. A deployment sets the settings above directly on its services and does not use them. Set the variables in your shell or in a .env file next to the compose file, then run docker compose up -d, which recreates the containers that changed.
API_URLis the API's address as the browser sees it,http://localhost:8000by default. It becomesBACKEND_URLof the web container andWORKSPACE_PUBLIC_URLof the agent and its MCP server, so setSELFURLinbackend-api/backend/envs/.envto the same address.AI_API_URLis the agent's address as the browser sees it,http://localhost:7777by default. It becomesAI_API_URLof the web container.WEB_URLis the web app's address as the browser sees it. It becomesWORKSPACE_ORIGINof the agent and its MCP server, which ishttp://localhost:3000whileWEB_URLis unset, and it becomesAGENT_CORS_ORIGINSof the agent, which is*while it is unset.
The browser calls the agent directly, so the origin that the agent allows has to be the address on which you opened the web app: localhost, 127.0.0.1, the address of your machine on the network or a tunnel. A machine cannot know which of them you will use, which is why WEB_URL has no default. An origin that the agent does not allow gives an Agent that fails with nothing in the interface to say why. The API has to allow the origin as well, so list it in BACKEND_CORS_ORIGINS in envs/.env, as the section before this one describes.
Check it
- Open the web app's address in a browser. It loads without a certificate warning.
- Sign in. The sign-in works when the cookie is accepted, and a sign-in that seems to work but leaves you on the sign-in page often points to an API that is not on the same site as the web app.
- Open the browser's network tool and check that calls go to the API's address and the agent's address, and that none is refused with 403.
- Upload a file to a dashboard and open it. A link that points at the wrong address means that
SELFURLorWORKSPACE_PUBLIC_URLis wrong. - Ask the Agent a question. An Agent that fails with nothing in the interface to say why usually means that
AGENT_CORS_ORIGINSdoes not allow the origin that you opened the web app on.
Web app configuration, Backend settings and Agent and MCP server list every setting with its description.