Access management

Granting roles, relationships, custom roles and policies, and the rules that keep access safe.

Access management

Access is granted with role bindings (a role for a subject on a resource and everything below it) and relationships (a subject in a relation of one resource, such as a dashboard viewer or a group member). Accounts can define custom roles and policies. The access reference lists every permission and built-in role.

Guides: grant access, create a custom role, conditions and policies, share a single item, restrict a table, explain access, service accounts, tokens, agents.

Subjects

A subject is a user, a service account, an agent, or the members of a group:

user:<user-id>
<account-id>/service_account:<service-account-id>
<account-id>/agent:<agent-id>
<account-id>/group:<group-id>#member

Service accounts, agents and groups belong to an account, and their ids are unique only within it, so their canonical form names the account. Responses return the canonical form in ref, with the account in accountId. In an account's API the account prefix can be left out: group:<group-id>#member names that account's group, and a subject of another account is refused. System role bindings name a service account with its account.

A group's members can be users, service accounts, or the members of another group of the same account. A user or service account counts as a member only while it is a member of the group's account; removing it from the account removes its memberships of the account's groups, with its roles, relationships and table restrictions there. Membership is followed eight levels deep, and at most 4,096 groups are followed for one check; past either limit, access only a group could grant is denied, while direct grants still apply unless a group could take them away.

How quickly changes apply

An access change applies on the node that made it at the next request, and on every other node within about a second (10 seconds at most). This covers revoked grants, removed members, revoked tokens, deleted resources, and every change to what conditions read of a principal: a user's name, email address or disabled state, an agent's approval, revocation, environment or host name, and a service account's name, disabled state or default. Credentials follow the same timing: disabling or deleting a user, revoking or deleting an agent, and changing the sign-in requirements of the system, an account or a user, certificate bindings included.

A decision never combines access data from before and after a change: when access data it depends on changes while it is decided, it is decided again. During a sustained burst of access changes in one account, a request can fail with an error instead; retry it.

When a node cannot reach the database, it keeps deciding from what it last read for at most 10 seconds, then refuses every request that needs access data until the database answers again. logship.backend.authz.store.failures counts the failed reads (authorization metrics).

After the database is restored from a backup or fails over, every node drops the access data it cached. An edit prepared before the restore (any write that names a version, and guarded grant, membership and role edits) is refused with 409 version_conflict; reload and decide again.

Changes whose permission depends on other access are held to the access they were decided on, and refused with 409 version_conflict when it changes before they are written: issuing a service account token (any change in its account), setting another user's password, sign-in names or contact details, disabling or deleting a user (any change in an account the user holds access in, or outside accounts), and turning Logship.Authz.CreateDefaultServiceAccounts on (any change in the account). Retry them.

Write limits

Access changes (grants, relationships, group members, groups, table restrictions, roles, policies, service accounts, dashboard visibility and account sign-in requirements) are limited to 600 a minute per caller and 1,200 a minute per account, the system counting as one account. Past either, a write returns 429 rate_limited. Removals (revoking grants, relationships, members, groups and tokens) draw on a separate allowance of 12,000 a minute per account, so other writes never hold back a revocation. Only writes that change something count against the account: refused writes, and writes that repeat what is already stored, count only against their caller.

Inspection limits

