Skip to main content

Configuration

All configuration properties support Spring Boot's standard configuration mechanisms (application.yml, environment variables, etc.).

HTTP security checks support PATCH requests and use the configured connect and read timeouts. Redirects are not followed: the scanner evaluates the response of the requested endpoint itself.

PropertyDescriptionDefaultRequired
jeap.governance.environmentEnvironment of the service(DEV, REF, ABN, PROD).-Yes
jeap.governance.archrepo.urlURL of the Architecture Repository-Yes
jeap.governance.dataimport.cron-expressionCron expression to schedule the data import job0 15 6,10,14,18 * * MON-FRINo
jeap.governance.dataimport.lock-at-leastMinimum duration the lock of the data import job is held, also when the import ends soonerPT15MNo
jeap.governance.dataimport.lock-at-mostMaximum lock duration of the data import job: how long a lock left behind by an instance that did not end the import staysPT1HNo
jeap.governance.archrepo.timeoutConnection timeout for Architecture Repository integrationPT5MNo
jeap.governance.archrepo.import.apidocversion.enabledEnable/disable import of API documentation versions from ArchRepotrueNo
jeap.governance.archrepo.import.databaseschemaversion.enabledEnable/disable import of database schema versions from ArchRepotrueNo
jeap.governance.archrepo.import.restapirelationwithoutpact.enabledEnable/disable import of REST API relations without Pact from ArchRepotrueNo
jeap.governance.deploymentlog.enabledEnable/disable import of data from the of DeploymentLogtrueNo
jeap.governance.deploymentlog.urlURL of the DeploymentLog-Yes, if deploymentlog enabled
jeap.governance.deploymentlog.usernameUsername to access the DeploymentLog-Yes, if deploymentlog enabled
jeap.governance.deploymentlog.passwordPassword to access the DeploymentLog-Yes, if deploymentlog enabled
jeap.governance.deploymentlog.timeoutDeploymentLog connection timeout duration.'PT5M'No
jeap.governance.prometheus.enabledeEnable/disable the import of time series from Prometheus'true'No
jeap.governance.prometheus.amp.hostAmazon Managed Prometheus host URL-Yes, if enabled
jeap.governance.prometheus.amp.workspaceAmazon Managed Prometheus workspace id-Yes, if enabled
jeap.governance.prometheus.amp.role-arnARN of the role to assume for accessing the Amazon Managed Prometheus-Yes, if enabled
jeap.governance.prometheus.amp.role-session-nameName of the session to be used for accessing the Amazon Managed Prometheus-Yes, if enabled
jeap.governance.prometheus.amp.query-lookbackHow far back the Prometheus queries look for the most recent sample of a service'PT6H'No
jeap.governance.reactionobserver.enabledEnable/disable import of data from the of ReactionObservertrueNo
jeap.governance.reactionobserver.urlURL of the ReactionObserver-Yes, if ReactionObserver enabled
jeap.governance.reactionobserver.client-registrationSpring Security OAuth2 client registration used to access the ReactionObserver-Yes, if ReactionObserver enabled
jeap.governance.reactionobserver.timeoutReactionObserver connection timeout duration.'PT5M'No
jeap.governance.secscan.enabledEnable/disable the security scan of known system component APIstrueNo
jeap.governance.secscan.dataimport.target-environmentEnvironment to perform the security scan onREFNo
jeap.governance.secscan.apidiscovery.url-templateURL template of the API discovery service containing the parameters {env} and {systemComponentName}trueNo
jeap.governance.secscan.apidiscovery.timeoutTimout (specified as duration) for the connect and read timeouts when accessing the API discovery servicetrueNo
jeap.governance.secscan.httpcheck.connect-timeoutTimout (specified as duration) for the connect timeout when checking an HTTP endpointtrueNo
jeap.governance.secscan.httpcheck.read-timeoutTimout (specified as duration) for the read timeout when checking an HTTP endpointtrueNo
jeap.governance.rules.active[].idRule identifier, must match a known rule implementation-Yes
jeap.governance.rules.active[].weightRule weight for scoring (positive integer, >= 1)-Yes
jeap.governance.rules.active[].parametersOptional key-value parameters passed to the rule{}No
jeap.governance.rules.component-exemptions[].idUnique exemption identifier-Yes
jeap.governance.rules.component-exemptions[].component-nameName of the component this exemption applies to-Yes
jeap.governance.rules.component-exemptions[].rule-idList of rule IDs this exemption covers-Yes
jeap.governance.rules.component-exemptions[].reasonExplanation for the exemption-Yes
jeap.governance.rules.component-exemptions[].untilExpiry date (ISO-8601 yyyy-MM-dd), exclusive: the rule applies again from that day on. If absent, the exemption is permanent-No
jeap.governance.rules.component-exemptions[].parametersOptional key-value parameters to further scope the exemption{}No
jeap.governance.scoring.cron-expressionCron expression to schedule the rule evaluation and scoring of components/systems0 0,45 6-20 * * MON-FRINo
jeap.governance.scoring.lock-at-leastMinimum duration the lock of the scoring job is held, also when the scoring ends soonerPT1MNo
jeap.governance.scoring.lock-at-mostMaximum lock duration of the scoring job: how long a lock left behind by an instance that did not end the scoring staysPT15MNo
jeap.governance.report-data.trend-period-daysNumber of days the trends are calculated over and the score histories cover, including the day of the report30No
jeap.governance.doc-service.webhook.enabledCalls the Doc Service's webhook after every completed scoring run, see Docs APIfalseNo
jeap.governance.doc-service.webhook.urlURL of the Doc Service's governance webhook, e.g. https://doc.example.com/doc-service/api/governance/webhook-Yes, if the webhook is enabled
jeap.governance.doc-service.webhook.client-registrationSpring Security OAuth2 client registration the webhook is called with-Yes, if the webhook is enabled
jeap.governance.doc-service.webhook.timeoutConnect and read timeout of the webhook callPT10SNo

