prod-guard-oss

Back to index

Configuration

This document describes all configuration options available in prod-guard, how they affect runtime behavior, and recommended values for production environments.

prod-guard is configured using standard Spring Boot properties, either via:


Configuration Overview

All prod-guard settings are namespaced under:

prodguard:

Configuration is divided into the following areas:


Core Configuration

Enable / Disable prod-guard

prodguard:
  enabled: true

Property: prodguard.enabled

Default: true

Enables or disables prod-guard entirely. If disabled, no checks will be executed.


Force execution outside production

By default, prod-guard only runs when a production profile is active.

Recognized production profiles:

To force execution in other environments:

prodguard:
  force: true

Property: prodguard.force

Default: false

Recommended for CI pipelines, staging environments, or pre-production validation.


License Configuration

prod-guard supports signed license files for enabling premium checks.

License file path

prodguard:
  license:
    path: ./prodguard.lic

Property: prodguard.license.path

Required: Yes (for PREMIUM checks)

If this property is not present, prod-guard runs in FREE mode.


License behavior

All invalid scenarios emit explicit diagnostic log messages.


License expiration warnings

prod-guard emits warnings when the license is approaching expiration.

[prod-guard] License expires in 14 days (licensee: Vicente_Lopez)

Severity Configuration

Each prod-guard check has a default severity which can be overridden.

prodguard:
  severity:
    PG-011: WARN
    PG-012: DISABLED

Available severities:


Execution Behavior

Report-only mode

prodguard:
  report-only: true

Property: prodguard.report-only

Default: false

When enabled, blocking issues are reported but the application continues to start.


Logging Behavior

Typical startup logs:

[prod-guard] discovered 22 checks
[prod-guard] premium license validated for Vicente_Lopez
[prod-guard] executing 13 checks
[prod-guard] 6 issues detected (blocking: false)

Recommended Production Configuration

spring:
  profiles:
    active: prod

prodguard:
  enabled: true
  force: false
  report-only: false

  license:
    path: /etc/prodguard/prodguard.lic

  severity:
    PG-011: WARN
    PG-012: ERROR

Next Steps

Back to index