Concepts
Policies
Rules that decide whether a credential access is allowed.
A policy is a rule that decides whether a credential access is allowed. Every credential-use request — app or agent, retrieve or proxy — is evaluated against the relevant policies before the token is injected; if the policy denies, the call raises PolicyViolationError and the provider is never reached. One exception: a request-quota denial (the window’s limit is spent) raises QuotaExceededError instead, which carries a retry-after — the seconds until the window resets. The SDKs never auto-retry it.
Policies sit between who can call (the principal on the grant) and what they’re allowed to call right now. The principal binding answers “is Alice’s grant?”; the policy answers “is now a valid time, from a valid place, within rate?”
Where a policy lives
Section titled “Where a policy lives”| Layer | Set by | Example |
|---|---|---|
| Organization policy | An organization administrator in the developer portal (dashboard-only — no CLI) | Require human-in-the-loop approval for sensitive operations in every application |
| Application policy | The operator in the developer portal or CLI | IP allowlist for every request in one application |
| OAuth provider policy | The operator in the developer portal or CLI | Block sending through one OAuth provider |
| Managed-secret provider policy | The operator in the developer portal or CLI | Allow only GET requests through one managed-secret provider, including an internal API created from the Custom template |
| Group policy | The operator in the developer portal or CLI | Allow contractors (an identity-provider group) only read requests, whichever connection or agent they use |
| Agent policy | The operator in the developer portal or CLI | Rate limit one managed agent |
| Connection policy | The operator or end user; on a user-owned managed-secret grant, the end user only | Restrict one OAuth or managed-secret grant |
| Account policy | The end user in the Wallet, or the application in the developer portal or CLI; each edits only its own | The user requires human-in-the-loop approval across their accounts; the application blocks deletes for one user |
| Constrained-client policy | The SDK caller | Create a sub-client whose requests carry an additional non-stored rule |
Policies compose across the whole grant and delegation chain. A request that satisfies its connection policy but violates an application, group, agent, or account policy still fails.
Account and group policies follow the end user, not a connection: they apply to every request the user makes through the application, including through a connection their group holds, and to no other user. A group policy applies to the group’s active members, as the identity provider last reported them (see what groups can do).
The end user and the application each author account rules and each can change only its own. The user sees the application’s rules on their account in the Wallet, marked Set by the application (and the group, for a group rule), and cannot change or remove them; the application sees the user’s own limits in the developer portal and CLI and cannot change or remove those. Grant expiry (TTL) and scopes are separate access ceilings — set when the grant or key is created, not authored as policy rules — displayed alongside the effective policy chain.
A managed-secret provider policy is the managed-secret counterpart of an OAuth provider policy. OAuth provider policies apply to OAuth connections through that provider and never to managed-secret requests. A managed-secret provider policy applies to every request that uses that provider, including requests through a connection an agent received by delegation, and to no OAuth request.
User-owned managed-secret grants
Section titled “User-owned managed-secret grants”An end user’s own managed-secret key, with every delegation made from it, and any delegation a user consented to, belong to the user. Only the user sets connection policies on them, from the Wallet or the Connect page. The application cannot home a rule on such a grant, attach one to it, or change the body of or re-enable a rule that includes it: the developer portal hides Add rule there, and the CLI and API refuse with grant_user_owned. It can still disable, rename or delete such a rule. The application’s rules on the provider, the user, a group, an agent, the application and the organization still apply to it, as OAuth provider rules apply to a user’s OAuth connection.
A connection policy the end user sets makes the grant proxy-only, on OAuth and managed-secret grants alike: a limit binds only on calls Alter sees, so raw credential retrieval is refused (user_limits_require_proxy) once the user has set one.
Seeing every level in one place
Section titled “Seeing every level in one place”A request can be refused by a capability limit or by a runtime policy, and they are set in different places:
| Check, in order | What it limits | Where it is set |
|---|---|---|
| API key scopes | Which Alter operations the calling key may use | The key, when it is created |
| Agent capability allowlist | Which providers and scopes an agent may use with its own key, whatever is delegated to it. A call made with an application key, including one acting as an agent (app.get_agent()), is not checked against it | The agent’s Overview in the developer portal |
| Provider scopes and scope narrowing | Which scopes a provider asks end users to grant; for a delegated or narrowed connection, only the scopes its scope_constraint leaves | The provider’s page; the delegation |
| Runtime policies | Every request, at each of the layers above; all of them must pass | Each layer’s own page, as listed above |
Capability allowlists are enforced for the whole Alter deployment, not per application; while they are not enforced, an allowlist refuses nothing.
The application’s Runtime Policies → Overview tab in the developer portal shows all of it in that order: each key’s scopes, each agent’s allowlist, each provider’s scopes and every runtime policy at every level, each with a link to where it is changed. It flags an agent whose allowlist leaves some of a provider’s scopes uncovered, because a delegation of all of them to that agent is refused; one narrowed to scopes on its allowlist is allowed. What applies to… takes an agent, a connection and optionally a key, and shows the result of each check: the connection’s state and whether it serves requests, the scopes an allowlist is missing, and every runtime policy that composes for the connection. An application key is reported as not bound by any allowlist, unless the agent it would act as is suspended or revoked, which is reported first because no call can act as such an agent. The CLI equivalents are alter policy show-access and alter policy check-access; show-access --provider <provider-id> narrows the map to one provider.
Where a rule applies
Section titled “Where a rule applies”A rule is created at one place, its home: the application, OAuth provider, managed-secret provider, group, user, agent, or connection whose page (or CLI target) you created it from. It can then be attached to more places inside the same application, at any mix of those levels. One rule written once can restrict two agents, three users, or a provider and the agent that uses it, without authoring copies that drift apart. Every attachment is checked when it is added: the target must exist and belong to the same application.
A rule can also carry exceptions: agents, users, or groups the rule does not apply to, even though they fall under one of its attachments. For example, an application-wide read-only rule with an exception for a maintenance agent restricts every agent except that one; a group rule with an exception for the group’s lead restricts every other member; an application rule with an exception for a group restricts everyone outside it. An exception must be narrower than at least one of the rule’s attachments: a group under an application, OAuth provider, or managed-secret provider; a user under one of those or a group; an agent under any of those or a user. An excepted user or group is exempt on every request that user or member makes. An agent exception follows delegation just as an attachment does: it also exempts every agent the excepted agent delegates to, even where a more specific attachment of the same rule matches, because a delegate never has more access than the agent it delegates from.
On each request, a rule applies when at least one of its attachments matches the request and none of its exceptions does. A rule is evaluated once per request, even when several of its attachments match. The home cannot be removed from a rule; to stop applying a rule at its home, delete the rule. Organization rules, account rules the end user authored in the Wallet, and rules managed by a settings page (such as a grant’s approval settings) apply only at their home and cannot be attached elsewhere.
The effective-rules view, Explain a request (the simulator) and the audit record of a denial all show which attachment matched, and the simulator shows the exception that excluded a rule when one did.
Attachments and exceptions change what a rule restricts, so they follow the same direction-of-effect permissions as editing a rule. Adding an attachment or removing an exception tightens access and needs the permission to create rules. Removing an attachment or adding an exception loosens access and needs the permission to delete rules, and the developer portal and CLI ask for confirmation first. Each change is version-checked and recorded in the audit log.
Revoking an attached agent, deleting an attached OAuth provider or managed-secret provider, or the identity provider deleting an attached group removes that attachment (or exception) from the rule and records the removal in the audit log; the rule keeps applying everywhere else. A rule set on a deleted group moves to another place it is attached to, and is deleted only when it applies nowhere else. Deprovisioning a user removes nothing: the user’s attachments and exclusions stay, and apply again if the user is re-provisioned. Revoking an attached connection leaves its attachment in place: a revoked connection can never make another request, so the attachment has no effect, and it stays listed on the rule until you remove it. Deleting a rule’s home deletes the rule.
An exception for a group is an access its members keep until the identity provider reports they left. It can only be added when the provider revokes memberships in real time (Clerk, Okta or WorkOS with webhooks enabled, the same requirement as a group-bound grant); on any other setup it is refused with the reason. Disabling those webhooks is refused while such exceptions exist, and forcing the disable removes them.
What policies can express
Section titled “What policies can express”- Time-of-day windows — configurable day/time windows in a chosen timezone (e.g. business hours Mon–Fri, or an overnight maintenance window).
- IP allowlists — call only from listed IP addresses or CIDR ranges.
- Rate limits — cap calls per caller principal (agent when present, otherwise grant) per fixed window; over the limit, the call is denied with a retry-after until the window resets. This denial surfaces as
QuotaExceededError, notPolicyViolationError. - Attribute matches — deny requests matching metadata conditions: the HTTP method, the provider, the acting agent, the source IP, or the classified operation/family (“deny everything in the
paymentfamily”). - Method/endpoint restrictions — allowlist the HTTP methods and provider API paths traffic may use (“GET only”, “
/repos/**only”); enforced on proxied calls, so a restricted connection refuses raw-token retrieval. - Approval requirements — route to a human-in-the-loop decision before executing, including multi-party (N-of-N) approval where distinct approver gates from applicable rules must each be approved, and parameter-conditional approvals (“only payments over $1,000 need sign-off”). A request carrying sensitive input (passwords, tax ids, bank numbers, files) is held encrypted and shown masked to the approver; see Sensitive input in approvals.
- Operation-level rules — bind a specific provider operation or a semantic family of operations (“everything that sends”, “everything that moves money or asks for payment”) from Alter’s reviewed operation catalog, or from the operations a custom integration’s developers map: “this agent may read Gmail but never send.”
- Operation allowlists — the positive form: “this agent may run exactly these operations (or families) and nothing else.” Every other operation is denied, and so is any request Alter cannot match to a cataloged operation or that is an unreviewed operation the list does not name; several allowlists on one chain intersect, so a delegate’s list is never wider than its delegator’s. See Allow only selected operations.
- Tag isolation — “an agent may use or receive only connections that carry its own value for these tag keys”: tag agents and connections with a key such as
client, and a Harbor agent can never use, or be delegated, a Pinecrest connection, even in the same app (tag_mismatch). A key missing on either side is refused; a call from the application’s own backend, acting as no agent, is not checked. While the rule names a key, only an operator can change it, and not while live access depends on it. See Keep agents on their own clients’ grants. - Request allowlists — the positive form of a parameter rule: “a refund is allowed only when its amount is at most 500.00 and its reason is one of these.” A request the rule selects passes only when every condition holds, and with
strictonly when it also carries no field the rule does not name. Conditions read either the parameters Alter projects for a cataloged operation or the request as it is sent (a body field, a query parameter, a header), so a field no catalog maps, or a custom integration’s field, can be governed too. See Allow only requests that meet conditions. - Parameter-level rules — conditions over what a request actually carries, canonicalized across provider formats: “may only email addresses at
@acme.com”, “may not move more than $1,000”, “may run only these literal query statements” (the literalin/not_all_inoperators, as opposed to the glob-patternany_in/not_subset_of), “may touch files only under/Clients/VC” (the location operatorsunder/not_under, which judge a file store’s path by folder — a folder covers everything below it, compared ignoring case where the provider does), “may not set thefieldsparameter at all” (exists). A request the policy engine cannot fully classify is refused rather than guessed at, and so is one that switches the provider namespace with a context header no rule governs. - Redaction — remove named fields from a matching request before it reaches the provider (for example, the subject line of an outbound email, which is then sent without a subject). Nothing is written in place of a removed field, and the call is refused if the removal cannot be provably applied.
- Step-up authentication — require the acting end user to have signed in recently (“within the last 5 minutes”) for sensitive operations; a stale or unprovable session is refused with a clear re-authentication signal.
The operation-, parameter-, redaction- and step-up entries are variants of one rule shape: a content-match rule binds a match — specific operations or semantic families from the cataloged operation catalog, optionally narrowed by conditions over the request’s canonicalized parameters — to one of three effects: deny (refuse the call), redact (remove named fields before the call is executed — nothing is substituted — refusing if the removal cannot be provably applied), or step_up (require a sufficiently recent end-user sign-in). An operation allowlist is that same match selector used as a whole rule with the opposite sense: whatever it names passes, everything else is denied; it has no effect, conditions or when of its own. Like a content rule, an end user may author one on their own connection as a personal limit — it only narrows. The SDKs expose typed builders for both (content_match_rule and operation_allowlist_rule in Python, contentMatchRule and operationAllowlistRule in TypeScript), which validate the rule locally before it is ever sent — for a content-match rule, the requirements of its chosen effect included.
The developer portal and Wallet use the same structured editor and policy viewer. Owned rules show the complete definition: target, effect, operations, every parameter condition, status, source, and metadata. Inherited Wallet controls use the same viewer with disclosure-safe summaries that omit developer-only values. The CLI renders the same normalized explanation with alter policy rules get --output table; JSON remains the default for automation.
with_constraints (Python) and withConstraints (TypeScript) return constrained sub-clients. Every request made through that sub-client carries the additional rule; the original client remains unconstrained. Retain the original client for calls that should not carry the rule.
Unreviewed operations
Section titled “Unreviewed operations”Rules see a proxied call as an operation (an id such as createPosts) and the families that operation belongs to (read, write, send, delete, payment, admin). Both come from a provider’s reviewed operation catalog: someone at Alter read each cataloged operation and decided what it does.
Most providers publish more operations than Alter has reviewed. Every other operation in the provider’s published API specification is still named, with its own operation id, method and path, but it is marked unreviewed: Alter does not claim to know what it does, so its families are unknown. Each provider’s reference page lists these operations under Unreviewed operations. The developer portal’s operation picker marks them Unreviewed, and alter providers operations list shows them as UNREVIEWED (JSON field policy_review, value unreviewed).
A rule names an unreviewed operation by its provider-qualified name, <provider>:<operation-id>: for example zoom:deleteRole or canva:createUrlImportJob. An operation id is unique only within one provider’s specification (deleteRole is an unreviewed operation of Axiom, Grafana, Pipedrive, Rootly and Zoom), so the bare id would reach every provider that has it. The qualified name reaches only that provider, on both its OAuth and managed-secret connections. alter providers operations list shows it in the NAME IN A RULE column (JSON field policy_operation_id), the developer portal’s operation picker adds it for you, and each provider’s reference page lists it in the first column. A bare id never admits an unreviewed operation. Saving a new or changed rule that names a bare id is refused when that id is an unreviewed operation of some provider, no reviewed operation has the same id, and no custom integration the rule can reach maps it; the message lists the qualified names to use. A rule reaches every custom integration of its application when it applies to the whole application, an agent, a user or a group (every application’s for an organization rule), only the custom integrations it applies to when it applies to their managed secrets or connections, and none when it applies only to an OAuth provider, an OAuth connection or a managed-secret template’s connection, so a custom integration elsewhere in the application never keeps the bare id valid there. The warnings a save returns judge the id the same way. A bare id that another provider has reviewed keeps naming that reviewed operation only, so the save succeeds with a warning that lists the qualified names of the unreviewed ones. A bare id that a reachable custom integration maps names that integration’s operation, and the save succeeds with no warning. The same refusal applies to a rule an end user adds on a hosted Connect page and to a rule an agent attaches when it delegates access, judged against the custom integrations that connection can reach: a connection to an OAuth provider or a managed-secret template reaches none, so a custom integration elsewhere in the application never keeps the bare id valid there, and a connection to a custom integration reaches only that integration. A Connect rule is judged when the end user adds it, not again when the connection completes. A stored rule saved again unchanged is never refused, and neither is a rule an agent sends again unchanged when it re-delegates access that already carries it. Removing the place through which a rule reached the only custom integration that maps its bare id is not refused, because a rule can always be narrowed, but the response warns that the id now matches no request. A policy file judges a changed rule against the places it applies to once the whole file is applied, so a body change and the new place that makes its id valid apply together, and a body change whose id only a removed place made valid is refused when the plan is made. Operations Alter has reviewed keep their plain ids.
How rules treat an unreviewed operation:
- No operation, family or content rule applies: the call runs as it always has.
- Every operation, family or content rule refuses it unless a rule admits it by name. This covers family rules, family allowlists, and narrow rules that name other operations. The refusal is the same one a call no catalog can name gets, so a broad rule such as “deny everything in the
paymentfamily” cannot be dodged by calling an operation Alter has not reviewed. Operations that look like they hand over a credential are included: until one is reviewed, nothing claims it is safe. The one exception is an AI review rule, which, as for any call Alter cannot name, does not review it. - Two kinds of rule admit it by name. An operation allowlist entry naming its qualified name allows it. A
require_approvalrule holds it for approval when its condition has onlyoperationandmatch, and every one of them names it: the two are combined with AND, so a rule whoseoperationlists it but whosematchnames only other operations never holds it, and never admits it. Once an operator’s admitting rule names it, the other rules on the call judge it too: arequire_approvalrule that names other operations lets it pass. - Admitting it also needs a security allowance. Alter cannot rule out that an unreviewed operation creates a credential or changes account security, so an admitted one is refused as such (
credential_minting_refused) until an operator also adds acredential_mintingallowance with that provider naming the same qualified name. That allowance is always scoped: it names the caller (caller_type,caller_id), an expiry (expires_at) and areason, exactly as for a reviewed operation that grants privileges. - Any other rule naming it judges it, but cannot admit it. A deny rule naming it refuses it when it matches. An approval with any other condition holds it when that condition holds, but only when an operator’s stored rule admits the operation; otherwise, including when only a per-request rule, an end user’s rule or a delegating agent’s rule admits it, the approval refuses it as unreviewed and no approval is requested. When such a rule would let it through, it still refuses it as unreviewed, so a condition that never fires cannot open the way.
- Its families stay unknown. A family condition always holds for it, so a rule denying the
paymentfamily still refuses it even when another rule names it. A family never allows it, so an allowlist must list its id. - Constrained parties cannot lift the refusal for others. A per-request rule (
with_constraints/withConstraints), an end user’s own rule or a delegating agent’s rule that admits the operation does so for that rule only. The refusal from every other rule stays. - Only an organization admin can save a rule that admits one. A rule that admits an unreviewed operation lifts the refusal every other operation, family or content rule applies to it, so creating, changing, enabling, disabling, applying elsewhere or deleting such a rule needs an organization admin. A personal access token also needs the
dashboard_app_policy:rules_admit_unreviewedscope, which no wildcard grants (see Scopes). A rule that only denies or conditions an unreviewed operation needs neither. Rules already saved keep working, whoever saved them. - An approver sees what will be sent. The approval names the operation, marks it as not reviewed by Alter, and shows every value the call will send.
- Its payload is never captured. Nothing claims an unreviewed operation’s response holds no secret.
When Alter reviews an operation, it moves into the provider’s catalog with real families, which then apply. Its qualified name keeps naming it, so a rule or a credential_minting allowance saved with that name keeps matching it, now judged by its families like any reviewed operation. The same holds when the provider renames an unreviewed operation on the same route: the old qualified name keeps naming it, and the reference page lists it beside the current name. A qualified name always names the same endpoint: it never moves to another endpoint and never comes to cover a broader one, so no saved rule allows more than it did. A new or changed credential_minting allowance names an unreviewed operation by its current name, and never names a reviewed operation that needs no allowance; saving one that does is refused with the reason, while an allowance already saved keeps working. A reviewed operation that does need an allowance may be named by its reviewed id or by the qualified name it had while unreviewed, since both name the same operation. To ask for a review, send the operation id and provider to Alter support.
A refused call raises OperationUnreviewedError, a PolicyViolationError whose policy_error is operation_unreviewed. Its operation_id is the qualified name a rule uses, method and path_template name its endpoint, and its message says how to name it. See Allow an operation Alter has not reviewed for a worked example.
Operations that hand over a credential
Section titled “Operations that hand over a credential”Some provider operations would leave the caller holding a provider credential: a token exchange, a new, rotated or revealed API key or access token, a revealed password or connection string, a password the caller changes or resets, an SSH key, or a deploy key for more than one repository, the caller registers, or a stored secret sent to a host the caller chooses. A credential here is anything that works like a login for a person or for the whole account: API keys and personal or account access tokens, OAuth tokens and app client secrets, passwords and password resets, MFA and recovery codes, sign-in and impersonation links, and SSO signing keys. A token limited to one narrow job is not refused: pipeline trigger and runner tokens, deploy keys for one repository, publishable or storefront keys, webhook signing secrets, view or embed keys, signed URLs and invite codes are ordinary operations that policy rules can still restrict, and Alter never stores such a secret in a captured payload. Files, share links, webhook and subscription reads, invites, data exports, sensitive data such as a card number, and a GPG or SSH signing key the caller adds are not refused either. A call that revokes the connection’s own credential or uninstalls its app is refused the same way, because it would break the connection Alter holds; disconnecting the connection in Alter is the supported path. Where an operation sets a credential only when the request carries one among ordinary fields (a user update with a new password), only the requests that set it are refused. Alter exists so an agent never holds a provider credential, so by default it refuses every such operation it catalogs for the provider through the proxy, on every OAuth and managed-secret connection, before the request reaches the provider. The call raises PolicyViolationError with policy_error credential_minting_refused. The audit record of the refusal names the operation, and Explain a request and alter policy simulate report the same refusal. A provider’s reference page marks these operations refused by default in its policy-cataloged operations table: that is the default, which holds unless an operator allows the operation as described below. Where only some requests to an operation hand a credential over, the table names those requests, and the others run. A simulation carries no request body, so it reports such an operation as refused.
When a workload genuinely needs one of these operations, an operator can allow it with a credential_minting rule: an explicit allowance naming one provider and the exact operation ids (no wildcard and no family), either outright ("mode": "allow") or only after a person approves each call ("mode": "require_approval", with the same approval settings as a require_approval rule). The allowance applies wherever its bindings put it, like any rule: an allowance for a provider covers both its OAuth and its managed-secret connections, and one that applies to an agent also covers calls delegated through that agent. When a request path could be more than one operation that hands over a credential, every one of them must be allowed before the refusal lifts. The allowance lifts only the built-in refusal: every other rule still applies, so a deny rule at any level still wins, and a request whose path cannot be read well enough to name the operation is still refused. Because it widens what a connection may do, only operators author it (the developer portal, the alter CLI or a policy file, never the Wallet, Connect or a per-request rule), and creating one, applying one at another place, enabling one or changing what it names needs an organization admin and its own permission (dashboard_app_policy:rules_allow_minting for a personal access token, whose owner must be an organization admin) as well as the permission to create or update rules. The audit record of a call an allowance let through names it: credential_minting gives the operation id (operation_id, and operation_ids for every operation the path could be) and the allowing rules (allowed_by), and decision_basis is credential_minting_allowance for an allowance in "allow" mode, or approval when the call ran after a person approved it. The audit record of a refusal gives operation_id, operation_ids and needs_allowance, the operations no applicable allowance covers. See Allow an operation that hands over a credential.
Rules on GraphQL providers
Section titled “Rules on GraphQL providers”A GraphQL API sends every query and mutation to one URL, so the method and path alone do not say what a request does. For a provider whose operation catalog lists its GraphQL root fields, Alter reads the request’s GraphQL document and classifies it by the root fields it selects. Each root field is its own operation, with an id of the form query.<field> or mutation.<field> (for example query.products or mutation.orderCreate), its own families, and its own parameters, read from the field’s arguments with the request’s variables substituted.
Coverage is enabled separately for each provider; its reference page lists the available root-field operations. The behavior below applies only after that provider has opted in.
Root-field enforcement uses the document sent through proxy_request(). The SDK’s request() executes locally and does not send its document to Alter. Where credential release is explicitly allowed, token retrieval continues to work without operation rules; operation-dependent rules that cannot inspect the document fail closed. Use proxy_request() for GraphQL operation policies.
- Operation and family rules see every root field the document selects. A document that selects a read and a payment mutation is in the
readandpaymentfamilies, so a rule denying thepaymentfamily refuses it, while a document of reads alone passes. An operation rule namingmutation.orderCreatebinds every document that selects that mutation. - Parameter rules judge each root field on its own arguments. Two aliased mutations in one document are judged separately, so “may not move more than $1,000” refuses the document when either mutation exceeds it.
- Credentials. A root field that hands over general person/account login material is refused like any other such operation. Narrow capabilities follow the masked-capture contract below. So is a selection that reaches a field the catalog marks as carrying a credential (for example a token value inside a read): the refusal names the root field, and a
credential_mintingallowance naming that root field lifts it. - What Alter reads. Aliases, inline and named fragments,
@skipand@include(evaluated against the request’s variables) and batched requests are all followed the way the provider executes them. A condition that is not a boolean, or anoperationNamethe document does not define, leaves the request unclassified, and every branch and operation is still scanned for credentials.
Unknown GraphQL roots and unreadable or unsupported documents remain unclassified, and applicable operation/family rules fail closed on them. Credential operations and credential-bearing selections are refused by default wherever Alter reads query text: beside invalid envelope keys or variables, in any operation of a document that sends several operations without operationName or names one it does not define, on both branches of an unresolved @skip or @include, and in a query root reached again through another field (such as a node fragment on the query type), where the refusal names that query root.
On an endpoint that can return a credential, Alter forwards a request without rules only when it has read the whole request and found no credential operation. It reads exactly these transports in full: a JSON request object or batch sent as application/json (or with no content type), an application/graphql document, and a GET whose URL carries only query, variables, operationName and extensions, each once. Bodies must be UTF-8 and uncompressed; one leading byte-order mark is accepted. The same holds on the paths the provider may serve the endpoint under: letter case, a trailing or doubled slash, a format suffix such as /api/graphql.json, a matrix parameter, and a self-managed install under a URL prefix. Anything else is refused without rules, even when its document is harmless: form or multipart bodies, compressed bodies, other character sets, bytes that are not valid UTF-8, other or repeated content types, a JSON body that is not a request object or batch, URL parameters beside a body or under another method, unknown, repeated or ;-separated URL parameters, persisted-query references sent without query text (query text beside one is read and scanned), documents that do not parse, and requests too large to finish the scan. An allowance cannot authorize what was never read; send one of the transports above, split the request or simplify the document. A file upload cannot be sent to a GraphQL endpoint at all (proxy_body_uninspectable), because its bytes are not read before they are sent; a provider’s dedicated GraphQL upload route keeps its own checks. On an endpoint that can return no credential, a request Alter cannot read forwards when no operation/family rule applies. Current GraphQL allowlists must name exact query.<field> or mutation.<field> IDs or every family each selected operation carries; REST IDs only preserve deny/approval coverage, including nested reads.
A newly authored operation allowlist cannot use a legacy route-wide GraphQL ID or alias. Saving it returns an error naming the exact GraphQL IDs to use instead. A read family allowlist admits reads but no mutation carrying write. Deny and approval rules still recognize legacy IDs. A legacy route-wide GraphQL ID matches every query and mutation on its endpoint, so a rule naming it applies to every call there: saving one returns a warning naming the exact GraphQL ID to use instead. A parameter-scoped REST rule applies only to mapped GraphQL resources; a rule with no GraphQL mapping saves with a warning in both the CLI and dashboard.
To use an unlisted operation under an operation/family rule, update the reviewed catalog so Alter can classify it. Without such a rule, forwarding needs no unknown-mutation allowance. Historical unknown-mutation allowances remain stored but cannot override ordinary rules or approve an uninspectable request. Exact allowances for identified credential-bearing roots continue to require organization-admin authority and audit.
Redaction rules cannot apply to GraphQL arguments, so a request a redaction rule matches is refused. An approval shows the document and variables together with the root fields it selects, masking sensitive values in both variables and inline literals. The exact request is held encrypted, sent unchanged when approved, and deleted after execution or expiry. Raw card data remains refused. An overridden sensitive default cannot be held for approval, and the payload of a proxied call carrying general authentication input or selecting general authentication credentials is never captured; reviewed narrow-capability and signing secrets may instead be captured after masking as described below; the same holds, when the provider’s catalog marks any argument or output field that way, for a document Alter cannot read, for a declared endpoint with ambiguous case or matrix parameters, and for a document carrying content its selected root fields do not use (another operation, a fragment the operation never uses, a selection @skip or @include removes, or a variable the operation does not declare or never uses), since that content was never checked. In alter policy simulate, name a root field with --operation (for example --operation mutation.orderCreate), since the simulator does not take a request document; a simulated root field is judged by its families and its own mark, not by what a selection would reach, so a read that selects a credential-carrying field is refused live even when it simulates as allowed.
Fail-closed
Section titled “Fail-closed”A binary request body (bytes or text sent as body through proxy_request() / proxyRequest()) or an upload is not read as JSON, so a rule that depends on the body refuses it with proxy_body_uninspectable (422); on a GraphQL endpoint every operation, family and parameter rule depends on the body. GraphQL operation/family rules also fail closed on unreadable documents sent as JSON or text, using policy_violation; without an applicable rule, unreadable GraphQL forwards, except when the bytes sent carry a credential operation or credential-bearing selection, or when safety limits prevent a complete credential scan on a credential-capable endpoint. Two binary bodies are read, from the exact bytes sent:
- A form body declaring
Content-Type: application/x-www-form-urlencoded, on an operation whose provider documents a form-encoded request body (for example, Stripe’sPOSTendpoints). On an operation whose provider reads the body as JSON, a form label does not make the body readable, and it is refused as above. - A text body on an operation the provider also serves with one parameter as the whole body (for example, a QuickBooks query sent as
POST .../querywith the statement as anapplication/textortext/plainbody; see the QuickBooks reference).
Either body must be UTF-8 text. Its Content-Type may declare charset=utf-8 (or utf8), or us-ascii, ascii, iso-8859-1, latin1 or windows-1252 for a body that is pure ASCII (for a form body, one that also escapes no byte above 0x7F, such as %C3%A9, because the provider decodes escaped bytes in the declared charset; an escaped ASCII character such as %40 or %20 is fine). Another charset, a repeated charset, or any other parameter is refused under a rule that reads the body, with PolicyViolationError and denied_by.reason set to projection_failed. An AI review rule reads neither body and still refuses it.
An operation allowlist, an operation match or a content rule that does not redact still judges a binary body or an upload on an operation that takes nothing from its body: the method and path name it, and its parameters travel in the path, the query or a header, such as a Dropbox upload whose arguments travel in the Dropbox-API-Arg header, or a managed attachment upload whose multipart body Alter builds from the arguments policy judged (a QuickBooks attachment sent with integrations.execute_upload / integrations.executeUpload or the QuickBooks package); a multipart body the caller builds and sends raw to the same route is bytes nothing reads, and is refused with proxy_body_uninspectable (422). A request whose operation cannot be named at all is denied by an operation allowlist itself (403, denied_by.reason set to operation_unclassified), whatever its body; an unreviewed operation the allowlist does not name is denied with operation_unreviewed. An approval cannot hold a binary proxy_request() body, and a streaming call cannot wait for approval: those calls are refused before anything is held. An upload can be approved: it returns a pending approval, and its bytes are delivered afterwards.
When a rule reads a request’s parameters, a request that sends an argument more than once is refused: a form field that takes one value sent more than once, a query parameter that takes one value sent with different values or also sent in the body or a header, a key repeated in a JSON argument or namespace header (such as Dropbox’s Dropbox-API-Arg), or, where Alter reads a body as JSON text, a JSON key repeated in one object (at any depth). A JSON body sent through the SDKs reaches Alter as one object, so each of its keys is read once. A header written under two spellings (such as X-Tenant and x-tenant) is refused before any rule runs, with duplicate_header_spelling. Readers disagree on such a request (some keep the first value, some the last, and servers join repeated headers), so Alter cannot check the value the provider would act on. The call raises PolicyViolationError with denied_by.reason set to duplicate_argument; send each argument once. A parameter that takes a list, sent as a repeated query or form parameter, is unaffected, and so is a request no parameter rule reads.
If a policy cannot be evaluated (the policy engine is unreachable, the inputs are malformed, the policy version drifted), the request is denied. No call is made; no token leaves the vault. The error surfaces as PolicyViolationError with the failure reason on policy_error.
This is the opposite of fail-open systems where a missing policy is treated as “no rule, allow.” Alter treats a missing policy evaluator as “no decision, deny.”
Every policy decision (allow, deny, or error — error meaning the policy gate itself failed to evaluate and the request was denied fail-closed) emits an audit event with the deciding policy metadata and outcome. Projected parameter values are not logged. Denied calls never reach the provider and normally appear in the audit trail as first-class compliance evidence. If audit storage itself fails, the request result is preserved while critical gap telemetry and a fallback audit attempt make the missing record observable; see Security architecture.
What’s next
Section titled “What’s next”- Set policies — a step-by-step walkthrough for authoring each rule type from the dashboard, the CLI, and the SDK.
- Audit logs — where policy decisions are recorded.
- Add human-in-the-loop approvals — policy-driven approval flow.
- Security architecture — the policy engine in the larger picture.
Rules for SDK functions
Section titled “Rules for SDK functions”Policy operation fields also accept the published SDK function IDs listed by
alter integrations operations <provider>. Use when.operation for a
json_match or conditional require_approval rule, or match.operations for
content_match (including redaction and step-up). Conditional approval can also
use when.match.operations with parameter conditions. alter policy simulate --operation <function-id> previews its catalog shape; without request-body proof, shared shapes include sibling rules.
Managed calls carry a server-verified function identity. Alter narrows to that function only when the compiled body cannot satisfy a sibling. Otherwise every sibling rule applies, just as for a raw call. Create calls containing read-only update identifiers are refused with invalid_operation_input. Alter evaluates
policy against the actual method, URL and body after building the request from
the authorized connection. Existing endpoint, method, host, catalog-operation
and family rules continue to apply unchanged.
A raw call can share an endpoint with several SDK functions. It matches all
of those function IDs: a deny or approval rule naming any one of them applies.
A function name never grants permission or bypasses existing restrictions;
Alter’s policy rules only narrow access and do not accept an allow effect.
The portal’s operation picker lists searchable SDK names grouped by product,
alongside the existing catalog operations. alter providers operations list
shows the functions covered by each catalog operation.
GraphQL scoped capabilities and payload capture
Section titled “GraphQL scoped capabilities and payload capture”Narrowly scoped tokens and keys—including Storefront/publishable keys, single-repository clone/deploy keys, runner and pipeline-trigger tokens, and webhook signing/verification secrets—remain subject to your normal policy rules without requiring a credential-minting allowance. When payload capture is enabled, reviewed secret fields are masked in both stored bodies, including response aliases and request literals, variables and defaults. Embedded query strings are masked as a unit. Capture never changes the request sent upstream. A capture that cannot be safely redacted is withheld.
General-account API tokens, OAuth tokens and client secrets, passwords, MFA/recovery codes, SSO signing keys and sign-in or password-setting activation links remain refused by default, as does revoking or uninstalling the connection’s own credential. An explicit credential-minting allowance can permit such a call; its credential-bearing payload is still withheld from capture. Coverage is provider-specific; see the corresponding provider reference.
GraphQL parser migration
Section titled “GraphQL parser migration”Send a full JSON query document by POST and set operationName when the document
contains more than one operation. Use the HTTP method declared by the provider’s GraphQL endpoint;
URL-parameter documents and missing/unreadable documents, including
persisted-query hashes without query text, remain unclassified and fail closed
under an operation/family rule. Requests carrying documentId, id, doc_id or
extensions.persistedQuery remain unclassified even with query text: send only
the full document so policy can verify what the provider will execute. Query
text Alter reads, in the body or a GET URL, is still checked for credential
operations, regardless of these envelope fields. On an endpoint that can return
a credential, a request Alter cannot read in full is refused even without rules
(see GraphQL above). Other extension keys remain accepted.
The 64-level selection/fragment nesting limit remains a parser safety bound.
Each provider admits query, variables, operationName and extensions, plus
any explicitly reviewed envelope keys documented by that provider. Other top-level
keys leave classification unreadable because they may select a different document. Remove them or use
a documented envelope. Inert client-added extensions remain accepted with full
query text. Those metadata values are not schema-inspected, so diagnostic payload
capture is withheld; otherwise valid classification and approval remain available.
Approval summaries list these extra envelope fields as withheld without showing
their values. The query, inspected variables and operation name remain visible,
with sensitive inputs masked; the original request executes unchanged.
Parsing permits up to 500 selected roots and 30,000 tokens (including comments), with a 512 KiB document-source budget
and the existing 5 MiB request-body and nesting bounds. The budgets are shared across
batched and embedded documents, allowing hundreds of aliases and large
code-generated queries while bounding work on the server. Split documents exceeding
those bounds or move large literals into variables. On an endpoint that can return
credentials, exceeding a scan budget returns credential_minting_refused even
without a rule: Alter cannot establish that unseen roots are safe. An exact
allowance cannot lift this incomplete-scan refusal. On other endpoints, ordinary
unclassified-request handling applies. These parser changes require no SDK API changes.
Changing a policy rule body adopts the current per-operation GraphQL semantics; re-applying an identical body preserves the saved meaning. Changing only its name, enabled state or other metadata preserves its existing semantics. Untouched rules retain their pre-rollout meaning.