API Key Scopes
An API key authenticates a program — CI, a script, Terraform — against the Frostmoln API. Flat scopes on keys are retired (retire-scopes, 2026-10-21): a key's grant is its access policies. Frostmoln keys are least-privilege, so a key does nothing until a policy attached to it says what it may do.
Scopes are retired
A key can no longer carry scopes: any create or update that sends a non-empty scopes set is refused with 400 API_KEY_SCOPES_RETIRED, and older tooling that still tries to set --scopes / scopes fails with that code carrying the migration — the fm CLI now refuses --scopes client-side, and the Terraform provider deprecates the attribute. Creating a key without scopes is the lane: the create succeeds, and the key answers nothing until you attach an access policy — a policy names individual resources and operations, can add conditions such as a source-IP range, and can deny explicitly. A created key is therefore inert rather than accidentally wide.
Migrating an existing key
Keys issued before the retirement keep their stored scopes and keep validating with them until you migrate them. Migrate per key, in this order:
- Attach a policy carrying the same operations, derived from the scope vocabulary the key already speaks —
compute:readstands for the compute read/list operations; letfm iam catalog(or the portal's catalog picker) name the exact set, and the IAM overview's Migrating from scopes maps any legacy scope onto operations. While the old scopes stand, scope and policy evaluation is additive, so attaching first can take nothing away. Attach the policy in the portal under Settings → Access Policies, withfm iam policy attach <policy-id> --type api_key --id <key-id>, or in Terraform withfrostmoln_iam_policyplusfrostmoln_iam_policy_attachment. - Verify the key still answers. Re-run what the key does — its CI job, the script, a
terraform plan— and confirm the calls go through. - Clear the stored scopes — a POST/PATCH update whose body carries
"scopes": []. The empty list is the clear arm; a scope field merely omitted is read as "unchanged", so stored scopes persist until the explicit clear. In Terraform, setscopes = []once with the attachment in place, then leave the attribute out of the configuration.fmis deliberately out of this step: the client has no command that updates a key, and--scopesanswers only with the migration, so grant the replacement policy in the portal under Settings → Access Policies (orfm iam policy attach, above) and clear the scopes yourself — the"scopes": []update above, or Terraform'sscopes = [].
What still works
- The catalog stays.
fm account api-key scopes(and thefrostmoln_api_key_scopesdata source) still serve the<service>:<action>vocabulary, andfm iam catalogserves the finerservice:resource:actionoperations a policy names. Both are authoring material now — nothing reads them off a key any more. - Existing keys keep validating until migrated. A pre-retirement scope evaluates as its equivalent synthesized
allow(see the IAM overview's Migrating from scopes), side by side with any attached policies — an explicit deny wins. Nothing changes until you clear the scopes yourself.
The list is served by the platform
The catalog lives in the platform, so it always matches the vocabulary the platform accepts — there is no fixed list to copy out of this page. It is authoring material now; read it where you work:
| Where | How |
|---|---|
| CLI | fm account api-key scopes (add -o json to script it). |
| Terraform | The frostmoln_api_key_scopes data source — terraform console, then data.frostmoln_api_key_scopes.all.scopes. |
The portal's Settings → API Keys → Create API Key no longer lists a Permissions picker — with scopes retired it shows a policy-attachment hint instead. The finer service:resource:action operations a policy names have their own catalog: fm iam catalog.
What a scope looks like
A scope is <service>:<action>:
compute:read read compute resources
compute:write create, change and delete them
storage:read read volumes and buckets
billing:read read invoices and usageFor almost every service, read and write are the two actions the API enforces (the interactive-session scopes are a separate class — see below). write covers every mutation — create, update, delete, and actions such as start/stop/restart. There is no separate "create but not delete" scope: that distinction is exactly what an access policy adds.
The finer forms were never enforced as key scopes
The catalog also lists three-part entries such as compute:instances:read, and pre-retirement key creation accepted them. They were never enforced as key scopes — a key holding only compute:instances:read was created successfully and then denied on every compute request, with a 403 that did not explain why. They belong to the access policy engine — and with scopes retired they are precisely what a policy names: precise service:resource:action operations such as compute:instances:read.
The same applies to most of the other verbs the catalog carries (action, create, update, delete, list): granted as key scopes they did nothing; named in a policy they mean exactly what they say.
The interactive-session scopes are a class of their own. sessions:forward, sessions:pty and sessions:write are real strings in the catalog, because a session is its own privilege rather than an operation on the resource it reaches. Nothing else stands in for them: compute:action is not the operation that opens a shell on an instance, and kubernetes:* is not the one that opens the cluster-API proxy. A key that runs fm forward, fm database <type> console, fm shell or fm kubernetes cluster proxy needs a policy carrying the matching sessions:* operations.
Wildcards
The wildcard question closed with the scopes themselves. An API key refuses any non-empty scopes list with API_KEY_SCOPES_RETIRED, wildcard or not, and a Workload Identity binding refuses the whole mechanism outright (BINDING_SCOPES_RETIRED). The wildcard judgement lives on where the vocabulary lives on — in access policy operations, whose wildcards collapse per segment:
compute:instances:*— every action on compute instancescompute:*— every compute operation, now and in future*:*:delete— every delete, across every service
compute:* really is a grant of everything that service offers. Prefer naming the operations, or scope a pattern to one resource type with FRN targets — the full semantics are on the IAM overview's Operations.
Rules worth knowing
- Only an empty scope list goes through. Every create or update that sends an API key a non-empty
scopeslist is refused with400 API_KEY_SCOPES_RETIRED— the code carries the migration. A create without scopes is the lane, and"scopes": []is the clear arm; a scope field merely omitted is read as "unchanged". The pre-retirement create-time refusals are unreachable behind the wall —SCOPES_REQUIRED,INVALID_SCOPES,WILDCARD_SCOPE_NOT_ALLOWEDandSCOPE_EXCEEDS_PERMISSIONS(below) cannot fire while the API never inspects a list it refuses wholesale. Stored scopes on keys issued before the retirement keep enforcing until you clear them. - A key is granted below its creator. Pre-retirement, scopes were capped at the permissions of the identity creating the key: asking for more failed with
SCOPE_EXCEEDS_PERMISSIONS. Behind the wall there is no scope request to cap — a new key starts with exactly nothing, and its grant arrives with an attached policy, whose document is capped at its author's own permissions too. If your permissions are reduced later, what you issued keeps the ground it covered: revoke the key or edit the policy — issued grants do not follow you down. - Organization control needs a signed-in person, not a key. Deleting an organization, changing a member's role, removing a member, leaving an organization and transferring ownership are refused for every API key, whatever the key is scoped to — even
*. A key holdingorganizations:writegetsUSER_SESSION_REQUIRED; a key without it getsinsufficient_scopefirst. Do these in the portal while signed in. Leaving is not in the portal yet, so ask an admin or the owner to remove you (an admin must ask the owner); an owner must transfer ownership first and then ask the new owner. Other organization changes, such as inviting members, needorganizations:writeon the key as well as an organization role that allows them. - A key reaches one organization: the one that owns its tenant. Even if you belong to several organizations, a key created in a tenant of one of them cannot read or change another. Listing organizations with the key shows only that one, and any other organization is refused with
ORGANIZATION_ACCESS_DENIED. Create a key in a tenant of each organization you automate. - Most
fm tenantcommands needorganizations:read. Listing tenants, switching withfm tenant useand reading default tags withfm tenant default-tags getneedorganizations:read. Creating or renaming a tenant, or changing its default tags, needsorganizations:write, and creating one without--organizationalso needsorganizations:read.fm tenant currentneeds neither. An existing key's stored scopes can no longer be narrowed or swapped — the only accepted change is the clear (Scopes are retired, above) — but the grant is not frozen with them: attach a policy covering what the work needs, verify, then clear. Switching which key the CLI uses stays what it was:fm auth api-key set; retire the old key withfm account api-key revoke. - Quota change requests need
quotas:write. Submitting or cancelling a request withfm tenant quota requestneeds the quota write grant, and listing requests the quota read grant — spoken, as ever, in thequotas:read/quotas:writevocabulary, now in the key's policy rather than on the key.compute:writeandcompute:*never granted it: an approved tenant raise lifts a spending ceiling, which is a different grant from creating resources. Keys issued before the retirement that carryquotas:writekeep it until migrated; a key without it gets the grant through its attached policy. Reading the quotas themselves (fm tenant quota, thefrostmoln_tenant_quotasdata source) needs neither.
Choosing grants
Start from the job the key does, not the service it talks to — that judgement survives the retirement; the spelling moves from the key to the policy you attach. The IAM overview's Migrating from scopes translates each row into catalog operations.
| The key does this | Grant |
|---|---|
| Monitoring / inventory collection | compute:read, storage:read, network:read — the reads of what it inspects |
| CI that deploys instances | compute:read, compute:write |
| Restart a service on a schedule | compute:read, compute:write (an action is a mutation) |
| Terraform managing a stack | read and write for each service in the stack — a plan reads before it changes anything |
| Read invoices for accounting | billing:read |
| Request quota changes | quotas:read, quotas:write |
Two habits keep keys safe: give a key one job rather than reusing a broad one, and set an expiry so a forgotten key stops working by itself.
Examples
# The catalog still lists the vocabulary. Create the key without scopes,
# then attach the policy that grants it.
fm account api-key scopes
fm account api-key create --name "ci-deploy" --expires 2027-01-01
fm iam policy attach <policy-id> --type api_key --id <key-id>resource "frostmoln_api_key" "ci" {
name = "ci-deploy"
}
# The grant is a policy attached to the key.
data "frostmoln_iam_policy_document" "ci" {
rule {
name = "ci-compute"
access = "allow"
operations = ["compute:instances:read", "compute:instances:list",
"compute:instances:create", "compute:instances:update"]
targets = ["frn:compute:*:*:instances/*"]
}
}
resource "frostmoln_iam_policy" "ci" {
name = "ci-deploy"
document = data.frostmoln_iam_policy_document.ci.json
}
resource "frostmoln_iam_policy_attachment" "ci" {
policy_id = frostmoln_iam_policy.ci.id
attachee_type = "api_key"
attachee_id = frostmoln_api_key.ci.id
}The key itself is shown once, at creation. Store it in your secret manager straight away — it cannot be retrieved later, only replaced.
Access policies are the grant
Scopes said what kind of call a key could make, never to which resource or from where, and they never denied anything. An access policy names exact service:resource:action operations, pins targets to individual resources and adds conditions — a source-IP range, an explicit deny — and with scopes retired it is also the only grant a migrated key has. Author and attach it from the IAM access policies page.
Seeing what a key grants
Every key answers two questions at once: its scopes (the flat service:action grants above — still stored until the key is migrated; see Scopes are retired) and the access policies attached to it (additive — a policy can grant more than the scopes alone). In the portal, Settings → API Keys → Policies on any key shows the policies attached directly to it, each linking to the IAM pages where they are authored and attached. The Terraform provider answers the same question server-side: frostmoln_iam_policy data sources plus frostmoln_iam_policy_attachment describe a key's policy footprint in code.
Two boundaries the view keeps visible: an attached policy never delegates management powers (organization, API-key, and workload-identity classes cannot travel through a policy to a key), and a policy grants nothing until it is added to the key — the list shows what actually rides this key, not what the tenant's policy library could grant.