Job Locks​

The data import and the scoring each hold a lock (ShedLock, table shedlock) while they run, so that only one instance runs a job at a time. A run started through the management API (POST /api/management) takes the same lock as the scheduled run. If the lock is held, the API answers 409 Conflict and does not start the job.

When an instance shuts down while a job is running, the job stops at its next consistent point - between two data source importers, between two system components of the Prometheus import and the security scan, between two systems of the scoring - and releases its lock. The stopped run is not recorded as a completed run. Only a lock left behind by an instance that did not shut down cleanly, for example one that was killed, stays until lock-at-most runs out.

Prometheus Query Lookback​

All Prometheus queries return the most recent sample a service exported within the lookback window configured with jeap.governance.prometheus.amp.query-lookback (default six hours).

The window is not a memory: once a service stops exporting a time series, that series drops out of the query results after the window has elapsed, and the rules based on Prometheus data no longer see it. The window only tolerates a service not being scraped for a while, for example while it is being redeployed.

This has two consequences when choosing the value:

  • A shorter window makes the rules reflect a changed service configuration sooner - at the next data import rather than after the window has elapsed. For example, an endpoint that is no longer exposed disappears from the endpoints-protected-by-jwt rule once the redeployed service has stopped exporting the corresponding metric for longer than the window. Note that the metric value alone does not tell the rule whether a violation is still current: the counter behind jeap_rest_endpoint_without_jwt_total keeps its last value for as long as the service runs.
  • A longer window keeps rules from failing for a service that is not permanently running or scraped. If components are regularly unavailable at data import time, either raise the lookback or configure a violation-delay for the affected rules (see Rules).

Example Configuration​

jeap:
governance:
environment: DEV
dataimport:
cron-expression: "0 15 6,10,14,18 * * MON-FRI"
lock-at-least: PT15M
lock-at-most: PT1H
scoring:
cron-expression: "0 0,45 6-20 * * MON-FRI"
lock-at-least: PT1M
lock-at-most: PT15M
archrepo:
url: https://archrepo.example.com
timeout: PT5M
import:
apidocversion:
enabled: true
databaseschemaversion:
enabled: true
restapirelationwithoutpact:
enabled: true
deploymentlog:
enabled: true
url: https://deploymentlog.example.com
username: deploymentlog_user
password: securepassword
timeout: PT15M
reactionobserver:
enabled: true
url: https://reactionobserver.example.com
client-registration: reaction-observer
timeout: PT15M
prometheus:
enabled: true
amp:
host: "https://aps-workspaces.eu-central-1.amazonaws.com"
workspace: "ws-4f9f438a-efdf-4081-9745-fc4a0ad35f32b2"
role-arn: "arn:aws:iam::892367255812:role/amp-read-assume-role"
role-session-name: mySession
secscan:
enabled: true
dataimport:
target-environment: REF
apidiscovery:
url-template: "https://api-discovery.{env}-example.com/apis/{systemComponentName}"
report-data:
trend-period-days: 30
doc-service:
webhook:
enabled: true
url: https://doc.example.com/doc-service/api/governance/webhook
client-registration: doc-service-webhook
rules:
active:
- id: component-name
weight: 10
- id: enforce-oauth2
weight: 10
- id: custom-rule
weight: 5
parameters:
threshold: 10
component-exemptions:
- id: my-exemption
component-name: my-system-legacy-service
rule-id:
- enforce-oauth2
reason: "Legacy service, migration planned"
until: "2026-12-31"

Configure the referenced OAuth2 client registration using Spring Security's client-credentials properties. The jEAP security client starter attaches its access token to Reaction Observer requests:

spring:
security:
oauth2:
client:
registration:
reaction-observer:
provider: reaction-observer
client-id: ${REACTION_OBSERVER_CLIENT_ID}
client-secret: ${REACTION_OBSERVER_CLIENT_SECRET}
authorization-grant-type: client_credentials
provider:
reaction-observer:
issuer-uri: https://identity.example.com/realms/services

Doc Service​

The docs API is always available and needs no configuration of its own: the Doc Service's client needs the semantic role governance-documentation / read of the system configured in jeap.security.oauth2.resourceserver.system-name.

The webhook call after every scoring run is switched on with jeap.governance.doc-service.webhook.enabled. Its client registration, here doc-service-webhook, is configured with Spring Security's client-credentials properties like the one of the Reaction Observer; its token must carry the Doc Service's role governance-notifications / write:

spring:
security:
oauth2:
client:
registration:
doc-service-webhook:
provider: doc-service-webhook
client-id: ${DOC_SERVICE_WEBHOOK_CLIENT_ID}
client-secret: ${DOC_SERVICE_WEBHOOK_CLIENT_SECRET}
authorization-grant-type: client_credentials
provider:
doc-service-webhook:
issuer-uri: https://identity.example.com/realms/services

See also​

  • Architecture — modules, domain model and database schema.
  • Docs API — the read API for the Doc Service and the webhook after scoring.
  • Rules — the built-in governance rules and their parameters.