---
id: "hashicorp_vault_token"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 70
url: "http://registry.apicrafter.io/datatype/hashicorp_vault_token"
---

# HashiCorp Vault token (`hashicorp_vault_token`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Token that authenticates a client to HashiCorp Vault. Since Vault 1.10 the prefix names the token type - hvs. for service tokens, hvb. for batch tokens and hvr. for recovery tokens - and at least 24 random characters follow; service tokens in practice are much longer. Vault 1.9 and earlier used the prefixes s., b. and r., which are too short to recognize reliably and are not covered.

- Parent datatype: `access_token`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^hv[sbr]\.[A-Za-z0-9_.-]{24,}$
```

## Examples

- `s.ExampleTokenNotReal0000` (invalid example) — Legacy format of Vault 1.9 and earlier
- `hvs.TooShort` (invalid example) — Too short

## Supported by tools

- `gitleaks`
- `trufflehog`

## Sources

- doc: <https://developer.hashicorp.com/vault/docs/concepts/tokens>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>
- other: <https://github.com/trufflesecurity/trufflehog/blob/main/pkg/detectors/hashicorpvault/hashicorpvaulttoken/hashicorpvaulttoken.go>
- other: <https://github.com/trufflesecurity/trufflehog/blob/main/pkg/detectors/hashicorpvault/hashicorpvaultbatchtoken/hashicorpvaultbatchtoken.go>

## Quality

Score 70/100. Missing: examples, mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/hashicorp_vault_token.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/hashicorp_vault_token.yaml>
