Add an OIDC trust rule to a service account.
Lets jobs of one GitHub Actions workflow authenticate as the service account by exchanging their GitHub OIDC token, so no long-lived key has to be stored in CI. github is the only provider.
The rule matches a token from the named repository and workflow file, optionally only in one environment and only on matching refs. The server looks up repository_owner on GitHub and stores the owner's numeric id, which the token's repository_owner_id claim must match, so a deleted owner name registered again by someone else does not inherit the trust.
Adding a rule requires a plan with OIDC federation (Business or Enterprise). Requires the serviceAccountTrustRules.create permission, which only the admin and owner roles hold. Personal access tokens and federated tokens are refused whatever their role.
Request
- Base URLhttps://api.shorebird.dev/api/v1
- Auth
- HTTP bearer
- or HTTP bearer
Request body
Response
The newly-added trust rule.
Changes
No recorded changes to this operation across all 1 revision of this API.