RealComposer
Client PlatformsOfficial ToolJet docs

ToolJet Safe & Unsafe Practices

Direct Answer

ToolJet data sources store credentials on the ToolJet server, and secret workspace constants resolve server-side in queries. RunJS queries, component properties, and variables run in the browser, so any key placed there is visible to every app user.

Credentials & Where They Belong

Server only
Data source credentials

Stored and applied by the ToolJet server when queries run.

Server only
Secret workspace constants

Usable in data sources and queries, not in components.

Client safe
Values in RunJS queries or variables

Executed in the browser. Never use for secrets.

Safe Practices

  • Configure auth on the REST API data source

    Headers and tokens set on the data source are applied server-side and never reach the browser.

  • Reference secrets through secret constants

    Secret constants are masked in the editor and resolved on the server at query time.

  • Restrict who can open and edit each app

    Use group permissions so only intended users can run write queries.

Unsafe Practices

  • Calling third-party APIs from RunJS with a key

    RunJS runs in the browser, so the key appears in source and network traffic.

  • Making an app public that uses privileged data sources

    Anyone with the link can trigger queries that run with your stored credentials.

The RealComposer Pattern

Add a RealComposer pipeline as a REST API data source with the client token in the data source headers, so ToolJet apps receive merged, slimmed JSON without holding upstream secrets.

START BUILDING FREE

Frequently Asked Questions

Q:Can ToolJet users see data source credentials?

No. Credentials stay on the ToolJet server. Code in RunJS queries and variables is visible in the browser.

Security & Secret Vault

Call Stripe API from ToolJet Securely

Do not call Stripe from a ToolJet RunJS query, because RunJS executes in the browser and exposes the secret key. Add a RealComposer pipeline as a REST API data source instead. The edge injects STRIPE_SECRET_KEY from the vault and returns a compact customer and subscription object for your tables.

Sub-10ms edgeView Recipe
Platforms & Frameworks

Fix CORS Errors in ToolJet REST API Calls

ToolJet CORS errors appear when a RunJS query or browser-side fetch hits an API that does not return Access-Control-Allow-Origin for your ToolJet domain. Route the call through a RealComposer pipeline: it handles the OPTIONS preflight, adds the right headers, and injects any upstream auth from the vault.

Sub-10ms edgeView Recipe

Related Concepts