Introducing Render Sandboxes: a computer for every agent.

Learn more

What a read-only Render API key can still see

Why "Read only" is broader than it sounds

You plan to give an incident, debugging or monitoring agent a Render API key for your production workspace. A preset named Read only sounds like the safe choice.

It's safe only if that agent is allowed to see production secrets. The Read only preset blocks changes to production, but it doesn't stop the agent from reading what production stores. Those include environment variables, secret files and database credentials.

The API keys docs define the preset in one line: "Grants Read access to every applicable resource." That covers every row in the permission table that has a Read level, not only operational data such as metrics or deploy status. To judge the preset, look at the rows it sets to Read and ask whether you'd paste that data into the agent's context yourself.

This guide shows which rows expose secrets at Read, what a read-only grant still stops, and how to build a narrower diagnosis key for production.

Before you start, make sure you have:

  • A production Render workspace that you manage.
  • Access to create API keys for that workspace.
  • A clear list of what the agent must diagnose, such as metrics, deploy status or service settings.

What a Read only key can see

Environment variables often hold secret credentials, such as API keys and database connection strings, that you keep out of source code. Secret files are plaintext files that your service reads from its file system at runtime. The permission table includes view rows for these values, and the preset grants several of them at Read:

Resource
Docs row
What an agent can see at Read
Postgres credentials and connection details
"View connection strings and credentials"
Connection strings and credentials
Workflows
"View workflow environment variables and secret files"
Workflow environment variable values and secret file contents
Services
"View environment variables and secret files"
Environment variable values and secret file contents
Sandboxes
"View execution history and credential settings"
Execution history and credential settings
Environment groups
"View environment group variable and secret file values"
Environment group variable values and secret file contents
Key Value connection details
"View connection URLs and credentials"
Key Value connection URLs and credentials
Postgres exports and backups
"View and download exports and backups"
Database exports and backups, which expose database contents rather than credentials

In practice, a Read only key can read environment variable values, secret files, environment group variable values, Postgres connection strings and credentials, Key Value credentials, and Postgres exports and backups. Treat any agent that holds it as a party with access to production secrets. That includes its context window, its transcripts and any tool it forwards output to.

What a Read only key blocks

In the permission table, "Trigger and cancel deploys" under Run deployments isn't available at Read and requires the Run level. Read rows also don't let a key change environment variables or create, update or delete services.

Read only does keep an agent from changing production. The risk it leaves open is exposure.

Decide whether the preset fits your agent

Ask one question: may this agent see production secrets?

  • Yes. The Read only preset can work. You accept that credentials can appear in the agent's output and logs.
  • No. Build a narrower diagnosis key, as described in the next section.

Most incident and monitoring agents need metrics, deploy history and service settings. They rarely need the value of a database password to diagnose an outage.

Build a narrower diagnosis key

  1. In the API key creation form, select the production workspace as the workspace your key can access, as covered in the next section.
  2. Click Clear all, which removes all permissions from the key.
  3. Grant the Read level only on the rows the diagnosis task needs: under Monitoring, "View service events" and "View service metrics"; under Services, "View services and their configuration"; and under Deploys, "View deploys, their status, and history".
  4. Leave every secret-exposing row from the earlier table ungranted.
Grant at Read
Leave off (the Read only preset grants each of these at Read)
"View service metrics" and "View service events"
"View connection strings and credentials"
"View services and their configuration"
"View workflow environment variables and secret files"
"View deploys, their status, and history"
"View environment variables and secret files" and "View execution history and credential settings"
"View environment group variable and secret file values"
Key Value "View connection URLs and credentials"
Postgres "View and download exports and backups"

Name each key for its job and its workspace, for example "prod-incident-agent-diagnosis." After each incident, revisit the grants and remove any read the agent never used.

For the full permission model for coding agents, see Giving a coding agent production access safely on Render.

Scope the key to the production workspace

A scoped API key reaches only the workspace you created it in. A key you create in a staging or personal workspace won't reach production, so select the production workspace in the key creation form (Account Settings → Create API key). Before you hand the key over, check which workspace it belongs to.

If the agent connects through MCP

The Render MCP server can authenticate with an API key. Every new API key is scoped to one workspace, so an MCP server authenticated with that key reaches only that workspace. The official Render plugins for Claude Code, Codex and Cursor set up the MCP server with OAuth, not an API key. The diagnosis key in this guide applies only when you use the docs' API-key setup and pass that key to the MCP server.

This guide doesn't map individual MCP tools to the permissions they need. Start narrow and add a Read row only when the agent reports that it lacks access for a specific task.

Pitfalls to watch for

  • Accepting the preset as is. You can spot this mistake when the agent's output quotes a connection string or variable value.
  • Creating the key in the wrong workspace. You can spot this when the agent reports that it can't find the production services you expected.
  • Assuming "read only" means "no secrets." The preset name describes what the key can't change, not what it can't see.
  • Reusing one key across agents with different trust levels. Give each agent its own key so you can narrow or revoke one without affecting the others.

The diagnosis key above leaves out the Monitoring row "View service logs". Incident agents usually want logs, but this guide can't tell what your services write to them. Grant "View service logs" only after you've checked that your services don't write secrets to their logs.

Frequently asked questions