Skip to content
Console
Menu

Getting Started

Authentication

KV Store

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

Shell
sylphx broker trust-policies get orgs/acme/trust_policies/trust-policy

GET 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

Shell
sylphx broker trust-policies list orgs/acme

GET https://api.sylphx.com/v1/orgs/acme/trust_policies · scope broker:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter over labels and filterable fields.
--order-bystringAIP-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

Shell
sylphx broker trust-policies create --parent orgs/acme --spec.connection … --spec.credential-kind access_token

POST https://api.sylphx.com/v1/orgs/acme/trust_policies · scope broker:admin · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.connectionstringThe Connection credentials are issued on: orgs/{org}/connections/github-{installation_id}, an active installation of the platform's GitHub App in the same org. Required.
--spec.subjectsstringThe 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.permissionskey=valueThe most a credential may carry, in GitHub repository permission names, 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. Required. Repeat the flag for each value.
--spec.repositoriesstringThe repositories a credential may cover, owner/name, 1 to 100, every one owned by the Connection's account. One exchange covers exactly one. Required. Repeat the flag for each value.
--spec.credential-kindenumWhat the credential service issues; access_token on the wire. Required. One of access_token, runner_registration.
--spec.max-ttldurationThe longest a credential lives; default and maximum 1 hour.
--spec.actorsstringThe 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.
--dry-runboolValidate 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

Shell
sylphx broker trust-policies update orgs/acme/trust_policies/trust-policy --spec.connection … --spec.credential-kind access_token

PATCH https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy · scope broker:admin · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.connectionstringThe Connection credentials are issued on: orgs/{org}/connections/github-{installation_id}, an active installation of the platform's GitHub App in the same org. Required.
--spec.subjectsstringThe 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.permissionskey=valueThe most a credential may carry, in GitHub repository permission names, 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. Required. Repeat the flag for each value.
--spec.repositoriesstringThe repositories a credential may cover, owner/name, 1 to 100, every one owned by the Connection's account. One exchange covers exactly one. Required. Repeat the flag for each value.
--spec.credential-kindenumWhat the credential service issues; access_token on the wire. Required. One of access_token, runner_registration.
--spec.max-ttldurationThe longest a credential lives; default and maximum 1 hour.
--spec.actorsstringThe 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.
--dry-runboolValidate 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

Shell
sylphx broker trust-policies delete orgs/acme/trust_policies/trust-policy --yes

DELETE https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy · scope broker:admin · effect destructive · Request, response and examples

Flags

FlagTypeWhat it does
--etagstringDelete only if the current etag matches.
--dry-runboolValidate and print the result without writing (validate_only).
--yesboolDo not ask before this destructive call.

#exchange-token

Exchanges the caller's Access grant for a short-lived provider credential under a trust policy (RFC 8693 token exchange): a GitHub App installation token for exactly one of the policy's repositories, narrowed to the requested permissions. The grant's principal (for a delegated grant, its accountable principal) must be a policy subject, its actor must match the policy's actors, and it must hold broker:exchange on this policy. Every call writes one TokenExchange record. A permission the Connection lacks is PERMISSION_DENIED with reason CapabilityMissing, never an outage.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx broker trust-policies exchange-token orgs/acme/trust_policies/trust-policy

POST https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy:exchangeToken · scope broker:exchange · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--permissionskey=valueThe permissions this call needs, at most the policy's; empty means the policy's. Repeat the flag for each value.
--repositoriesstringThe one repository this call needs, owner/name, one of the policy's. Required. Repeat the flag for each value.
--ttldurationHow long the credential should live, at most the policy's max_ttl. A GitHub installation token always lives one hour: unset or 3600s.