quarkusio/quarkus · error · ConfigurationException
Configuration has 2 different id values: '<key>' and '<id>'
Error message
Configuration has 2 different id values: '<key>' and '<id>'
What it means
Each OIDC named configuration is identified by its config key and optionally by an explicit id property. If the explicit id differs from the config key, Quarkus cannot resolve which configuration is referenced and fails fast at startup.
Source
Thrown at extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java:596
private static SignatureAlgorithm getSignatureAlgorithm(Credentials credentials, SignatureAlgorithm defaultAlgorithm) {
if (credentials.jwt().signatureAlgorithm().isPresent()) {
try {
return SignatureAlgorithm.fromAlgorithm(credentials.jwt().signatureAlgorithm().get());
} catch (Exception ex) {
throw new ConfigurationException("Unsupported signature algorithm");
}
} else {
return defaultAlgorithm;
}
}
public static void verifyConfigurationId(String defaultId, String configKey, Optional<String> configId) {
if (configKey.equals(defaultId)) {
throw new ConfigurationException("configuration id '" + configKey + "' duplicates the default configuration id");
}
if (configId.isPresent() && !configKey.equals(configId.get())) {
throw new ConfigurationException("Configuration has 2 different id values: '"
+ configKey + "' and '" + configId.get() + "'");
}
}
public static String initClientSecretBasicAuth(OidcClientCommonConfig oidcConfig, String clientSecret) {
if (clientSecret != null && isClientSecretBasicAuthRequired(oidcConfig.credentials())) {
return basicSchemeValue(oidcConfig.clientId().get(), clientSecret);
}
return null;
}
public static String basicSchemeValue(String name, String secret) {
return OidcConstants.BASIC_SCHEME + " "
+ Base64.getEncoder().encodeToString((name + ":" + secret).getBytes(StandardCharsets.UTF_8));
}
View on GitHub (pinned to e1c734241f)
Solutions
- Make the explicit id property value equal the config key (e.g. quarkus.oidc."tenant-x".tenant-id=tenant-x)
- Or delete the redundant explicit id property and rely on the config key alone
- Search config files (application.properties/yml, env vars) for the old id value and update all occurrences
Example fix
// before quarkus.oidc."tenant-a".tenant-id=tenant-b // after quarkus.oidc."tenant-a".tenant-id=tenant-a
Defensive patterns
Strategy: validation
Validate before calling
String key = "tenant-a";
String idProp = ConfigProvider.getConfig().getOptionalValue("quarkus.oidc.\"tenant-a\".tenant-id", String.class).orElse(key);
if (!idProp.equals(key)) throw new IllegalStateException("Config id mismatch: key=" + key + " id=" + idProp); Prevention
- Omit explicit id properties and rely on the config key
- If explicit ids are used, generate them from the key name
- Add config linting in CI to compare keys with their id properties
When it happens
Trigger: verifyConfigurationId called with a config key '<key>' and an explicit configuration-id '<id>' property (e.g. quarkus.oidc."a".tenant-id=b or credentials/configuration id mismatch) where the two values differ.
Common situations: Setting quarkus.oidc."tenant-x".tenant-id=tenant-y by mistake; renaming a config key without updating the matching id property; template-generated config where key and id drifted apart.
Related errors
- configuration id '<key>' duplicates the default configuratio
- Annotation '%s' placed on '%s' specifies no 'acr' value
- The '%s' annotation is only supported when proactive authent
- Back-channel logout path cannot contain a wildcard '*' chara
- OIDC tenants '%s' and '%s' share the same back-channel logou
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/3ef2a1e6805ab07e.
Report an issue: GitHub.