Skip to main content

Platform environment

Apps never configure the platform. vastframe injects what they need as environment variables, request headers and endpoints on the app's own origin.

Environment variables​

VariableInValue
PORTcontainer servicesThe port to listen on (8080 by default)
DATABASE_URLcontainer services, jobsPostgres connection to the project database as its service role (bypasses row-level security)
TC_PROJECTallThe project name
TC_DEPLOYMENTallThe deployment id
TC_PROJECT_URLallThe production URL
TC_PROJECT_OWNER_EMAILallThe owner's email
TC_BASE_PATHweb, apiThe base path the app is served under (/)
TC_JWKS_URLallWhere to fetch the keys that sign X-TC-User
TC_POSTGREST_URLallThe project's Data API, for server-side SDK calls
TC_GATEWAY_URLallThe Integration Gateway, for server-side SDK calls
TC_STORAGE_URLallThe storage service, for server-side SDK calls
TC_ENV_PUBLICallComma-separated names of your non-secret variables
TC_SERVICEcron, workerThe service name from tc.json
TC_RUN_IDcronThe run number
TC_PROJECT_TOKENcron, workerThe project's identity token for the gateway and storage

Names starting with TC_, and DATABASE_URL, PORT, HOSTNAME, PATH, HOME and NODE_OPTIONS, are reserved: you can't set them yourself.

The X-TC-User header​

Every request the Edge forwards to your app carries X-TC-User, a signed JWT describing the signed-in person:

ClaimMeaning
oidThe person's stable id
name, emailDisplay name and email
department, job_titleFrom the directory
groups, group_idsGroup names and ids
rolesThe person's app roles in this project
project, deploymentWhere the request is going
tidThe organization (tenant) the token was issued in
audtc:app:<project>
isstc-hub

The token is ES256-signed and valid for 5 minutes. The Edge removes any X-TC-User header a client sends, so the value always comes from the platform. Verify it with the SDK (tc.auth.user(req)) or against the keys at $TC_JWKS_URL, which are also published on every app origin at /_tc/auth/jwks.json. Details: Access & security.

Same-origin endpoints​

Everything under /_tc/ on your app's origin belongs to the platform and is only reachable after sign-in and the access check:

PathWhat it is
/_tc/auth/meThe signed-in person as JSON
/_tc/auth/logoutSigns out of every app
/_tc/auth/jwks.jsonPublic keys for verifying X-TC-User
/_tc/db/*The project's Data API
/_tc/storage/*The project's storage
/_tc/int/<integration>/*The Integration Gateway

Because these live on the app's origin, browser code needs no CORS setup, no URLs and no keys. Don't serve your own routes under /_tc/.

Was this page helpful?