Documentation · Administration · Secrets
Sources
Secrets → Sources: the services credentials come from and are checked with. Point the built-in ones at your own instances, and add an API key source for every other service.
What each source checks
| Source | Id | Checks | Revokes at the service |
|---|---|---|---|
| GitHub, GitHub Enterprise | github | Works, exact scopes (classic tokens), expiry, account | Yes, requested |
| GitLab, self-managed | gitlab | Works, exact scopes, expiry, account | Yes |
| Gitea | gitea | Works, account (attested) | No |
| Forgejo | forgejo | Works, account, exact scopes on a recent Forgejo | No |
| Cloudflare | cloudflare | Works, expiry, permission groups when the token may read them | No |
| API key sources | apikey:<key> | Works, with a probe request (attested) | With a revokeUrl |
Every credential is checked when it is added and every six hours after. How each answer becomes a state is on the Credentials page.
Configure a built-in source
Configure on a built-in source sets its Base URL:
| Source | Example | Empty means |
|---|---|---|
| GitHub Enterprise | https://ghe.example.com/api/v3 | github.com |
| Self-managed GitLab | https://gitlab.example.com/api/v4 | gitlab.com |
| Gitea | https://gitea.example.com | gitea.com |
| Forgejo | https://forgejo.example.com | codeberg.org |
| Cloudflare | leave empty | Cloudflare's API |
For Cloudflare account-owned tokens, add accountId=<32-character account id> under Settings.
Credvane only calls public https addresses. To reach a self-managed GitLab, Gitea or Forgejo on your own network, an operator lists its host name or network in CREDVANE_ALLOWED_PRIVATE_HOSTS (see the configuration reference). Link-local addresses and cloud metadata services are never called, and a name that starts resolving to a refused address after it was saved is refused when Credvane connects.
When the address changes
Each credential is pinned to the address its value was added under: the base URL, the …Url settings, and the headers that carry the value (authHeader, authScheme, header.*). Renaming a source or changing deadStatuses is not an address change. When an admin or an API key changes the address:
| Credential | What happens |
|---|---|
| A person's | Held: Credvane sends the value nowhere (no checks, no revocation calls) until the owner confirms the new address on their Credentials page. Applications still read it. Admins cannot confirm for a person. |
| An identity's | Follows the source, since admins can reveal an identity's values anyway |
| Added after the change | Pinned to the new address: whoever adds it agrees to it |
Owners are emailed, admins get a notice with the number held, and the audit log records PROVIDER_CONFIG_SAVED with destinationChanged and each owner's CREDENTIAL_DESTINATION_CONFIRMED. So a legitimate move, such as a new GitHub Enterprise host, needs each person to confirm once: tell them before you change it.
To put address changes through your own change management, manage sources with Terraform and review them like any other infrastructure change. The pin is the backstop for a change that skips that review.
Add an API key source
- Add API key source, and Start from one of 25 presets (OpenAI, Anthropic, Datadog, npm, Vercel and more) or leave it blank.
- Key: a short id such as
datadogordatadog-eu. Specs refer to the source asapikey:<key>; it cannot change. - Name: what people see.
- Check the Settings, one
key=valueper line. A spec cannot use the source until it has aprobeUrl.
| Setting | Default | Meaning |
|---|---|---|
probeUrl | required | Credvane sends GET here with the key. Pick a cheap endpoint that needs authentication and changes nothing. |
authHeader | Authorization | The header that carries the key |
authScheme | Bearer | The word before the key; none sends the key alone; Basic sends user:secret as Basic auth |
header.<Name> | – | A fixed extra header |
deadStatuses | 401,403 | Answers that mean the key is refused |
revokeUrl, revokeMethod | –, DELETE | Where a key revokes itself, called when a credential is revoked or replaced |
A bearer token, the default:
probeUrl=https://api.example.com/v1/meThe key alone in its own header, plus a fixed version header:
probeUrl=https://api.anthropic.com/v1/models
authHeader=x-api-key
authScheme=none
header.anthropic-version=2023-06-01A service whose keys can revoke themselves:
probeUrl=https://api.example.com/v1/keys/self
revokeUrl=https://api.example.com/v1/keys/self
revokeMethod=DELETEA source can be deleted while no spec uses it.
Terraform
credvane_source configures a built-in source, credvane_apikey_source manages an API key source, and the credvane_source data source reads any of them.
# Point the built-in GitHub source at GitHub Enterprise.
# Destroying this resets the settings; the github source stays.
resource "credvane_source" "github" {
id = "github"
base_url = "https://ghe.example.com/api/v3"
}
# An API key source per service.
resource "credvane_apikey_source" "datadog" {
key = "datadog"
name = "Datadog"
settings = {
probeUrl = "https://api.datadoghq.com/api/v1/validate"
authHeader = "DD-API-KEY"
authScheme = "none"
}
}
data "credvane_source" "gitlab" {
id = "gitlab"
}