{"record":{"id":"4e09180161aa9b8e","repo":"quarkusio/quarkus","slug":"quarkus-security-security-provider-config-provide","errorCode":"quarkus.security.security-provider-config.<providerName>","errorMessage":"Failed to configure security provider '%s'","messagePattern":"Failed to configure security provider '(.+?)'","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityProviderRecorder.java","lineNumber":37,"sourceCode":"@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\n                : SecurityProviderUtils.BOUNCYCASTLE_PROVIDER_CLASS_NAME;\n        addProvider(loadProvider(providerName));\n    }\n\n    public void addBouncyCastleJsseProvider() {\n        Provider bc = loadProvider(SecurityProviderUtils.BOUNCYCASTLE_PROVIDER_CLASS_NAME);\n        Provider bcJsse = loadProvider(SecurityProviderUtils.BOUNCYCASTLE_JSSE_PROVIDER_CLASS_NAME);\n        int sunJsseIndex = findProviderIndex(SecurityProviderUtils.SUN_JSSE_PROVIDER_NAME);\n        insertProvider(bc, sunJsseIndex);\n        insertProvider(bcJsse, sunJsseIndex + 1);","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityProviderRecorder.java#L19-L55","documentation":"After locating the provider, configureProvider() calls provider.configure(providerConfig) for each entry in quarkus.security.security-provider-config.<providerName>. If configuration fails (bad config file syntax, missing file, provider rejects the settings) the exception is wrapped in a ConfigurationException keyed to that property, failing startup.","triggerScenarios":"Setting quarkus.security.security-provider-config.<providerName>=<path-or-config> where the referenced configuration cannot be applied by Provider.configure() — unreadable file, malformed content, or provider-specific rejection.","commonSituations":"Typo in the config file path; config file exists but contains directives the provider version doesn't support; insufficient file permissions; provider expects a different config format.","solutions":["Read the nested cause in the stack trace — it comes from Provider.configure().","Verify the config file path is correct and readable by the application process.","Validate the config content against the provider's documented format/version.","Remove the config property to boot with the unconfigured provider and add configuration incrementally.","Upgrade or align the provider dependency with the config format you are using."],"exampleFix":"# before\nquarkus.security.security-provider-config.BC=bc-provider.cnf\n# after (correct path/format)\nquarkus.security.security-provider-config.BC=/etc/quarkus/bc-provider.config","handlingStrategy":"validation","validationCode":"// validate the provider config before boot\nFile cfg = new File(\"/etc/quarkus/bc-provider.config\");\nif (!cfg.isFile() || !cfg.canRead()) {\n    throw new IllegalStateException(\"Provider config file missing or unreadable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    provider.configure(providerConfig);\n} catch (Exception e) {\n    throw new IllegalStateException(\"Invalid security provider config: \" + providerConfig, e);\n}","preventionTips":["Check config file paths and read permissions before packaging","Validate config content against the provider version's supported format","Roll out provider config changes incrementally (boot without config first)","Pin the provider dependency version to the documented config format"],"tags":["security","jca","provider","config","startup"],"backgroundTag":"security-provider-config-failed","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"}