fossa_create_oidc_trust_relationship
Create an OIDC trust relationship to grant workloads password-less login to FOSSA as a specified service account, verified by required claims.
Instructions
Grant a workload permanent password-less login to FOSSA as a specific service account, on the strength of an OIDC token.
WRITES TO FOSSA. Requires FOSSA_ALLOW_WRITES=true and FOSSA_ALLOW_ADMIN=true.
Read that first line literally. After this call, anything that can obtain a
token from provider_id whose claims match required_claims can exchange it
for a FOSSA API token belonging to user_id, with that account's
permissions, indefinitely and without a password. Enabling the ADMIN tier on
a server that does not authenticate its callers means every caller can
create such a grant.
required_claims is a list of objects: claim (the claim name), value
(string, number, or boolean), and optional hasWildcards (when true, *
matches any run of characters and ? matches one). It must pin sub — the
subject identifying the workload, such as
repo:acme/service:ref:refs/heads/main. A sub value consisting only of
wildcards is refused here, because it would match every subject the issuer
ever signs. audiences lists the aud values FOSSA will accept.
Find user_id with fossa_list_oidc_provider_service_accounts. Use
scope="team" with scope_id for a team-scoped grant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | org | |
| user_id | Yes | ||
| scope_id | No | ||
| audiences | Yes | ||
| provider_id | Yes | ||
| required_claims | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||