Service accounts and CI¶
A service account is a machine identity that belongs to a tenant. Use one for CI pipelines,
Terraform, docker login and calls to the AI endpoints.
Create¶
Service accounts → Create: a name and an expiry (at most one year). The token is shown once; store it in your secret manager. A lost or expired token is replaced with Rotate, which issues a new one and revokes the old.
Get an access token¶
Exchange the account for a short-lived OAuth access token:
curl -s https://auth.theorigamicorporation.com/application/o/token/ \
-d grant_type=client_credentials \
-d client_id=FdPqdka22aPG9AnWuVMpFhsz7BGsgJCbxTCTkXrg \
-d username="$RSO_SERVICE_ACCOUNT_NAME" \
-d password="$RSO_SERVICE_ACCOUNT_SECRET" \
-d scope=profile | jq -r .access_token
Send it as Authorization: Bearer <token> with X-Tenant: <tenant-id>.
GitHub Actions¶
- uses: theorigamicorporation/auth@v1
with:
service_account_name: ${{ secrets.RSO_DEV_SERVICE_ACCOUNT_NAME }}
service_account_secret: ${{ secrets.RSO_DEV_SERVICE_ACCOUNT_SECRET }}
# later steps can read $RSO_DEV_ACCESS_TOKEN
Terraform¶
# A machine identity for CI. The token is only available at creation.
resource "rso_service_account" "ci" {
name = "tf-example-ci"
expires_at = "2027-06-30T00:00:00Z"
}
output "ci_token" {
value = rso_service_account.ci.token
sensitive = true
}