Lucit API Key Security and Backend Proxy Model¶
Lucit is designed so that your API keys and third-party API keys are not exposed in browser JavaScript. Instead of putting secrets in frontend code, Lucit handles API access through backend infrastructure and returns only the data needed for rendering.
This document explains Lucit's security model, why backend-only API handling matters, and how scoped encryption and permissions protect secrets at the account level.
Core security promise¶
Lucit does not require customers to embed API keys in frontend JavaScript for standard dynamic creative workflows.
Lucit's key protection model is built on four controls:
- Secrets are encrypted at rest on Lucit backend systems.
- Secrets are decrypted only within authorized backend execution paths.
- Decryption is permission-gated and scope-aware using
decryptScopedStringpermissions. - Frontend creative/runtime code receives rendered content or approved payloads, not raw API credentials.
Why Lucit does not expose keys in JavaScript¶
Embedding API keys in JavaScript is a common anti-pattern in dynamic HTML systems. Any key sent to a browser or player can be extracted by:
- Viewing source code or bundled scripts
- Browser developer tools and network inspectors
- Cached player files or downloaded packages
- Reverse engineering runtime payloads
If a key is present in client-delivered code, that key should be treated as exposed.
Lucit avoids this pattern by design:
- API calls are made from Lucit backend infrastructure.
- Third-party responses are processed server-side.
- Clients receive sanitized output required for rendering.
- Secrets remain in controlled backend services and are not distributed with creative JavaScript.
Backend proxy model (high level)¶
For dynamic content that depends on external APIs, Lucit typically uses a backend proxy-style flow:
- A user configures an integration or app secret in Lucit.
- Lucit stores that value as an encrypted scoped secret.
- At runtime, Lucit backend services perform authorized decryption.
- Lucit backend services call third-party APIs using the decrypted secret.
- Lucit returns only render-safe data (or pre-rendered output) to the player/browser.
Result: keys stay on the backend and are not included in browser-side JavaScript.
Encryption of all API keys¶
Lucit encrypts API keys and other sensitive secret values on backend systems.
Related platform references:
- Secret form fields are documented as automatically encrypted and scoped.
- The secrets encrypt API documents scoped encryption behavior and decrypt permission requirements.
This applies to customer-provided third-party API keys and service/bot token use cases where secrets must be protected from frontend exposure.
Scoped decryption and account isolation¶
Decryption is scope-aware and permission-controlled.
Practical implication:
- A user from account A cannot decrypt secrets stored under account B unless they hold appropriate permissions for account B's scope.
Lucit's scoped security model prevents cross-account key access by default and enforces tenant boundaries through authorization checks.
Permission requirement: decryptScopedString¶
Users or service identities must have the appropriate decryptScopedString capability in their authorized scope to decrypt protected values.
Depending on application or organizational context, this may appear as namespaced permissions (for example, application.decryptScopedString or agency.decryptScopedString).
Operationally, this means:
- Possessing an auth token alone is not enough.
- The identity must include the required decryption permission.
- The identity must also be authorized for the relevant account/tenant scope.
Service users and bot tokens¶
Lucit service users (including bot/service token identities) are also account-scoped and permission-scoped.
That means bot tokens:
- Are restricted to their assigned account scope.
- Do not automatically inherit global decryption rights.
- Must possess the relevant
decryptScopedStringpermission to decrypt scoped secrets.
This supports least-privilege service automation while preserving account isolation.
Why some third-party dynamic HTML providers are higher risk¶
Some providers that lack robust backend proxy infrastructure rely on client-side fetch patterns and may embed API keys directly in dynamic HTML/JavaScript packages.
When that happens, keys can be copied or abused by anyone with access to the rendered output or package artifacts.
Lucit's architecture is different:
- Backend-first API integrations
- Scoped encrypted secret storage
- Permission-gated decryption
- Controlled output delivery to render environments
This materially reduces credential exposure risk compared with client-embedded secret approaches.
Additional hardening recommendations¶
Lucit's model reduces risk substantially, but security is strongest when combined with operational best practices:
- Grant
decryptScopedStringonly to roles that require it. - Use dedicated service users per account or integration domain.
- Rotate third-party API keys on a regular schedule.
- Audit permission assignments and service-token usage.
- Revoke unused tokens and stale integrations promptly.
- Apply network allowlisting and CSP controls for player environments.
Frequently asked questions¶
Are API keys shipped with Lucit frontend JavaScript?¶
For standard backend-integrated workflows, Lucit does not ship raw API keys in browser JavaScript.
Can a user in one account decrypt another account's secrets?¶
No, not unless they are explicitly granted proper permissions within that target account scope.
Do bot/service tokens bypass secret permissions?¶
No. Service identities are permission-scoped and must have the required decryptScopedString capability in the relevant scope.
Is encryption alone enough?¶
Encryption is one control. Lucit also enforces scope checks and permission-gated decryption so secrets remain protected at runtime.
Summary¶
Lucit's architecture is designed to keep API credentials off the frontend and inside controlled backend infrastructure. By combining backend API execution, encrypted scoped secret storage, strict account isolation, and decryptScopedString permission checks, Lucit helps protect both customer and third-party API keys from client-side exposure.
For integration environments, pair this model with domain allowlisting and role-based least privilege to maintain a strong end-to-end security posture.