Inspections (effective permissions, who has access, explain, expand, impact previews, an account's model and the change feeds) are limited to 600 a minute and 4 at a time per caller, and to 6,000 a minute and 16 at a time per account, the system counting as one account; GET /access/effective counts only against its caller. Past the number at a time, up to 64 more requests per caller and 256 per account wait their turn. Past the rate, or a full queue, a request returns 429 rate_limited. A change feed that waits counts against the rate only. The limits are counted on each node separately.

The authorization audit log keeps entries for backend.services.databaseService.authorizationAuditRetention (default 365 days, LS_backend__services__databaseService__authorizationAuditRetention), at most backend.services.databaseService.authorizationAuditMaxEntries entries of each account and of outside accounts (default 1,000,000), and removes older entries every minute (configuration).

Limits

Each decision and definition is bounded; past a decision limit the check is denied, past a definition limit the write returns 400.

LimitValueWhy
Rewrite nesting per check25The built-in model nests at most 2 deep, and custom roles and policies add no nesting, so the limit only stops a malformed model.
Group membership depth8Followed for one check; past it, access only a deeper group could grant is denied.
Groups followed per check4,096As above.
Database round trips per check16After group expansion.
Condition size4,096 characters, 512 terms, 32 levelsApplies to every condition, built-in or custom.
Condition evaluation stepsNo separate budgetConditions have no loops or recursion, so a condition evaluates each of its at most 512 terms once.
Steps per checkNo separate budgetA check evaluates only the conditions of its account's policies (at most 500), of the grants it reads (at most 32 denies each) and of the model, each within the condition size.
Custom roles per account200
Policies per account500

Who may grant what

Managing access to a resource needs manage_access on the nearest resource that controls access to it, the resource's access anchor (a column's table, a group's account), or system.manage_access. A system permission that stands in for an account's own counts only when the account's sign-in requirements admit the request's credential: a global access administrator signed in by password cannot manage access in an account that requires certificates. GET /accounts/{id}/access/assignable-roles lists, for whoever manages a resource's access, the account's custom roles that can be granted on it, with the permissions each confers there. Role definitions need account.view_roles.

You can only hand on what you hold:

  • Protected permissions (manage_access, manage_roles, manage_policies) can be granted only by someone who holds them where the grant takes effect. An access administrator can grant Access administrator, but not Account administrator or Role administrator.
  • Other permissions must be held where they take effect, unless you are the account's access administrator (account.manage_access).
  • Granting to a service account needs service_account.manage_access on it.
  • Privileged roles need explicit acknowledgement.
  • A group that holds a privileged role, or a protected permission, anywhere, only changes members by an account access administrator (a system access administrator when the holding is on the system), who must also hold the group's protected permissions where they take effect.
  • Editing a bound custom role, or enabling a permit policy, may only add permissions you hold across the account, unless you administer the account's access. Removing or changing a deny of a bound role counts as adding every permission the deny covered. An edit that widens a bound role also holds every binding of it to the checks a new binding of the widened role gets: the delegation rule at its resource, manage_access on a service account subject, the acting-as rule for control of a service account, and the self-control and service account caller refusals below. The edit is refused with 409 version_conflict when a binding of the role is written while it is decided, a widening edit also when any grant, relationship or membership of the account, or outside accounts, changes meanwhile, and a new or edited binding of a custom role is refused the same way when the role changes while the binding is decided. Adding group members is refused with 409 version_conflict when any grant, relationship or membership of the account, or outside accounts, changes while it is decided; retry it. Changes in other accounts never refuse these writes.
  • A binding's own denies must name permissions its role grants. When a role edit stops granting a permission a binding denies, that deny narrows nothing until the role grants the permission again; the edit succeeds and its warnings name each such binding. Editing the binding keeps such a deny, so it holds again when the role is widened; only a deny added by the edit must name a permission the role grants now. Widening the role is held to the same rules as granting it anew. An edit that would leave a permission the role still grants undenied by a binding's denies is refused, naming each such binding; change those bindings first. POST /accounts/{id}/roles/validate?roleId=<id> reports both for an edit before it is saved: refusals as diagnostics, moot denies as warnings. Both name a binding only to someone who can view access where it is granted; the rest are counted. A binding whose denies or role stop compiling anyway grants nothing, and the bindings list marks it Grants nothing with the reason (ineffective).
  • Placing a forbid policy has no ceiling. Disabling, deleting or changing an enabled forbid needs the forbid's permissions under the same rule as a permit. Tenant policies can never name protected permissions, and a tenant forbid must guard every optional value with has().
  • Acting as a service account needs what it holds: creating it, minting its tokens, choosing it to run an evaluator, making it (or, by clearing the current default, the service account that replaces it) the account default, and granting manager, run_as or manage_access on that one service account. You must be able to hand on every permission it holds, directly, through its groups, or through a permit policy for service accounts, under the rules above, and need system.manage_access when it holds anything on the system. A new service account holds its account membership and every permit for service accounts. A permit counts whatever its anchor, unless it applies to you in the same way: it covers your principal type, its condition reads only resource.*, request.time or request.permission, and you hold its anchor. A group's members gain the permits whose anchor the group's holdings confer, and a privileged one makes the group privileged. A relation derived from a resource's fields counts only when it confers a privileged or protected permission, as for group membership; it then counts on each resource that names the service account or one of its groups, and when it names them on more than 2,000 resources, acting as it needs system.manage_access. No built-in derived relation confers one, so whoever acts as a service account may use the access it gets on incidents it owns, is assigned or raised, or its groups own. Counting those would let anyone who can raise an incident refuse its managers and revoke its tokens. Its own account membership is exempt. Grants of run_as across all service accounts of an account are checked when one is used. Refusals return service_account_privileged on use and delegation_exceeded on grants. A minted token is rechecked against a narrower bar, only the privileged and protected permissions the service account holds (see tokens), so sharing a resource with one of its groups does not revoke it. Each run of an evaluator that runs as a service account holds the user who chose it to the same bar.
  • Only a user acts as a service account or gives control of one. A service account caller cannot mint service account tokens, create service accounts, choose a service account to run an evaluator (or save an evaluator that runs as one), change the default service account, grant run_as or manage_access on a service account or across all of them (a binding on the account or above, a bound custom role it widens, or a permit policy), or change the members of a group that holds either on any service account, whatever it holds. These return service_account_privileged. Every service account credential therefore traces back to a person whose control is rechecked while it lasts.
  • A service account is never given run_as or manage_access on itself, by relationship, by a role bound on it or by widening a role bound on it, directly or through a group it belongs to at any depth the engine follows: 400 service_account_self_control. Adding it, or a group containing it, to a group that holds either on it returns 403 service_account_self_control.

system.manage_access passes all of these, in the accounts whose sign-in requirements admit the credential: the Global access administrator is effectively root.

The legacy member endpoints (POST /accounts/{id}/users, POST and DELETE /accounts/{id}/users/{userId}) need account_user.create (adding or changing roles) or account_user.delete (removing), account.manage_access when a privileged role is granted, revoked or held by the member, and every role they grant is held to the delegation rules above (403 delegation_exceeded), as a binding through the access API is.

Invariants

These are checked atomically with every write and cannot be overridden:

  • Every account keeps at least one account administrator: an unconditional, deny-free Account administrator binding held directly by an enabled user. The administration account is exempt.
  • The deployment keeps at least one such global administrator.
  • Every recovery administrator of the identity policy keeps the global administrator role.
  • The administration account is managed only through system bindings.

A change that would remove your own ability to manage what you are changing returns self_lockout; repeat it with acknowledgeSelfLockout=true to go ahead.

Adding a member to a group hands on everything the group holds: its role bindings, its relationships, the permits that apply through them, and those of every group it belongs to. The caller must pass the delegation rule for each where it takes effect, or administer the account's access (system.manage_access for holdings on the system); otherwise the add returns 403 delegation_exceeded. group.manage_members alone (from the Incident manager role, for example) therefore manages only groups that hold nothing the caller could not grant. Removing members needs only group.manage_members. Changing the members of a group that holds privileged access, added or removed, without the access administration it needs returns group_membership_privileged. Both rules apply through the relationship and the group member APIs. Incidents and other resources that name a group through a derived relation confer nothing privileged, so a group that only owns incidents stays manageable by its managers.

A user, service account or group belongs directly to at most 256 groups of one account; a membership past that returns 400 group_membership_limit. A check counts only the groups of the resource's own account (system checks count none), so memberships in one account never affect checks in another.

An account holds at most 200 custom roles, 500 policies, 100,000 role bindings and 100,000 relationships (group memberships included); a write that adds past one returns 400 limit_exceeded. That includes adding account members or group members, creating service accounts and approving agents; a user an identity provider would create into a full default account is refused sign-in. Data already past a limit stays readable, editable and deletable: only writes that add to it are refused.

Group names are unique in an account: creating or renaming a group to another group's name returns 409 duplicate and leaves both groups as they were.

A PUT of an account, group, dashboard, alert, incident or saved query is decided as an update when the id exists and as a create when it does not, needing the update or create permission accordingly. When the id is deleted or created by another request while the write is decided, it returns 409 and writes nothing; retry it.

Deleting a custom role, policy or service account needs version set to its current version; 0 returns 400 invalid_request. Deleting a binding or relationship with any other version returns 409 version_conflict. The version of a binding, relationship, custom role, policy, service account or table restriction changes with every write and never repeats, even when a record is deleted and recreated under the same key.

Privileged users

A user who holds a privileged role or a protected permission anywhere (a global role, an account role, a relationship such as manager of a service account, through any group, or through a permit) is privileged. Changing another user's sign-in, or removing it, needs system.manage_access when that user is privileged, on top of the operation's own permission. This covers setting the password (PUT /user/{userId}/password), changing the login name or contact details (PUT /user/{userId}), creating an identity provider invitation for the user, disabling or enabling it, and deleting it. Refusals return 403 privileged_user. Users always change their own details and password; setting a first password, without a current one, needs a sign-in from the last five minutes (403 reauthentication_required, see tokens), as do setting another user's password and changing another user's email address. Creating an invitation for any user needs one too, refused with 403 like the other identity provider settings. The privileged-user check is decided before the sign-in's freshness.

Users cannot change their own user name (403 username_change_requires_admin), whatever they hold. Invitations and adding members find users by user name, so a user that renamed itself to an unused address would be added by the next invitation of that address. Another user holding user.update on the user renames it, with system.manage_access when the user is privileged. Contact details, including the email address, are not looked up by invitations or member adds, so users keep changing their own.

Disabling users

POST /users/{userId}/disable and POST /users/{userId}/enable need user.manage on the user (the Global user manager role), and system.manage_access when the user is privileged. Users cannot disable themselves. Disabling is atomic with the invariants above: it is refused with last_account_admin, last_global_admin or recovery_administrator when the user is the last administrator or a recovery administrator. A disabled user:

  • cannot sign in with a password, an identity provider, or an OAuth bearer token, and cannot complete an invitation;
  • is denied everything by the disabled_users policy, and their bindings no longer count as administrators;
  • loses every credential issued before the disable, including after being enabled again (tokens).

A user enabled again signs in at once and gets new credentials; the old ones stay refused. Both operations apply on every node within about a second (how quickly changes apply) and are recorded in the authorization audit log as user.disable and user.enable. User models (/user/{userId}, /users, account member lists) report isDisabled.

Deleting users

DELETE /user/{userId} needs user.delete on the user, and system.manage_access when the user is privileged; it is refused like disabling when the user is the last administrator or a recovery administrator. Deleting removes the user's bindings and relationships, group memberships, table restrictions, password, contact details, linked identity provider identities, OAuth tokens, pending registrations and password resets, identity provider invitations, and its grants not migrated. Incidents keep their creator and owner, audit logs their actors, and service account tokens their minter; tokens the user minted stay refused. The change is recorded as user.delete.

User ids are never reused. Creating a user with a deleted user's id, by an administrator, setup or any other path, is refused with 409 user_id_retired. Anonymous registration never takes its id from the request: the server chooses it and names the user in the response's Location header.

Refusals

Every endpoint refuses in the same way:

  • 401 (unauthenticated): the request carries no credential, or one that does not authenticate: invalid, expired, or naming a user, agent or service account that is disabled or no longer exists. Sign in or refresh the credential.
  • 401 (credential_revoked): the token, or one it was issued from, is revoked everywhere or in the account the request acts in (revoking tokens). Use another credential.
  • 403 (forbidden, or a more specific code): the credential authenticates, but its principal may not do this.
  • 403 (insufficient_scope): the credential's scopes do not allow the operation, whatever its principal holds. Use a credential with broader scopes. An endpoint that acts as a user refuses another kind of credential, such as a service account's or an agent's, this way.

The caller is authorized for what it names (the account in the route, then the resource) before anything is looked up, so a refused caller gets the same 403, with the same body, whether the resource exists, does not exist or belongs to another account. 404 answers only a caller allowed to know: one who holds the permission on the named id, or, for a binding or relationship named by id, one who may view all of the account's access. A write that creates or updates (PUT of a dashboard, group, incident or evaluator, saving a query, PUT /accounts/{id}) is allowed with the update permission on the id or the create permission in the account, and only then told whether the id exists.

Every endpoint needs an authenticated credential except sign-in and identity provider sign-in, password reset, first-run setup, health checks, the OpenAPI document and the OAuth discovery endpoint. PUT /user/{id} and agent refresh also accept anonymous requests (registration and enrollment), but a credential they carry must authenticate.

Requests

Request bodies are read strictly: every member without a default must be present (send null for an absent optional value), non-nullable members cannot be null, and enums take their names only, never numbers. A violation returns 400 with code invalid_request and a message naming the member; a body that is not JSON returns 415.

  • POST /accounts/{id}/access/bindings/validate?bindingId=<id> validates an edit of that binding: only its caveat and denies are read, and the result predicts PUT …/bindings/{id} exactly, including locksOutCaller for an edit that needs acknowledgeSelfLockout. An edit is held to the delegation rules only when it can widen access.
  • GET /accounts/{id}/access/relationships?resourceType=group&subject=user:<id> lists a subject's relationships on every resource of a type, such as their group memberships. A subject is required; listing your own needs only account.view, anyone else's account.view_access. Your own includes any group you belong to, directly or through other groups, so GET /accounts/{id}/access/bindings?subject=group:<id>#member lists that group's grants too.
  • GET /system/access/bindings?resourceType=user&resourceId=<id> lists the bindings on one user.
  • Subject search matches a user's email only for callers who may see it (account.view_users, or system.view_users outside an account).
  • GET /accounts/{id}/access/subjects/lookup?refs=user:<id> names up to 50 subjects in request order, under the same rules as subject search: in an account its members, groups, service accounts and agents; outside one, users and service accounts with system.view_users. Any other subject, existing or not, returns exists: false with its id as its name.

Content lists (dashboards, evaluators, incidents, groups, saved queries, accounts) page with pageSize and return the next page's token in the X-Logship-Continuation-Token header. Tokens are encrypted and authenticated by the deployment and bound to the list, its account and the caller, and expire an hour after they are issued; an altered, foreign, expired or old offset token, or one from another list, account or caller, returns 400 invalid_page_token. A page resumes after its last visible item even if items were added or removed. The header is absent once nothing visible remains, except when a page stops after deciding about 10,000 rows: then a token is returned even if only hidden rows follow, which is the one hint a caller gets about rows it cannot see.

Model and change feed

GET /access/model returns the authorization model: resource types with their relations and attributes, permissions, built-in roles and policies, named conditions, the request.* members conditions read (with the values each can take) and the condition functions. It is the same for every caller, so any authenticated credential reads it. GET /accounts/{id}/access/model adds the account's custom roles (with account.view_roles) and policies (with account.view_policies); each is null without its permission, and the request returns 403 without either.

GET /accounts/{id}/access/changes returns the account's authorization changes, oldest first, as its audit log records them (account.view_audit); GET /system/access/changes returns the changes outside accounts (system.view_access). Start from a listing's revision with afterRevision, or with neither parameter from now, then pass back the cursor each response returns. wait (0 to 30 seconds, default 0) holds the request until a change arrives; an empty page means none did. A waiting request decides its permission and its credential again when a change arrives, and answers 403 if either ended while it waited. pageSize is 1 to 500 and hasMore says another page is ready. A response with resync: true means the changes since your position are no longer known, because the database was restored or failed over, the log no longer holds them, or more than 500 changes followed afterRevision: reload what you show, then continue from its cursor. A node holds at most 1,024 waiting requests, 16 per caller and 64 per account (the system counting as one); the last 256 go only to an account's first 4, so a busy account never shuts others out. Past these a request returns 429 rate_limited.

Conditions

Bindings and viewer relationships can expire (not_expired) or hold within a window (within_window). An expired one grants nothing, and maintenance removes it 366 days after it expired (as far back as explain decides), at most 1,000 a minute, each removal audited as a change of the system. Denies and policies use the condition language: GET /access/conditions/scope lists what a condition can read and call, and POST /access/conditions/validate checks one as you type.

Some attributes are self-asserted: their subject sets them without verification, such as a user's email and login name or an agent's host name and environment. Custom roles, policies and binding denies cannot read them (diagnostic AZC3006); the condition scope marks them isSelfAsserted. A service account's name is self-asserted too: whoever creates or renames it picks it. The access reference lists them.

Other attributes are set by whoever holds a permission on the resource, such as the names of groups, dashboards, evaluators, saved queries and accounts, an incident's title, state and owner, or a dashboard's visibility. Conditions can read them, but a condition keyed on a name, or any such attribute, can be evaded by anyone allowed to change it: an editor renames the resource. The condition scope reports the permission as managedBy, and the policy editor shows it on hover. Prefer relationships, resource types and table names, which editors cannot change.

Effective access

GET /access/effective returns what you hold on the system and every account you belong to: permissions on the account and on any resource of each type in it, including those held on a single resource through a role binding, a relationship or a derived relationship (such as an incident's owner), directly or through groups, or through a permit policy (such as account-visible dashboards). Each counts only where it holds now, after denies, conditions, forbid policies and the token's scopes; isCredentialScoped is true when those scopes cap what your roles grant. Per account, at most 2,000 resources are examined for the permissions not held type-wide: those you or your groups hold a binding or relationship on, those a derived relationship names you on, and, for a type whose access depends on a resource's attributes (conditions, permits), any of its resources. A permission that could be held only beyond that is listed in the account's undetermined rather than reported as not held; ask about the resource itself to decide it. A node answers the same caller, with the same credential, from the answer it computed until the account changes, for at most 10 seconds, unless the request differs in an address, authentication method or token that a condition the answer evaluated reads; pass minRevision to read past a change you made. GET /accounts/{id}/access/effective needs account.view on the account or a membership or binding in it, otherwise 403. POST /accounts/{id}/access/effective answers for specific resources. POST /accounts/{id}/access/explain says why a subject has or lacks a permission, and can test a draft policy before it is saved. Explaining another subject needs view_access where the resource's access is managed, and the subject must be one subject lookup names in that scope (in an account its members, groups, service accounts and agents; in the system users and service accounts), otherwise 400 subject_not_member (invalid_subject in the system). Its groups then lists only the group whose grant decided the answer, and subjectBindings the binding that decided and those on resources where you hold view_access. Explaining yourself needs account.view in an account; outside one, the system, your own user, or a user you can view; it lists every group of the account you belong to directly. A draft (draftPolicy, or draftReplacesPolicyId alone to test removing a policy; draftRole or draftBinding, shaped as in a preview) needs whatever saving it needs. Every draft also needs view on the resource or view_access where its access is managed; otherwise, and for a resource that does not exist, it returns 403 draft_resource_hidden. Explaining another subject refuses a draft whose conditions read principal.* with 400 invalid_request. Explain takes at most one draft. Its trace lists the steps of the derivation in preorder (at most 1,024, isTruncated when cut), each with its outcome and whether it decided the answer. A check on a resource you can neither view nor see the access of keeps its outcome and shows no steps. Another subject's grants show only on resources where you hold view_access, and its group memberships only for groups you can view, besides what decided the answer; any other is one step marked isRedacted that shows only its kind and outcome, standing for all such grants of its step and left out when none holds. A condition reading a resource you cannot view is redacted the same way, and a condition shown without its text shows neither the values it read nor how it failed. Step ids are assigned after redaction, so the trace says nothing about the size of what it hides; it shows the decision, each shown step's outcome and whether a limit was reached. Another subject's attributes are never shown. Explanations and other inspections of what a subject holds are not audited as denials. Resources you can neither view nor see the access of are named by id, and a custom policy's condition is shown only with account.view_policies. Without account.view, POST /accounts/{id}/access/effective returns exists: null.

Who has access and expand

GET /accounts/{id}/access/principals (/system/access/principals) lists who has access to a resource: the bindings on it and its ancestors, its relationships and the table restrictions narrowing it, with each user's effective permissions. Asked about one permission, it also lists up to 500 principals that hold it without such a grant, among the subjects lookup names in that scope; holdersTruncated marks a search cut at that limit or at 5,000 subjects named in all. Later pages reuse the first page's search while nothing it read changed. POST /accounts/{id}/access/expand (/system/access/expand) returns the tree that decides one permission, or one relation, of a resource: unions, intersections and exclusions as the permission's rule defines them; role leaves with the bindings on the resource and its ancestors whose role grants it; relation leaves with the users, service accounts and groups a relationship or a derived relationship names; arrows into the parent or the resources a relationship links; and the permit and forbid policies that apply, each with its condition. Grants under a condition name it in caveat. A permission already expanded further up is marked isRecursive and grants nothing there. The tree is bounded by maxDepth (1 to 32, default 16) nested permissions and maxNodes (1 to 2,000, default 500) nodes, and each leaf lists at most 200 subjects; a node cut short is marked isIncomplete. Expand needs view_access where the resource's access is managed, like who has access. A permission on another resource, such as a permit's anchor or an arrow's target, shows its subjects and children only where you hold view_access there; elsewhere it is marked isIncomplete with neither, as at a limit: nothing below it is read or counted toward maxNodes, and nodeCount counts only the nodes shown. Subjects are named as subject lookup names them in the scope, others by id. Resources you can neither view nor see the access of are named by id, and a custom policy's condition is shown only with account.view_policies.

Previewing a change

POST /accounts/{id}/access/impact (and POST /system/access/impact for system bindings) answers who would gain or lose what if a change were saved, without saving it. change names exactly one of:

  • binding: create (a grant request), bindingId with update (a new caveat and denies), or bindingId alone (removal);
  • role: draft (a new custom role), roleId with draft (an edit: every grant of the role is decided with the draft, its denies included), or roleId alone (removal: its grants then grant nothing);
  • policy: draft, policyId with draft (an edit, including enabling or disabling it), or policyId alone (removal).

The preview is checked exactly as the write would be, so a change you could not save returns the same refusal; it needs no acknowledgePrivileged or acknowledgeSelfLockout, and reports instead locksOutCaller (saving would take away your own access management there) and locks (lastAccountAdmin, lastGlobalAdmin, recoveryAdministrator: saving would be refused).

Each subject's gained and lost are the engine's decisions before and after, after denies, conditions, policies, groups and every other grant, at at (within 366 days of now) with the ip and authMethod conditions read. Who is compared:

  • a binding reaches its subject, or the members of its group, as many levels deep as groups are followed in decisions;
  • a role reaches everyone its grants reach;
  • a policy reaches every principal of the types it applies to that anything in the account, or above it, names.

What is compared: the changed binding's resource, the role's granted resources, or the account for a policy; plus up to 50 resources in all: those below that carry grants or relationships, or for a policy the resources of the types it names, and one entry standing for any resource of each type directly below (anyOfType; for a policy only when its condition reads no resource attribute, since such an entry has none). permissions narrows the permissions compared. subjectsTruncated and resourcesTruncated mark a search (5,000 subjects you can view and the groups they are reached through) or sample cut at its limit, counting only what you can view; reading more than 5,000 grants of one resource, or 2,000 resources of one listing, also cuts them.

Subjects come 10 a page (pageSize up to 25, then pageToken), and only those you can view are listed or counted: in an account its members, groups, service accounts and agents; in the system, users and service accounts. Resources you can neither view nor see the access of are left out. The role editor, the grant and remove dialogs and the policy editor's Impact tab show this preview.

Writing data

Ingestion needs account.ingest on the account, table.write on each table and column.write on each column a record writes, including timestamp and the __INFLOW_* columns the server adds, within the token's inflow scope. Columns are decided before schema inference, so a column the caller may not write is never created.

  • PUT /inflow/{accountId} (JSON) drops a record that writes a table or column the caller may not write and ingests the rest of the request, answering 200. The number of dropped records is logged per request and recorded in the metrics.inflow.withheld.count metric.
  • POST /inflow/{accountId}/{table}/csv, /tsv and /columnar answer 403 without table.write on the table or column.write on its timestamp, or when the header or declared columns name a column the caller may not write; nothing from the upload is written.
  • Blob uploads and blob-bearing records answer 403 under the same rules.

Legacy table restrictions

Per-user schema permissions from before the access model are kept as table restrictions. A restriction withholds read or write on one table (and its columns), or on single columns, on every grant its user holds in the account, deployment-wide grants included. The legacy PUT /accounts/{id}/users/{userId}/schema-permissions still writes them, and its GET still reports them merged with the table defaults. The legacy PUT needs table.manage_access on every listed table and is held to the same delegation rules as the restriction PUT below, and returns 403 reserved_account in the administration account.

  • GET /accounts/{id}/access/table-restrictions?subject=user:<id>&table=<name> lists stored restrictions, ordered by subject then table, filtered by either or both and paged with pageSize and pageToken. It needs account.view_access; rows on tables without table.view_access are left out and counted in hiddenCount, and the page token names the last row returned. A user may list their own (subject= themselves) with account.view; then rows are named only on tables they can view access to or read, and the rest are counted.
  • PUT /accounts/{id}/access/table-restrictions?subject=…&table=…&version=<n> replaces a user's restriction (canRead, canWrite, columns) with the legacy validation.
  • DELETE /accounts/{id}/access/table-restrictions?subject=…&table=…&version=<n> removes one.

A restriction belongs to the principal it names; a group or userset subject is refused with 400 invalid_subject.

Both writes need table.manage_access on the table, name the restriction's current version (409 version_conflict otherwise, 404 restriction_not_found when it is gone) and are audited as restriction.put and restriction.delete. Whatever any write, legacy PUT included, stops withholding is held to the delegation rules: the caller must be able to grant it (403 delegation_exceeded). A legacy PUT that races another write to the same restriction, including one creating it, returns 409 version_conflict; a table listed twice in one legacy PUT keeps its last entry.

A denial caused by a restriction is explained with reason kind tableRestriction, a deny of origin tableRestriction and the restriction itself. Who has access lists each subject's restrictions on the table, or on the column's table when they withhold that column. In the UI they appear under Legacy table restrictions on a user's access page and on a table's access panel.