For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/resources/serviceaccount/index.md.

ServiceAccount and IdentityProvider

A non-human identity your CI or automation becomes, with no stored secret: it trusts an external issuer, not a password.

A ServiceAccount is an identity that is not a person: the thing a CI pipeline, a scheduled job, or a piece of automation signs in as. You create it, scope it with ordinary RBAC, audit it, and revoke it.

apiVersion: core.ringleader.dev/v1
kind: ServiceAccount

Its subject is sa:<namespace>/<name>, always namespace-qualified. Service accounts and CI sign-in explains how one works, from creating it to turning it off.

IdentityProvider

The trust anchor. It names the external issuer and the limit on what a trust rule can pin.

apiVersion: core.ringleader.dev/v1
kind: IdentityProvider
metadata:
  name: acmecorp-github     # must be, or start with, the owning org's name
spec:
  org: acmecorp
  profile: github-actions
  allowClaims: ["environment", "job_workflow_ref"]
FieldTypeDescription
orgstringRequired. The owning organization.
profilestringRequired. The ecosystem this provider represents: github-actions, gitlab-ci, gcp, aws, azure, spiffe, ringleader-workstation, or custom.
issuerstringThe issuer URL. Required for custom, and for any profile whose issuer is per-tenant or per-instance (self-hosted GitLab, Azure, an EKS cluster). Fixed by the profile otherwise, and a conflicting value is refused rather than silently overridden.
audiencestringThe audience a trust rule may name. Optional: the deployment already publishes the audience it answers to. A value here may only narrow within what the deployment accepts.
requireClaims[]stringExtra claims every rule under this provider must pin, on top of the profile’s own mandatory ones. It can only tighten. Required (non-empty) for custom.
allowClaims[]stringClaims a rule may pin beyond the mandatory ones. It never restates the mandatory claims.
enabledboolMaster switch for the whole trust anchor. Absent means enabled; false refuses every exchange through it.

Service accounts and CI sign-in lists the profiles, with the claims a rule must pin for each, the rule for a provider’s name and who may write one.

ServiceAccount

apiVersion: core.ringleader.dev/v1
kind: ServiceAccount
metadata:
  name: ci
  namespace: dev
spec:
  description: Builds and tests the platform repo
  trust:
    - provider: acmecorp-github
      match:
        repository_owner_id: "1234567"
        repository_id: "7654321"
        environment: production
FieldTypeDescription
descriptionstringWhat this identity is for. Worth writing, since it is what a reader sees months later.
enabledboolMaster switch. Absent means enabled; false refuses every sign-in immediately, without deleting the account or its permissions.
trust[]objectThe trust list. See below.

Trust rules

Each entry of spec.trust is one external identity allowed to become this account.

FieldTypeDescription
providerstringRequired. The IdentityProvider this rule trusts.
audiencestringOptional. Narrows the accepted audience for this rule within what the deployment accepts.
matchobjectThe claims this rule pins, as exact values.
matchPrefixobjectClaims pinned by SPIFFE ID path prefix instead. Only the spiffe profile’s sub accepts one.

A rule must pin something: use match or matchPrefix, never both in one rule.

Service accounts and CI sign-in says how a rule matches, what the SPIFFE path prefix does and how to give an account rights.

Status fields

The system writes these.

FieldTypeDescription
lastAssumedAtstringWhen something last signed in as this account. Absent if nothing ever has.
lastAssumedByobjectWho did: {provider, ruleIndex, claims}: the trust anchor, which rule admitted them, and the identity claims worth showing.
authorityReasonstringWhy the account has been suspended, when it has. Absent on a healthy one.
conditions[]objectCarries Unused; see below.

The Unused condition

Every account publishes an Unused condition, answering “should someone look at this?”. Its reason says which of four situations it is:

ReasonStatusMeaning
RecentlyUsedFalseUsed within the last 30 days. Healthy.
NotYetUsedFalseNever used, but created within the last 30 days. A pipeline that has not run yet looks exactly like this, so it is not flagged.
NotUsedRecentlyTrueUsed, but not for over 30 days.
NeverUsedTrueNever used at all, and created over 30 days ago. This is the most suspicious of the four: an identity nothing has ever needed, still usable.

Service accounts and CI sign-in says what the condition does and does not do, when an account is suspended, how to check one and how to turn one off.

Next steps