{"record":{"id":"413bc3f9deca6365","repo":"quarkusio/quarkus","slug":"either-quarkus-oidc-client-registration-clientnam","errorCode":null,"errorMessage":"Either 'quarkus.oidc-client-registration<clientName>.auth-server-url' or absolute 'quarkus.oidc-client-registration<clientName>.registration-path' URL must be set","messagePattern":"Either 'quarkus\\.oidc-client-registration<clientName>\\.auth-server-url' or absolute 'quarkus\\.oidc-client-registration<clientName>\\.registration-path' URL must be set","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/oidc-client-registration/runtime/src/main/java/io/quarkus/oidc/client/registration/runtime/OidcClientRegistrationRecorder.java","lineNumber":118,"sourceCode":"                .atMost(oidcConfig.connectionTimeout());\n    }\n\n    public static Uni<OidcClientRegistration> createOidcClientRegistrationUni(OidcClientRegistrationConfig oidcConfig,\n            OidcTlsSupport tlsSupport, Supplier<Vertx> vertxSupplier,\n            Supplier<ProxyConfigurationRegistry> proxyConfigurationRegistrySupplier) {\n        if (!oidcConfig.registrationEnabled()) {\n            String message = String.format(\"'%s' client registration configuration is disabled\", \"\");\n            LOG.debug(message);\n            return Uni.createFrom().item(new DisabledOidcClientRegistration(message));\n        }\n\n        try {\n            if (oidcConfig.authServerUrl().isEmpty() && !OidcCommonUtils.isAbsoluteUrl(oidcConfig.registrationPath())) {\n                if (isEmptyMetadata(oidcConfig.metadata())) {\n                    return Uni.createFrom().nullItem();\n                }\n                var clientName = DEFAULT_ID.equals(oidcConfig.id().orElse(DEFAULT_ID)) ? \"\" : \".\" + oidcConfig.id().get();\n                throw new ConfigurationException(\n                        \"Either 'quarkus.oidc-client-registration\" + clientName\n                                + \".auth-server-url' or absolute 'quarkus.oidc-client-registration\" + clientName\n                                + \".registration-path' URL must be set\");\n            }\n            OidcCommonUtils.verifyEndpointUrl(getEndpointUrl(oidcConfig));\n        } catch (Throwable t) {\n            LOG.error(t.getMessage());\n            String message = String.format(\"'%s' client registration configuration is not initialized\",\n                    oidcConfig.id().orElse(\"Default\"));\n            return Uni.createFrom().failure(new RuntimeException(message));\n        }\n\n        final io.vertx.mutiny.core.Vertx vertx = new io.vertx.mutiny.core.Vertx(vertxSupplier.get());\n        OidcWebClient client = OidcWebClient.create(oidcConfig, tlsSupport, vertx, proxyConfigurationRegistrySupplier.get(),\n                \"OIDC client registration `\" + oidcConfig.id().orElse(DEFAULT_ID) + \"`\");\n\n        Map<OidcEndpoint.Type, List<OidcRequestFilter>> oidcRequestFilters = OidcCommonUtils.getOidcRequestFilters();\n        Map<OidcEndpoint.Type, List<OidcResponseFilter>> oidcResponseFilters = OidcCommonUtils.getOidcResponseFilters();","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/oidc-client-registration/runtime/src/main/java/io/quarkus/oidc/client/registration/runtime/OidcClientRegistrationRecorder.java#L100-L136","documentation":"At recording/initialization time the OidcClientRegistrationRecorder validates configuration. For a named client registration, either an OIDC auth-server-url (from which the registration endpoint can be discovered) or an absolute registration-path URL must be configured. If both are missing while metadata is present, a ConfigurationException is thrown naming the exact properties to fix (the clientName suffix is appended for named configs).","triggerScenarios":"Setting quarkus.oidc-client-registration.<clientName>.metadata (or other props) but leaving both quarkus.oidc-client-registration<clientName>.auth-server-url unset and registration-path as a non-absolute URL.","commonSituations":"Typo in property prefix (missing client-name segment), providing only a relative registration-path like '/clients-registrations' instead of a full https:// URL, migrating from the default (unnamed) config to a named one without adding auth-server-url.","solutions":["Set quarkus.oidc-client-registration.auth-server-url (or the <clientName> variant) to the OIDC provider base URL","Or set registration-path to an absolute URL, e.g. https://provider/registration-endpoint","If registration is intentionally unused, remove the metadata properties so a null Uni is returned instead"],"exampleFix":"# before\nquarkus.oidc-client-registration.myclient.registration-path=/clients\n# after\nquarkus.oidc-client-registration.myclient.auth-server-url=https://idp.example.com/realms/main","handlingStrategy":"validation","validationCode":"String authServerUrl = config.getValue(\"quarkus.oidc-client-registration.auth-server-url\");\nString regPath = config.getValue(\"quarkus.oidc-client-registration.registration-path\");\nif ((authServerUrl == null || authServerUrl.isBlank()) && (regPath == null || !regPath.startsWith(\"http\"))) {\n    throw new IllegalStateException(\"Configure auth-server-url or an absolute registration-path\");\n}","typeGuard":"static boolean registrationConfigured(String authServerUrl, String registrationPath) {\n    return authServerUrl != null && !authServerUrl.isBlank()\n        || registrationPath != null && registrationPath.startsWith(\"https://\");\n}","tryCatchPattern":"try {\n    OidcClientRegistration reg = registrationUni.await().indefinitely();\n} catch (ConfigurationException e) {\n    LOG.errorf(\"Registration config error: %s\", e.getMessage()); // fix properties\n}","preventionTips":["Validate OIDC registration properties in CI config tests","Use absolute https URLs for registration-path","Keep named-config prefixes consistent with code lookups"],"tags":["oidc","configuration","startup"],"backgroundTag":"missing-config-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}