Documentation · Administration · Identities
Identities
Identities → Identities: service identities that own credentials for a team, an application or an agent, and the trust policies and exchange tokens that act as them.
The list
| Column | Shows |
|---|---|
| Name | The identity, for example api-deploy |
| Status | Active, or deactivated |
| Holds | How many credentials it owns |
| Can authenticate | Its trust policies and active exchange tokens; none means nothing can read as it yet |
| Needs attention | Warnings, such as a policy that may read a spec the identity holds no value for |
Create an identity
New identity walks through three steps:
- Identity: a name such as
api-deploy, and under May read the specs a workload acting as it will read. - Who may act as it: the issuer that mints the workload's token (GitHub Actions, GitLab CI, or one added on Issuers), the required claims, the audience (Credvane's address plus
/w/<identity id>by default) and an optional maximum token age. Or choose Nothing yet to create the identity only. - Done: a ready workflow snippet for the issuer, and the specs that still need a value.
Then open the identity and add a value for each spec on its Credentials tab. Until then, a read of that spec answers 404.
The identity's page

| Tab | What you do there |
|---|---|
| Credentials | Add, replace, reveal and revoke the identity's values, as on a person's Credentials page |
| Trust policies | Add, edit, switch off and delete policies; Workflow snippet shows how a job uses one |
| Exchange tokens | Tokens for applications without a platform identity, as on the Exchange tokens page |
Rename changes its name. Deactivate refuses every read by its policies and tokens at once; its credentials stay, so Reactivate brings it back. An identity is never deleted, so the audit trail always has it.
Trust policy examples
| Who may read | Issuer | Required claims |
|---|---|---|
Jobs on main in one GitHub repository | GitHub Actions | repository=example-org/api, ref=refs/heads/main |
| Release tags only | GitHub Actions | repository=example-org/api, ref=refs/tags/v* |
| One GitLab project's protected branches | GitLab CI (gitlab.com) | project_path=example-org/api, ref_protected=true |
| One Buildkite pipeline | https://agent.buildkite.com, added on Issuers as another OIDC issuer | organization_slug=example, pipeline_slug=deploy |
| Pods of one service account | Your Kubernetes cluster | sub=system:serviceaccount:payments:api |
- Claims match exactly, or with
*as a wildcard. On a shared issuer (GitHub Actions, gitlab.com, Buildkite) the policy must pin your account with no*in the owner part:repository=example-org/*is fine,repository=*/*is refused. On other issuers, at least one claim must have no*. - Names can be reused after an organization is renamed or deleted: prefer
repository_owner_idon GitHub andnamespace_idon GitLab where you can. - Set a maximum token age (for example 15 minutes) for issuers whose tokens live long; Keycloak's last an hour by default.
- When two policies could match the same token, the list warns you. Such a read gets
409unless it names the policy with?policy=<name>.
A GitHub Actions job using the policy above, with the Credvane action:
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: commitwisedev/credvane-action@v1
with:
url: https://credvane.example.com
identity: 0f3b6c1e-...
credentials: github-packages=NPM_TOKEN
- run: npm publishTerraform
Identities and trust policies are resources of the Terraform provider. Destroying an identity deactivates it.
resource "credvane_identity" "api_deploy" {
name = "api-deploy"
}
data "credvane_issuer" "github" {
name = "GitHub Actions"
}
resource "credvane_workload_trust" "api_deploy_main" {
name = "api-deploy-main"
issuer = data.credvane_issuer.github.url
audience = "https://credvane.example.com/w/${credvane_identity.api_deploy.id}"
identity = credvane_identity.api_deploy.name
specs = ["github-packages", "datadog-api"]
claims = {
repository = "example-org/api"
ref = "refs/heads/main"
}
max_token_age_minutes = 15
}Credential values are never managed in Terraform: add them on the identity's Credentials tab.
