Skip to content

Credential Overview

Credentials are the authentication secrets that non-human identities use to prove their identity when accessing resources. VeraID provides a centralized system for issuing, encrypting, rotating, and revoking credentials across your entire NHI estate.

Credential Format

All credentials issued by VeraID follow a structured format that encodes the environment context directly into the key:

kd_{env}_{random}
SegmentDescriptionValues
kdVeraID prefix (constant)Always kd
{env}Environment indicatorlive, test, jit
{random}Cryptographically secure random string32 characters (a-z, A-Z, 0-9)

Environment Prefixes

PrefixEnvironmentPurpose
kd_live_ProductionProduction workloads with full access to live resources
kd_test_TestDevelopment and staging environments with isolated scope
kd_jit_Just-In-TimeShort-lived temporary credentials with automatic expiration

Examples

kd_live_aB3cD4eF5gH6iJ7kL8mN9oP0qR1sT2u # Production credential
kd_test_xY9zW8vU7tS6rQ5pO4nM3lK2jI1hG0fE # Test credential
kd_jit_tE4mP5oR6aR7yK8eY9cH0aI1nN2oW3vA # JIT temporary credential

Credential Types

VeraID supports six credential types to cover the full spectrum of NHI authentication patterns.

TypeDescriptionTypical Use Case
API_KEYStandard API key for request authenticationREST API access, webhook signatures, service-to-service calls
JWTJSON Web Token with embedded claimsStateless authentication, microservice mesh, token-based flows
OAUTH_TOKENOAuth 2.0 access/refresh token pairThird-party integrations, SSO-connected applications
CERTIFICATEX.509 certificate for mTLS authenticationService mesh, mutual TLS, infrastructure-level identity
SSH_KEYSSH key pair for secure shell accessGit operations, server management, CI/CD deployment
TEMPORARYShort-lived credential with automatic expiryJIT access, break-glass scenarios, time-boxed maintenance

Credential Status

Every credential has a status that reflects its current validity.

StatusDescription
ACTIVECredential is valid and can be used for authentication
ROTATEDCredential has been superseded by a new version; may still be valid during a grace period
REVOKEDCredential has been permanently invalidated and cannot be used
EXPIREDCredential has passed its expiresAt timestamp and is no longer valid
rotate grace period ends
┌──────────┐ ──────────► ┌──────────┐ ──────────────────────► ┌──────────┐
│ ACTIVE │ │ ROTATED │ │ REVOKED │
└──────────┘ └──────────┘ └──────────┘
│ ▲
│ revoke │
├────────────────────────────────────────────────────────────┘
│ time passes
└──────────────────────────────────► ┌──────────┐
│ EXPIRED │
└──────────┘

Encryption at Rest

All credentials are encrypted at rest using AES-256 envelope encryption. This industry-standard approach uses two layers of encryption to protect credential values.

How Envelope Encryption Works

  1. Data Encryption Key (DEK) — Each credential is encrypted with a unique AES-256 key generated at creation time. The DEK never leaves the encryption service.
  2. Key Encryption Key (KEK) — The DEK is itself encrypted by a master key managed in a hardware security module (HSM). The encrypted DEK is stored alongside the encrypted credential.
  3. Decryption — When a credential needs to be verified, the KEK decrypts the DEK, which in turn decrypts the credential value. This operation occurs entirely in memory and is never logged.

Credential Features

TTL and Expiration

Every credential supports an optional expiresAt timestamp. When set, the credential automatically transitions to EXPIRED status after the specified time. This is mandatory for TEMPORARY and jit-prefixed credentials.

{
"type": "TEMPORARY",
"expiresAt": "2026-03-19T18:00:00Z",
"ttlSeconds": 3600
}

Usage Limits

Credentials can be configured with usage limits to restrict the total number of times they can be used for authentication. Once the limit is reached, the credential is automatically revoked.

{
"usageLimit": 1000,
"usageCount": 247
}

Scoped Access

Credentials can be scoped to specific API endpoints, resource types, or actions. Scoped credentials provide defense-in-depth by ensuring that even a compromised credential can only access a limited set of resources.

{
"scopes": [
"identities:read",
"credentials:read",
"audit:read"
]
}

Credential Object

A complete credential object includes the following fields:

{
"id": "crd_9f24d67e-a1b3-4c5d-8e7f-2a3b4c5d6e7f",
"identityId": "idt_3a1f8c29-b7d4-4e2a-9c8f-1d5e7a2b4c6d",
"type": "API_KEY",
"status": "ACTIVE",
"prefix": "kd_live_aB3c",
"lastFour": "T2u",
"scopes": ["identities:read", "credentials:read"],
"usageLimit": 10000,
"usageCount": 1423,
"expiresAt": "2026-06-19T00:00:00Z",
"lastUsedAt": "2026-03-19T08:42:11Z",
"lastUsedIP": "10.0.1.42",
"rotationPolicy": {
"intervalDays": 90,
"gracePeriodHours": 24,
"notifyDaysBefore": 7
},
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-18T22:15:44Z"
}

Creating a Credential

Issue a new credential for an existing identity:

Terminal window
curl -X POST https://app.veraid.io/api/v1/credentials \
-H "Authorization: Bearer kd_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"identityId": "idt_3a1f8c29-b7d4-4e2a-9c8f-1d5e7a2b4c6d",
"type": "API_KEY",
"scopes": ["identities:read", "credentials:read"],
"expiresAt": "2026-06-19T00:00:00Z",
"usageLimit": 10000,
"rotationPolicy": {
"intervalDays": 90,
"gracePeriodHours": 24,
"notifyDaysBefore": 7,
"notifyChannels": ["email", "webhook"]
}
}'

Creation Response

The creation response is the only time the full credential value is returned:

{
"id": "crd_9f24d67e-a1b3-4c5d-8e7f-2a3b4c5d6e7f",
"credential": "kd_live_aB3cD4eF5gH6iJ7kL8mN9oP0qR1sT2u",
"type": "API_KEY",
"status": "ACTIVE",
"prefix": "kd_live_aB3c",
"lastFour": "T2u",
"expiresAt": "2026-06-19T00:00:00Z",
"createdAt": "2026-03-19T10:00:00Z"
}

What’s Next