Prerequisites
- A Backstage instance CloudThinker can reach over
https. For one behind a firewall, see Reaching private services. - Access to your Backstage app configuration and permission to restart Backstage.
- The Admin role in the CloudThinker workspace, which you need to add connections. See Roles.
A workspace holds one Backstage connection. CloudThinker accepts an
http address only on a self-hosted deployment.Setup
1
Generate a token
The token can be any string without whitespace that is long enough not to be guessed. One way to make one:Keep it in a secret manager or an environment variable, and use it only for CloudThinker so you can revoke it on its own.
2
Add it to your Backstage configuration
Add a Set
static entry under backend.auth.externalAccess, restricted to the catalog plugin:CLOUDTHINKER_TOKEN in the Backstage backend’s environment, for example from a Kubernetes secret, before you restart.subject names the caller in Backstage’s logs. plugin: catalog rejects calls to any other plugin. Without accessRestrictions, the token reaches every plugin you run. See Backstage’s service-to-service auth guide for the full options.3
Restart Backstage
Backstage reads external access tokens at startup, so the token works only after a restart. Then test the token and find the URL to enter:If the frontend and backend run on different hosts or ports, such as
:7007, try the backend address. The address that returns JSON, without /api/..., is your Backstage URL.4
Add the connection in CloudThinker
Open More → Workspace settings → Connections, select Backstage, and enter:
- Backstage URL: the backend root, such as
https://backstage.example.com - Service token: the token you generated
Enter the root only. Don’t add
/api/catalog, any other path, a query string, a fragment, or credentials. CloudThinker adds the catalog path itself and rejects a URL that carries anything else. It also doesn’t follow redirects, so use the address Backstage answers on directly.Connection details
Required permissions
Withplugin: catalog, the token can read the whole catalog and also register and remove locations. On a default Backstage instance, only CloudThinker’s approval stops those writes, unless you turn on Backstage’s permissions framework.
Agents need catalog read access for everything except location changes. Registering, updating, or removing a location also needs catalog create, update, and delete access on locations.
Agent capabilities
Answers are bounded, so agents say “returned 15” rather than “15 exist”. For a large catalog, ask about one named entity, which reads that entity’s full context. A missing owner means nobody filled in that field in Backstage, not that the service has no owner, and agents report it that way.
Verify the connection
Example prompts
Location changes
Agents can’t create, edit, or delete catalog entities. Entities come from the locations Backstage ingests, so you edit them at the source. The one write this connection makes is to a location, and each one goes through Approvals. Every change an agent makes goes through your workspace’s Approvals first. On the default Auto · Rules + AI · Ask me mode, AI judgment can let a safe change run without asking — and an Allow Rule can too, once CloudThinker turns on Rule enforcement for your workspace. Choose Manual to approve every change yourself. To be asked about every location change, choose Manual, or turn off Allow writes on the connection’s detail panel to block them outright. Once CloudThinker turns on Rule enforcement for your workspace, an Ask first Rule can cover the Backstage connection on its own. Before it requests approval, the agent states the action, the location ID or target URL, and the URL prefix it treats as yours, such ashttps://github.com/acme/catalog/. There’s no setting for this prefix: the agent takes it from your request, so name it in your prompt and check it in the approval. Two rules limit what an approval can do:
- The new target must be an
httpsURL under the approved prefix. Anything else is refused before a request is sent. - Updating or removing a location first reads its current target and checks it’s under the same prefix, so an approval can’t touch another team’s location.
Troubleshooting
Failed to connect to Backstage
Failed to connect to Backstage
CloudThinker shows this one message for every connection failure. Check in this order:
- The URL is the backend root and doesn’t redirect.
- The token is in
backend.auth.externalAccess, matches exactly, and Backstage was restarted after you added it. accessRestrictionsincludesplugin: catalog.- Backstage is reachable from CloudThinker.
Invalid Backstage URL, or Invalid Backstage connection configuration
Invalid Backstage URL, or Invalid Backstage connection configuration
The URL has a path, query, fragment, or credentials, or the token is empty or contains a line break. Enter the plain root and paste the token as one line with no quotes.
Backstage URL must use HTTPS outside local development
Backstage URL must use HTTPS outside local development
The URL starts with
http://. Despite the wording, http is also accepted on a self-hosted deployment of CloudThinker. On CloudThinker Cloud, serve Backstage over https.The agent reports fewer entities than Backstage shows
The agent reports fewer entities than Backstage shows
An overview reads at most 50 entities. Ask about one named entity instead of the whole catalog.
An agent says it can't edit a catalog entity
An agent says it can't edit a catalog entity
That’s expected, and no permission changes it. Edit the entity’s YAML at its source. An agent can register, repoint, or remove the location for you, through your Approvals.
Updating a location fails
Updating a location fails
Your Backstage release can’t update a catalog location in place. Ask the agent to remove the location and register the new target instead.
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Restrict the token to the catalog: one
plugin: catalogline keeps it from reaching every other plugin you run. - Rotate by replacing the entry: a static token never expires on its own. Replace it in your Backstage configuration and restart. A workspace holds one Backstage connection, so there’s no pencil icon to edit it. Open More → Workspace settings → Connections, select Backstage, click Disconnect, then connect again with the new Service token. Discovery runs again and Allow writes goes back to on. See Rotate a credential.
Related
Approvals
Decide which location changes run, wait for a person, or are refused.
Connections
See every service you can connect and how connection status works.