Skip to content

Environment variables ​

All settings are prefixed PALENA_PSEUDONYMIZER_. The service validates them on startup and exits on invalid values.

Runtime ​

VariableDefaultNotes
HTTP_ADDR:8080Bind address.
LOG_LEVELinfodebug | info | warn | error.
LOG_FORMATjsonjson | text.
MAX_REQUEST_BYTES33554432Request body cap (32 MiB).
API_KEY(empty)Required x-api-key value; empty = accept all.
SHUTDOWN_TIMEOUT30sGraceful drain period.

Detection engine & NER service ​

VariableDefaultNotes
DETECTION_ENGINEpresidioner: names from the NER service, pattern types from Presidio (the chart's default). presidio: everything from Presidio. See Configuration → Detection engine.
NER_URLhttp://ner:3000NER service base URL (ner engine).
NER_TIMEOUT_SECONDS10sPer-request timeout.
NER_THRESHOLD0.9Minimum span confidence; ENTITY_SCORE_THRESHOLD overrides per type.
NER_ENTITY_LABELSPERSON:person|full_name|first_name|last_name,ORGANIZATION:organizationEntity type → model labels. Only types also in PRESIDIO_ENTITIES are asked.
NER_CHUNK_CHARS1000Each line is analyzed on its own; longer lines are cut into windows of this many characters.
NER_CHUNK_OVERLAP150Characters consecutive windows share. Below NER_CHUNK_CHARS / 2.
NER_BATCH_SIZE16Texts per HTTP call to the NER service. Each batch is cached as soon as it returns.
NER_PARALLEL1Batches of one request in flight at once (1–32). The NER service runs one inference at a time per pod — match its replica count.
NER_CACHE_ENTRIES500000Per-pod cache of what the model found in a line (SHA-256 keys, ~200 bytes per entry, ~100 MiB full). At the cap the least recently used entry makes room. 0 = off.
NER_CACHE_TTL1hHow long a cached line is used after it was stored. 0 = off.

Presidio ​

VariableDefaultNotes
PRESIDIO_ANALYZER_URLhttp://presidio-analyzer:5001Text detection service.
PRESIDIO_IMAGE_REDACTOR_URLhttp://presidio-image-redactor:5003Image detection service.
PRESIDIO_TIMEOUT_SECONDS10Per-request timeout.
PRESIDIO_SCORE_THRESHOLD0.7Minimum detection confidence, [0,1].
PRESIDIO_ENTITIESPERSON,ORGANIZATIONEntity types to detect. Add structured PII (CREDIT_CARD, US_SSN, EMAIL_ADDRESS, …) to opt in. LOCATION excluded by default.
ENTITY_SCORE_THRESHOLDPHONE_NUMBER:0.4Per-type minimum confidence, overriding PRESIDIO_SCORE_THRESHOLD: TYPE:score,…. Presidio scores every phone number 0.4, so the default keeps PHONE_NUMBER maskable.
PRESIDIO_LANGUAGEenLanguage forwarded to Presidio when PRESIDIO_LANGUAGES is empty; with the ner engine, the language of the pattern recognizers.
PRESIDIO_LANGUAGES(empty)presidio engine only. Several ISO 639-1 codes (en,de,fr,it): each text is classified among them and analyzed in its own language; the first is the fallback. Presidio needs a model for each. See Configuration → Languages.
ENTITY_STRATEGY_DEFAULTtokenStrategy for enabled non-nominal types: pool (fictional value) or token (<TYPE_N> placeholder).
ENTITY_STRATEGY(empty)Per-type overrides, e.g. PHONE_NUMBER:pool,CREDIT_CARD:token. Nominal types (PERSON/ORGANIZATION/LOCATION) default to pool. See Substitution strategy.

Redis ​

VariableDefaultNotes
REDIS_URLredis://redis:6379/0Connection URL.
REDIS_SESSION_TTL_SECONDS3600Mapping lifetime, refreshed on access.
REDIS_KEY_PREFIXpalena:pseudonymizerKey namespace.
REDIS_TIMEOUT_SECONDS2Per-command timeout.
REDIS_POOL_SIZE10Connection pool size.

Text & session ​

VariableDefaultNotes
SESSION_METADATA_KEYsession_idMetadata field read for the session id.
DECOMPOSE_PERSON_NAMEStrueRegister first/last-name sub-mappings.
ALLOW_LIST(empty)Comma-separated terms never pseudonymized even when detected — brand/product names, public figures, words a detector over-tags. Case-insensitive, also with a short inflection ending (Linuxra). See Configuration → Allow-list.
ALLOW_LIST_BUILTINtrueAdd the built-in list of product, platform and tool names that are not also people's names.
DENY_LISTS(empty)JSON [{"entity":"PERSON","terms":["Project Falcon"]}]: terms always pseudonymized as that type. Matched by the service for the types the ner engine's model serves; Presidio's recognizers match the rest. The chart renders it from presidio.analyzer.denyLists.
DETERMINISTIC_SECRET(empty)When set, pool assignment uses a keyed HMAC of the real value so the same name maps to the same pseudonym across sessions. Token entities unaffected. Treat as a secret. See Configuration → Deterministic pseudonyms.
POOL_PERSON(unisex names)Comma-separated person pseudonyms.
POOL_ORGANIZATION(neutral orgs)Comma-separated org pseudonyms.
POOL_LOCATION(neutral places)Used only if LOCATION is enabled.

Non-text content (images) ​

VariableDefaultNotes
NON_TEXT_PII_ACTIONredactredact | block | passthrough.
MAX_IMAGE_BYTES20971520Per-image cap (20 MiB).
MAX_IMAGES_PER_REQUEST20Request-level image limit.

Deploying with Helm?

The chart maps these to friendly values.yaml keys — you rarely set the raw env vars by hand. See Deploy with Helm.

Released under the Apache 2.0 License.