JanssenProject / JanssenProject/jans

bug(jans-fido2): metrics aggregation logs spurious "ou=node is not configured" ConfigurationException in single-node mode

Open
#14,221 1 comment 1 reaction 1 assignee Claimed by @imran-ishaq View on GitHub
comp-jans-fido2
Dominant language
Java
Stars
647
Forks
173
Avg merge
1d 18h
Merged PRs (30d)
110

Description

Describe the bug

The jans-fido2 metrics aggregation scheduler logged an io.jans.exception.ConfigurationException: ou=node is not configured in static configuration of AS (jansConfStatic). with a full stack trace on every aggregation run (hourly/daily/weekly/monthly) in single-node deployments. Fido2MetricsAggregationScheduler.initializeClusterEnvironment() treated the deployment as a cluster whenever the Fido2ClusterNodeService CDI bean was present (always, since it's @ApplicationScoped), but cluster coordination needs ou=node in jansConfStatic, which is absent in the default single-node setup. Every cluster call (getClusterNodesLive() via startPeriodicLockUpdates()) then threw, and the exception was logged at ERROR level — making a healthy deployment look broken. Aggregation still completed via existing fallbacks, so this was misleading log noise rather than a functional failure.

To Reproduce
Steps to reproduce the behavior:

Deploy jans-fido2 in a default single-node setup (no ou=node configured in jansConfStatic).
Enable FIDO2 metrics and aggregation (fido2MetricsEnabled + fido2MetricsAggregationEnabled).
Wait for (or trigger) an aggregation job to fire.

See the error in the FIDO2 server log:

io.jans.exception.ConfigurationException: ou=node is not configured in static configuration of AS (jansConfStatic).
at io.jans.service.cluster.ClusterNodeService.getClusterNodesLive(ClusterNodeService.java:137)
at io.jans.fido2.service.metric.Fido2MetricsAggregationScheduler.startPeriodicLockUpdates(Fido2MetricsAggregationScheduler.java:404)
at io.jans.fido2.service.metric.Fido2MetricsAggregationScheduler.initializeClusterLockUpdates(Fido2MetricsAggregationScheduler.java:147)
at io.jans.fido2.service.metric.Fido2MetricsAggregationScheduler.executeAggregationJob(Fido2MetricsAggregationScheduler.java:110)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
...
Expected behavior

A single-node deployment (no ou=node configured) should run metrics aggregation in single-node mode without throwing or logging a ConfigurationException stack trace, emitting a clean INFO line like FIDO2 metrics aggregation in SINGLE-NODE mode (ou=node not configured). Genuine cluster deployments (with ou=node configured) should continue using distributed locking exactly as before.

Screenshots
N/A — server-side log output (stack trace shown above).

Desktop (please complete the following information):

OS: N/A (server-side component)
Browser: N/A
Version: N/A
Smartphone (please complete the following information):

Device: N/A
OS: N/A
Browser: N/A
Version: N/A
Additional context

Component: jans-fido2 → Fido2MetricsAggregationScheduler / Fido2ClusterNodeService
Affected file: jans-fido2/server/src/main/java/io/jans/fido2/service/metric/Fido2MetricsAggregationScheduler.java
Fix applied in this change:
initializeClusterEnvironment() now checks getBaseClusterNodeDn(); if ou=node is blank it runs in single-node mode and never makes cluster calls, so the exception is never thrown.
startPeriodicLockUpdates() now logs a concise one-line warn (message only) instead of error with a full stack trace, since the single-node fallback already handles the condition.
No functional change: cluster mode behaves exactly as before; single-node mode produces the same aggregation result, just without the misleading stack trace.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.