pentaho/pentaho-kettle · error · AuthenticationFactoryException
AuthenticationManager.ConsumedTypeError
Error message
AuthenticationManager.ConsumedTypeError
What it means
AuthenticationManager.registerConsumerFactory() validates that a consumer factory's ConsumedType is an interface or a subtype of AuthenticationProvider. The message 'AuthenticationManager.ConsumedTypeError' is a localized message key violation: the factory is registered with a consumed type that the manager cannot dispatch providers for.
Solutions
- Make the consumed type an interface, or have it implement org.pentaho.di.core.auth.AuthenticationProvider.
- Fix getConsumedType() in the factory to return the correct interface type.
- Check message key AuthenticationManager.ConsumedTypeError in the auth messages properties for the exact parameterized detail.
Example fix
// before
public class MyCreds { ... } // concrete, not an AuthenticationProvider
// after
public interface MyCreds extends AuthenticationProvider { ... } Defensive patterns
Strategy: validation
Validate before calling
Class<?> consumed = factory.getConsumedType();
if (!consumed.isInterface() && !AuthenticationProvider.class.isAssignableFrom(consumed)) {
throw new IllegalArgumentException(consumed + " must be an interface or AuthenticationProvider");
} Try / catch
try { manager.registerConsumerFactory(factory); } catch (AuthenticationFactoryException e) { logError("Bad consumed type on " + factory, e); } Prevention
- Model consumed credential types as interfaces
- Implement AuthenticationProvider on provider types
- Check factory.getConsumedType() before registering
When it happens
Trigger: Registering an AuthenticationConsumerFactory whose getConsumedType() returns a concrete class that is neither an interface nor assignable from AuthenticationProvider — e.g. a plain POJO parameter type on the consume() method.
Common situations: Defining a consumer whose consume() takes a custom concrete credential class instead of an interface; refactoring that changed an interface to a class; forgetting to implement AuthenticationProvider on a provider type.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Attempting to create PDI Repository with no Active…
- Auth error
- AvroInput.Error.UnexpectedRecordFieldTypeAtNonExpansionPoint
- BaseStep.SafeMode.Exception.MixingTypes
- Browser session authentication requested but no JSESSIONID…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b5d5301c11a68a7f.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/core/auth/core/AuthenticationManager.java:52
private final List<AuthenticationProvider> authenticationProviders = new ArrayList<AuthenticationProvider>();
public void registerAuthenticationProvider( AuthenticationProvider authenticationProvider ) {
synchronized ( authenticationProviders ) {
authenticationProviders.add( authenticationProvider );
}
}
public boolean unregisterAuthenticationProvider( AuthenticationProvider authenticationProvider ) {
synchronized ( authenticationProviders ) {
return authenticationProviders.remove( authenticationProvider );
}
}
public <ReturnType, CreateArgType, ConsumedType> void registerConsumerFactory(
AuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> factory ) throws AuthenticationFactoryException {
if ( !factory.getConsumedType().isInterface()
&& !AuthenticationProvider.class.isAssignableFrom( factory.getConsumedType() ) ) {
throw new AuthenticationFactoryException( BaseMessages.getString( PKG, "AuthenticationManager.ConsumedTypeError",
factory ) );
}
Map<Class<?>, AuthenticationConsumerFactory<?, ?, ?>> createTypeMap =
getRelevantConsumerFactoryMap( factory.getReturnType(), factory.getCreateArgType() );
synchronized ( createTypeMap ) {
createTypeMap.put( factory.getConsumedType(), factory );
}
}
public <ReturnType, ConsumedType> void registerConsumerClass(
Class<? extends AuthenticationConsumer<? extends ReturnType, ? extends ConsumedType>> consumerClass ) throws AuthenticationFactoryException {
registerConsumerFactory( new DefaultAuthenticationConsumerFactory( consumerClass ) );
}
public <ReturnType, CreateArgType, ConsumedType> List<AuthenticationPerformer<ReturnType, CreateArgType>>
getSupportedAuthenticationPerformers( Class<ReturnType> returnType, Class<CreateArgType> createArgType ) {
Map<Class<?>, AuthenticationConsumerFactory<?, ?, ?>> createTypeMap =View on GitHub (pinned to f3058517a1)