{"record":{"id":"a3e7aab09451e8b9","repo":"quarkusio/quarkus","slug":"quarkus-security-security-providers","errorCode":"quarkus.security.security-providers","errorMessage":"Security provider '%s' is not available","messagePattern":"Security provider '(.+?)' is not available","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityProviderRecorder.java","lineNumber":27,"sourceCode":"import java.security.Provider;\nimport java.security.Security;\nimport java.util.List;\nimport java.util.Set;\n\nimport org.jboss.logging.Logger;\n\nimport io.quarkus.runtime.annotations.Recorder;\nimport io.quarkus.runtime.configuration.ConfigurationException;\n\n@Recorder\npublic class SecurityProviderRecorder {\n\n    private static final Logger LOG = Logger.getLogger(SecurityProviderRecorder.class);\n\n    public void configureProvider(String providerName, List<String> providerConfigs) {\n        Provider provider = Security.getProvider(providerName);\n        if (provider == null) {\n            throw new ConfigurationException(\n                    String.format(\"Security provider '%s' is not available\", providerName),\n                    Set.of(\"quarkus.security.security-providers\"));\n        }\n        for (String providerConfig : providerConfigs) {\n            try {\n                Provider configured = provider.configure(providerConfig);\n                LOG.debugf(\"Registering security provider: %s (configured from %s)\", configured.getName(), providerConfig);\n                SecurityProviderUtils.addProvider(configured);\n            } catch (Exception e) {\n                throw new ConfigurationException(\n                        String.format(\"Failed to configure security provider '%s'\", providerName), e,\n                        Set.of(\"quarkus.security.security-provider-config.\" + providerName));\n            }\n        }\n    }\n\n    public void addBouncyCastleProvider(boolean inFipsMode) {\n        final String providerName = inFipsMode ? SecurityProviderUtils.BOUNCYCASTLE_FIPS_PROVIDER_CLASS_NAME","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityProviderRecorder.java#L9-L45","documentation":"SecurityProviderRecorder.configureProvider() resolves a JCA security Provider by name from Security.getProvider() when registering providers configured via quarkus.security.security-providers. If the JVM does not know a provider with that name, a SmallRye ConfigurationException is thrown at startup listing the quarkus.security.security-providers property, aborting application boot.","triggerScenarios":"Listing a provider name in quarkus.security.security-providers (e.g. BC, BCFSKG) that is not registered with the JDK's Security framework — typically because the provider JAR (e.g. BouncyCastle) is not on the classpath or is not itself registered.","commonSituations":"Quarkus 3.x moved from quarkus.security.providers to quarkus.security.security-providers and to loading provider classes rather than relying on pre-registered names; BouncyCastle dependency missing; provider name misspelled; native-image where the provider was not initialized.","solutions":["Add the provider dependency (e.g. org.bouncycastle:bcprov-jdk18on) to the project.","Verify the provider name spelled in quarkus.security.security-providers is one available to Security.getProvider() in your JVM.","Alternatively configure the provider class so Quarkus loads/registers it itself (SecurityProviderUtils.loadProvider path / provider-config).","Check the Quarkus version's migration notes if upgrading — the property name changed from quarkus.security.providers."],"exampleFix":"# before\nquarkus.security.security-providers=BC\n# after: add dependency\n# <dependency>org.bouncycastle:bcprov-jdk18on</dependency>\nquarkus.security.security-providers=BC","handlingStrategy":"validation","validationCode":"// before boot, verify the provider resolves\nProvider p = Security.getProvider(\"BC\");\nif (p == null) {\n    throw new IllegalStateException(\"Add org.bouncycastle:bcprov-jdk18on to dependencies\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    application.start();\n} catch (ConfigurationException e) {\n    if (String.valueOf(e.getConfigProperties()).contains(\"security-providers\")) {\n        log.error(\"Provider missing: add its JAR dependency or fix quarkus.security.security-providers\", e);\n    }\n}","preventionTips":["Verify provider availability with Security.getProvider(name) before configuring it","Add provider artifacts (e.g. BouncyCastle) as compile/runtime dependencies","After Quarkus upgrades, check whether the property was renamed (providers -> security-providers)","Keep provider names in one configuration place to avoid typos"],"tags":["security","jca","provider","startup","config"],"backgroundTag":"security-provider-not-available","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}