Contentful management api secure proxy retool
Retool CMS consoles with CMA keys off-browser
Contentful CMA writes from Retool via edge with scoped tokens. For "contentful management api secure proxy retool", store CONTENTFUL_MANAGEMENT_TOKEN in Secret Vault, call https://api.contentful.com/spaces/{{query.spaceId}}/entries from a Worker, and let Retool hit only https://realcomposer.com/v1/workspace/contentful-cma-proxy-retool with an rc_live_ client token.
Why Retool leaks Contentful credentials
Attackers routinely extract Contentful secrets from Retool builds. Direct browser calls also expose internal error payloads with hostnames.
- Production Contentful keys copied from Retool bundles
- Compliance violations after credential leaks
- Attackers replaying vault-grade scopes from a laptop
How RealComposer Solves This at the Edge
Bind vault keys to the Worker
Add CONTENTFUL_MANAGEMENT_TOKEN to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.
Configure upstream steps and output mapping
Use GET against https://api.contentful.com/spaces/{{query.spaceId}}/entries. Allowed origins on the client token should match leave cache ttl at 0 when each response is user-specific (include userid or record id in query params before enabling cache).
Query from Retool
Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.
// REST resource or JS query
const rows = await fetch('https://realcomposer.com/v1/workspace/contentful-cma-proxy-retool', {
headers: { Authorization: 'Bearer rc_live_token' }
}).then(r => r.json());
{
"requestId": "req_contentf",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "contentful-cma-proxy-retool"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"entryId": "sample",
"title": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 2
- Payload
- 246 B to 37 B (-85%)
curl -X GET "https://realcomposer.com/v1/workspace/contentful-cma-proxy-retool" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Can Retool call Contentful without holding the production key?
Point Retool at /recipes/contentful-cma-proxy-retool edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins.
Does POST traffic get cached?
contentful-cma-proxy-retool keeps cache TTL at 0 because it uses POST upstream calls or per-user responses. Add ids to query strings before enabling GET cache.
What happens if an upstream step times out?
Allowed origins on the contentful-cma-proxy-retool client token restrict which domains may call the edge URL.
Sources & Definitions Used in This Answer
Deploy this Retool + Contentful Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.