Token Stores
Token Stores
TokeniseStrategy writes a reversible map from [tok:detector:id] to the original value. That map is sensitive and must be protected like the source PII.
| Driver | Persistence | Typical use |
|---|---|---|
memory |
Process-local | Tests, short scripts, previews |
database |
Eloquent table | Cross-worker detokenisation |
cache |
Laravel cache repository | Redis-backed operational stores |
- Choose tokenise
SetPII_REDACTOR_STRATEGY=tokenise. - Set a salt
SetPII_REDACTOR_SALTfrom secret storage. - Choose a persistent store
SetPII_REDACTOR_TOKEN_STORE=databaseorcache. - Publish migration if using database
Runphp artisan vendor:publish --tag=pii-redactor-migrations && php artisan migrate.