prestodb/presto · error · RuntimeException

Unknown authentication type -

Error message

Unknown authentication type - 

What it means

The broker auth provider constructor switches on the configured authentication type; any type other than the supported user/password case (or none) hits the default branch and throws 'Unknown authentication type'.

Source

Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/auth/PinotBrokerAuthenticationProvider.java:53

        String type = pinotConfig.getBrokerAuthenticationType();
        switch (type) {
            case "NONE":
                this.delegate = PinotEmptyAuthenticationProvider.instance();
                break;
            case "PASSWORD":
                try {
                    this.delegate = new PinotPasswordAuthenticationProvider(
                            pinotConfig.getBrokerAuthenticationUser(),
                            pinotConfig.getBrokerAuthenticationPassword(),
                            PinotSessionProperties.class.getMethod("getBrokerAuthenticationUser", ConnectorSession.class),
                            PinotSessionProperties.class.getMethod("getBrokerAuthenticationPassword", ConnectorSession.class));
                }
                catch (NoSuchMethodException e) {
                    throw new RuntimeException("Failed to create Broker auth provider", e);
                }
                break;
            default:
                throw new RuntimeException("Unknown authentication type - " + type);
        }
    }

    private PinotBrokerAuthenticationProvider(PinotAuthenticationProvider delegate)
    {
        this.delegate = requireNonNull(delegate, "Delegate broker authentication provider is required");
    }

    @Override
    public Optional<String> getAuthenticationToken()
    {
        return delegate.getAuthenticationToken();
    }

    @Override
    public Optional<String> getAuthenticationToken(ConnectorSession session)
    {
        return delegate.getAuthenticationToken(session);

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set the broker authentication type in the catalog config to a supported value (e.g. user/password or none)
  2. Check the exact configured value for typos/case mismatches
  3. List handled cases in the switch and use one of them; add support for the desired type in code if needed
  4. Align connector version with the documentation for the auth type you intend to use

Example fix

// before
pinot.broker.authentication.type=kerberos
// after
pinot.broker.authentication.type=user_password
pinot.broker.authentication.user=myuser
pinot.broker.authentication.password=mypass
Defensive patterns

Strategy: validation

Validate before calling

// validate config before constructing the provider
Set<String> supported = Set.of("none", "user_password"); // per connector switch
String type = pinotConfig.getBrokerAuthenticationType();
if (type != null && !supported.contains(type.toLowerCase())) {
  throw new IllegalArgumentException("Unsupported broker auth type: " + type);
}

Try / catch

try {
  provider = new PinotBrokerAuthenticationProvider(pinotConfig);
} catch (RuntimeException e) {
  if (e.getMessage() != null && e.getMessage().startsWith("Unknown authentication type")) {
    log.error("Check pinot.broker.authentication.type in catalog properties: %s", e.getMessage());
    provider = PinotAuthenticationProvider.none(); // degrade gracefully
  } else throw e;
}

Prevention

When it happens

Trigger: pinotConfig.getBrokerAuthenticationType() returns a value not handled by the switch, e.g. a typo in config, a type added in a newer Pinot version, or an enum value the provider doesn't recognize.

Common situations: Setting pinot.broker.authentication.type to an unsupported value like 'oauth' or 'kerberos' in catalog properties; config typos; upgrading Pinot config surface without upgrading the connector.

Understand the failure class

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/c3e71a2dfd08d33d. Report an issue: GitHub.