Access management¶
Every member and service account of a tenant holds a set of permissions. Each operation of the
console and the API needs exactly one of them, for example apps.deploy or queues.publish.
Access in the console shows who holds what and lets admins change it.
How access is put together¶
What someone can do is the sum of three things. Access is only ever added: there are no deny rules.
| Source | What it is |
|---|---|
| Built-in role | Viewer, Editor or Admin: a bundle of permissions. See Teams and roles. |
| Custom roles | Bundles of permissions you define under Access → Roles and give to members or service accounts. |
| Direct permissions | Single permissions granted to one member or service account. |
To give a service account less than a viewer, mark its access as restricted: the built-in role is then ignored and only its custom roles and direct permissions count. This is how you make a CI account that can deploy one app and nothing else.
The Who can filter on the Access page lists everyone who holds a given permission.
Access to some objects only¶
A permission can be granted for some objects of a kind instead of for the whole tenant, for
example "publish to the queues whose name starts with orders-" or "deploy the app checkout".
A scoped entry names a kind of object, which objects, and the permissions (or custom roles) that apply to them. Objects are selected by any of:
| Selector | Example | Selects |
|---|---|---|
| Name | checkout |
exactly that object |
| Prefix | orders-* |
every object whose name starts with orders-, including ones created later |
| Label | team=payments |
every object carrying that label |
Kinds of object that can be scoped: buckets, apps, PostgreSQL clusters, Kubernetes clusters, container registries, secrets, volumes, scheduled jobs, queues, topics and AI models.
How it behaves:
- A single-object operation outside the scope is refused with the same error as for someone without the permission, so the answer does not reveal whether the object exists.
- Lists show only the objects in scope.
- Creating an object is allowed when the new name is in scope by name or prefix. A label selector never allows creating, because a new object has no labels yet.
- Nobody can grant more than they hold: a scope can only be handed out by someone whose own access covers all of it, and a service account never gets more than the person who created it.
- An entry applies to one kind of object. A scope over queues named
orders-*says nothing about a topic of the same name.
mutation {
setPrincipalAccess(input: {
username: "ci-orders"
restricted: true
scoped: [{
resourceType: "queue"
selector: { prefixes: ["orders-"] }
permissions: ["queues.read", "queues.publish"]
}]
}) { username }
}
resourceTypes lists the kinds and their permissions; myScopedPermissions shows what the
caller holds for some objects only.
Labels¶
A label is a key=value tag on an object, used to select objects for scoped access. Labels are
set on the object's page or with setResourceLabels.
Because a label can bring an object into someone's scope, labelling is itself an act of granting
access. Setting labels needs the iam.labels.manage permission (admins) and all permissions of
that kind of object on that object, held for the whole tenant or through a name or prefix scope.
Labels are removed when the object is deleted. A name or prefix scope is different by design: it keeps applying to a new object of the same name.
Known limits¶
- Credentials are not scoped. An object storage access key reaches every bucket of the tenant over S3, and a queue credential reaches every queue and topic over AMQP, whatever the holder's scope in the console and the API.
- Instances cannot be scoped yet.
- AI models are matched on the name a request sends, tag included:
llama3andllama3:latestare different names. Grant the prefix to cover every tag. - A scope on one kind of object does not limit what that object can reach of another kind: someone scoped to an app can still let it use any secret or volume of the tenant.
- Monitoring, usage and billing pages are tenant-wide and name objects.
- Removing a topic subscription, and managing webhooks, scheduled messages and queue credentials, need the permission for the whole tenant.
- A page of a long list can come back with fewer rows than the page size.
Audit¶
Every change of access is in the audit log, and is announced as a
platform event (iam.#).