quarkusio/quarkus · error · RuntimeException

Unable to find the credentials provider named '" + name + "'

Error message

Unable to find the credentials provider named '" + name + "'

What it means

Same as the default-provider case, but this variant is thrown when an explicitly named credentials provider was requested and no CDI bean of type CredentialsProvider is registered under that @Named qualifier.

Source

Thrown at extensions/tls-registry/runtime/src/main/java/io/quarkus/tls/runtime/keystores/CredentialProviders.java:69

            return Optional.ofNullable(credentials.get(config.passwordKey()));
        }
        return Optional.empty();
    }

    static CredentialsProvider lookup(String name) {
        ArcContainer container = Arc.container();
        InstanceHandle<CredentialsProvider> instance;
        if (name == null) {
            instance = container.instance(CredentialsProvider.class);
        } else {
            instance = container.instance(CredentialsProvider.class, NamedLiteral.of(name));
        }

        if (!instance.isAvailable()) {
            if (name == null) {
                throw new RuntimeException("Unable to find the default credentials provider");
            } else {
                throw new RuntimeException("Unable to find the credentials provider named '" + name + "'");
            }
        }

        return instance.get();
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Fix the provider name in the TLS config to match the @Named value of the bean
  2. Register the provider bean with NamedLiteral/name matching the config
  3. Verify with a startup log or dev-mode CDI listing that the named bean exists

Example fix

# before (no bean named 'vault')
quarkus.tls.my-tls.key-store.jks.credentials-provider.name=vault
# after (bean named 'main' exists)
quarkus.tls.my-tls.key-store.jks.credentials-provider.name=main
Defensive patterns

Strategy: validation

Validate before calling

String name = cfg.getValue("quarkus.tls.my-tls.key-store.jks.credentials-provider.name", String.class);
boolean exists = Arc.container().instance(CredentialsProvider.class,
        NamedLiteral.of(name)).isAvailable();
if (!exists) throw new IllegalStateException("No CredentialsProvider named " + name);

Try / catch

try {
    Quarkus.run(args);
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().contains("credentials provider named")) {
        log.errorf("Provider name mismatch in TLS config: %s", e.getMessage());
    }
    throw e;
}

Prevention

When it happens

Trigger: Config such as quarkus.tls.<name>.key-store.jks.credentials-provider.name=myprovider (or trust-store equivalent) with no CredentialsProvider bean named 'myprovider' in the container.

Common situations: Typo in the provider name in config; provider registered with a different @Named value; provider bean only present in a different Quarkus profile/build.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/4b9c58ce4f95d7f5. Report an issue: GitHub.