ENV_NAME other than development. — means the service applies no default. A variable flagged Sensitive. carries credential or key material. Inject it from your secret manager at deploy time. Never commit a value.
Where a value in the shipped example file differs from the value the code applies, this page publishes the code value.
Service and runtime
Permission declaration
The service publishes its BC Correios permissions to Access Manager only whenIDP_DECLARATION_ENABLED is true. It is off by default.
The declaration also needs
PLUGIN_AUTH_ENABLED set to true and PLUGIN_AUTH_ADDRESS. A missing value stops the boot.
With PLUGIN_AUTH_ENABLED set to true, the service also publishes its scope catalog and partner opt-in when IDP_DECLARATION_ENABLED is false. It uses IDP_HOST, IDP_M2M_CLIENT_ID, IDP_M2M_CLIENT_SECRET and the Access Manager address. When one of the three IDP_* variables is empty, the service starts but does not publish the scope catalog, and Access Manager refuses BC Correios partners.
License
Lerian BC Correios needs a license in every environment. It does not start withoutLICENSE_FILE_PATH or LICENSE_KEY. The license covers the whole deployment. With LICENSE_KEY, if the license service does not answer and no valid stored license exists, the service stays up, not ready, and keeps retrying. With LICENSE_KEY, the service stores the accepted license in PostgreSQL. After a restart, it starts from the stored license while that license is valid.
CORS and proxies
PostgreSQL
Cache (Valkey)
The cache holds idempotency keys, rate-limit counters, the shared BACEN request quota, and the attachment download budget.Kafka broker (events)
Lerian BC Correios publishes its events to a Kafka broker. It does not start withoutSTREAMING_BROKERS. A broker that is down does not stop the service. The shared STREAMING_* settings are in Streaming and outbox.

