{"record":{"id":"97101b821c2920c4","repo":"quarkusio/quarkus","slug":"unable-to-find-the-tls-configuration-for-name-na","errorCode":null,"errorMessage":"Unable to find the TLS configuration for name ${name}.","messagePattern":"Unable to find the TLS configuration for name (.+?)\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/tls-registry/spi/src/main/java/io/quarkus/tls/TlsConfiguration.java","lineNumber":23,"sourceCode":"\nimport javax.net.ssl.SSLContext;\n\nimport io.vertx.core.net.ClientSSLOptions;\nimport io.vertx.core.net.KeyCertOptions;\nimport io.vertx.core.net.SSLEngineOptions;\nimport io.vertx.core.net.ServerSSLOptions;\nimport io.vertx.core.net.TrustOptions;\n\n/**\n * The transport layer security configuration.\n */\npublic interface TlsConfiguration {\n\n    static Optional<TlsConfiguration> from(TlsConfigurationRegistry registry, Optional<String> name) {\n        if (name.isPresent()) {\n            Optional<TlsConfiguration> maybeConfiguration = registry.get(name.get());\n            if (maybeConfiguration.isEmpty()) {\n                throw new IllegalStateException(\"Unable to find the TLS configuration for name \" + name.get() + \".\");\n            }\n            return maybeConfiguration;\n        }\n        return Optional.empty();\n    }\n\n    /**\n     * Returns the key store.\n     *\n     * @return the key store if configured.\n     */\n    KeyStore getKeyStore();\n\n    /**\n     * Returns the key store options.\n     *\n     * @return the key store options if configured.\n     */","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/tls-registry/spi/src/main/java/io/quarkus/tls/TlsConfiguration.java#L5-L41","documentation":"TlsConfiguration.from looks up a named TLS configuration in the TlsConfigurationRegistry and throws when the requested name is not registered. Named TLS configurations (beyond the default) must be declared via quarkus.tls.<name>.* properties or registered programmatically before they can be resolved.","triggerScenarios":"Calling TlsConfiguration.from(registry, Optional.of(\"my-name\")) (directly or via REST client / gRPC / mail config referencing tls-configuration-name=my-name) when no quarkus.tls.my-name.* configuration exists in the registry.","commonSituations":"Typo in tls-configuration-name reference; TLS config defined under a different property prefix; named config not registered in tests (no quarkus.tls.* properties); using a named config from an extension that initialized before the registry was populated.","solutions":["Define the named configuration in application.properties: quarkus.tls.my-name.key-store.* (or trust-store.*)","Fix the tls-configuration-name / tls-config-name reference to match the registered name exactly","Verify the config source actually loads (right profile, right config file) — log registry contents or check startup config","In tests, add the @InjectMock-less real config or set the quarkus.tls.<name>.* properties"],"exampleFix":"// before (reference without definition)\nquarkus.rest-client.my-client.tls-configuration-name=externl-tls\n// after (matching definition)\nquarkus.rest-client.my-client.tls-configuration-name=external-tls\nquarkus.tls.external-tls.trust-store.p12.path=/etc/certs/trust.p12\nquarkus.tls.external-tls.trust-store.p12.password=changeit","handlingStrategy":"validation","validationCode":"// verify the named TLS config exists before using it\nString name = \"external-tls\";\nboolean defined = ConfigProvider.getConfig().getPropertyNames().stream()\n        .anyMatch(p -> p.startsWith(\"quarkus.tls.\" + name + \".\"));\nif (!defined) throw new IllegalStateException(\"TLS config not defined: \" + name);","typeGuard":null,"tryCatchPattern":"try {\n    TlsConfiguration cfg = TlsConfiguration.from(registry, Optional.of(name));\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Unable to find the TLS configuration\")) {\n        log.errorf(\"TLS config '%s' not registered; define quarkus.tls.%s.* properties\", name, name);\n    }\n}","preventionTips":["Centralize the TLS configuration name as a constant shared by producer and consumers","Use registry.get(name) or TlsConfigurationRegistry lookups returning Optional when absence is acceptable","Add a startup check that all referenced tls-configuration-name values resolve","Keep property definitions and references in the same config file/review"],"tags":["tls","configuration","registry","unknown-name"],"backgroundTag":"unknown-tls-configuration-name","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"}