sylphx broker trust_policies
Every sylphx broker trust_policies command: its argument, its flags and a run line.
The trust_policies commands of Sylphx Broker, as the CLI spells them: the same
calls as the trust_policies API page, typed for the
shell. Install, sign in and the grammar are on the CLI index.
get
Gets a trust policy.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx broker trust-policies get orgs/acme/trust_policies/trust-policyGET https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy · scope broker:read · effect read · Request, response and examples
list
Lists an org's trust policies.
PARENT — optional: the CLI fills it from the linked project or the
key's scope when it is left out.
CLI
sylphx broker trust-policies list orgs/acmeGET https://api.sylphx.com/v1/orgs/acme/trust_policies · scope broker:read · effect read · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--page-size | int | At most this many; default 50, clamped to 1000. |
--page-token | string | next_page_token of the previous page. |
--filter | string | AIP-160 filter over labels and filterable fields. |
--order-by | string | AIP-132 ordering over filterable fields. |
create
Creates a trust policy.
ID — The id segment of the new Resource's name; the server assigns one when omitted.
CLI
sylphx broker trust-policies create --parent orgs/acme --spec.connection … --spec.credential-kind access_tokenPOST https://api.sylphx.com/v1/orgs/acme/trust_policies · scope broker:admin · effect write · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--parent | string | The parent to create in; defaults to the linked project or the key's scope. |
--meta.labels | key=value | Caller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value. |
--meta.annotations | key=value | Caller-writable, unindexed annotations. Repeat the flag for each value. |
--meta.display-name | string | Caller-writable human-readable name. |
--spec.connection | string | The Connection credentials are issued on: An active GitHub installation, GitHub user, OAuth 2.0, or Web Push Connection in the same org. Required. |
--spec.subjects | string | The Access principals allowed to exchange, orgs/{org}/principals/{id} in the policy's org: the caller's own principal, or the accountable principal of a delegated grant. 1 to 64. Required. Repeat the flag for each value. |
--spec.permissions | key=value | Empty for a VAPID assertion or generic OAuth 2.0 Connection. Otherwise the GitHub permission ceiling, for example {"contents": "write", "pull_requests": "write"}. administration is read only; organization permissions are refused. A policy with actors carries at most contents and pull_requests. Repeat the flag for each value. |
--spec.repositories | string | Empty for a VAPID assertion or generic OAuth 2.0 Connection. Otherwise 1 to 1000 exact owner/name entries, no wildcard, each owned by the Connection's account. One exchange covers exactly one repository. Repeat the flag for each value. |
--spec.credential-kind | enum | What Broker issues: access_token or vapid_assertion on the wire. Required. One of access_token, runner_registration, vapid_assertion. |
--spec.max-ttl | duration | The longest a credential lives: GitHub default/maximum 3600s; OAuth 2.0 and VAPID default/maximum 86400s (capped by upstream expiry). Positive whole seconds only for VAPID. |
--spec.actors | string | The Agents a delegated grant may act for: an Agent name orgs/{org}/projects/{project}/envs/{env}/agents/{agent}, or every Agent of an environment, .../envs/{env}/agents/*. 0 to 64. When set, only a delegated grant whose actor matches may exchange; a grant with no actor is refused. When empty, any grant of a subject may exchange, delegated or not. Repeat the flag for each value. |
--spec.github-action-budget.per-minute | int | Maximum admissions in a rolling 60-second window; 1 to 80. |
--spec.github-action-budget.per-hour | int | Maximum admissions in a rolling 3600-second window; 1 to 500. |
--spec.oauth-scope-ceiling | string | Optional OAuth 2.0 scope ceiling. When set, the Broker only issues tokens whose provider-reported scopes are entirely in this list. Empty authorizes the full grant of the referenced OAuth 2.0 Connection and does not permit requests for explicit scopes. Other kinds leave it empty. Repeat the flag for each value. |
--dry-run | bool | Validate and print the result without writing (validate_only). |
update
Updates a trust policy.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx broker trust-policies update orgs/acme/trust_policies/trust-policy --spec.connection … --spec.credential-kind access_tokenPATCH https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy · scope broker:admin · effect write · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--meta.labels | key=value | Caller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value. |
--meta.annotations | key=value | Caller-writable, unindexed annotations. Repeat the flag for each value. |
--meta.display-name | string | Caller-writable human-readable name. |
--spec.connection | string | The Connection credentials are issued on: An active GitHub installation, GitHub user, OAuth 2.0, or Web Push Connection in the same org. Required. |
--spec.subjects | string | The Access principals allowed to exchange, orgs/{org}/principals/{id} in the policy's org: the caller's own principal, or the accountable principal of a delegated grant. 1 to 64. Required. Repeat the flag for each value. |
--spec.permissions | key=value | Empty for a VAPID assertion or generic OAuth 2.0 Connection. Otherwise the GitHub permission ceiling, for example {"contents": "write", "pull_requests": "write"}. administration is read only; organization permissions are refused. A policy with actors carries at most contents and pull_requests. Repeat the flag for each value. |
--spec.repositories | string | Empty for a VAPID assertion or generic OAuth 2.0 Connection. Otherwise 1 to 1000 exact owner/name entries, no wildcard, each owned by the Connection's account. One exchange covers exactly one repository. Repeat the flag for each value. |
--spec.credential-kind | enum | What Broker issues: access_token or vapid_assertion on the wire. Required. One of access_token, runner_registration, vapid_assertion. |
--spec.max-ttl | duration | The longest a credential lives: GitHub default/maximum 3600s; OAuth 2.0 and VAPID default/maximum 86400s (capped by upstream expiry). Positive whole seconds only for VAPID. |
--spec.actors | string | The Agents a delegated grant may act for: an Agent name orgs/{org}/projects/{project}/envs/{env}/agents/{agent}, or every Agent of an environment, .../envs/{env}/agents/*. 0 to 64. When set, only a delegated grant whose actor matches may exchange; a grant with no actor is refused. When empty, any grant of a subject may exchange, delegated or not. Repeat the flag for each value. |
--spec.github-action-budget.per-minute | int | Maximum admissions in a rolling 60-second window; 1 to 80. |
--spec.github-action-budget.per-hour | int | Maximum admissions in a rolling 3600-second window; 1 to 500. |
--spec.oauth-scope-ceiling | string | Optional OAuth 2.0 scope ceiling. When set, the Broker only issues tokens whose provider-reported scopes are entirely in this list. Empty authorizes the full grant of the referenced OAuth 2.0 Connection and does not permit requests for explicit scopes. Other kinds leave it empty. Repeat the flag for each value. |
--dry-run | bool | Validate and print the result without writing (validate_only). |
delete
Deletes a trust policy.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx broker trust-policies delete orgs/acme/trust_policies/trust-policy --yesDELETE https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy · scope broker:admin · effect destructive · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--etag | string | Delete only if the current etag matches. |
--dry-run | bool | Validate and print the result without writing (validate_only). |
--yes | bool | Do not ask before this destructive call. |
exchange-token
Exchanges the caller's Access grant for a short-lived provider credential under a trust policy. For OAuth 2.0, returns only the upstream access token, never the refresh token or client credentials. For a repository installation, returns a token narrowed to one repository and its requested permissions. Callers must satisfy the policy's subject and actor restrictions. Each successful issuance writes one TokenExchange.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx broker trust-policies exchange-token orgs/acme/trust_policies/trust-policyPOST https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy:exchangeToken · scope broker:exchange · effect write · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--permissions | key=value | The permissions this call needs, at most the policy's; empty means the policy's. Repeat the flag for each value. |
--repositories | string | The one repository this call needs, owner/name, one of the policy's; leave empty for non-repository Connections such as OAuth 2.0. Repeat the flag for each value. |
--ttl | duration | How long the credential should live, at most the policy's max_ttl. A GitHub installation token always lives one hour: unset or 3600s. |
--oauth-scopes | string | OAuth 2.0 only. If nonempty, the token must grant exactly these scopes, all of which must be within the policy's OAuth scope ceiling. Repeat the flag for each value. |
exchange-read-token
Exchanges the caller's Access grant for a read-only GitHub App installation token. Requires the explicit broker:exchange:read scope on this policy, with the same subject, actor, Connection and repository checks as ExchangeToken. Every resolved permission must be read-only: omitting permissions inherits the policy and is refused if it has writes. The provider's returned permissions must confirm the requested ceiling. Writes one TokenExchange audit record; broker:read cannot issue tokens.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx broker trust-policies exchange-read-token orgs/acme/trust_policies/trust-policyPOST https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy:exchangeReadToken · scope broker:exchange:read · effect write · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--permissions | key=value | The permissions this call needs, at most the policy's; empty means the policy's. Every resolved permission must be read-only. Repeat the flag for each value. |
--repositories | string | The one repository this call needs, owner/name, one of the policy's; leave empty for non-repository Connections such as OAuth 2.0. Repeat the flag for each value. |
--ttl | duration | How long the credential should live, at most the policy's max_ttl. A GitHub installation token always lives one hour: unset or 3600s. |
open-github-pull-request
Opens a pull request as the user authorized by the policy's GitHub user Connection. Credentials remain inside Broker. Requires an exact repository, policy subject and actor, and pull_requests=write. Fork heads are refused.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx broker trust-policies open-github-pull-request orgs/acme/trust_policies/trust-policyPOST https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy:openGitHubPullRequest · scope broker:github:pull_requests:create · effect write · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--repository | string | One exact owner/name from the policy's repository list. Required. |
--head | string | Existing branch in repository. Cross-fork owner:branch syntax is refused. Required. |
--base | string | Existing target branch in repository. Required. |
--title | string | Pull request title. Required. |
--body | string | Pull request description. |
--draft | bool | Whether to create a draft. |