prestodb/presto · error · RuntimeException

Unknown authentication type -

Error message

Unknown authentication type - 

What it means

The controller auth provider's constructor switch only supports its known authentication types; an unrecognized configured controller authentication type reaches the default branch and throws 'Unknown authentication type - <type>'.

Source

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

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

    private PinotControllerAuthenticationProvider(PinotAuthenticationProvider delegate)
    {
        this.delegate = requireNonNull(delegate, "Delegate controller 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. Change pinot.controller.authentication.type to a supported value
  2. Fix typos/case in the catalog properties file
  3. Add a case for the desired auth type in PinotControllerAuthenticationProvider if it must be supported
  4. Verify with connector docs which auth types are implemented

Example fix

// before
pinot.controller.authentication.type=basic
// after
pinot.controller.authentication.type=user_password
Defensive patterns

Strategy: validation

Validate before calling

// validate controller auth config before provider construction
Set<String> supported = Set.of("none", "user_password");
String type = pinotConfig.getControllerAuthenticationType();
if (type != null && !supported.contains(type.toLowerCase())) {
  throw new IllegalArgumentException("Unsupported controller auth type: " + type);
}

Try / catch

try {
  provider = new PinotControllerAuthenticationProvider(pinotConfig);
} catch (RuntimeException e) {
  if (e.getMessage() != null && e.getMessage().startsWith("Unknown authentication type")) {
    log.error("Fix pinot.controller.authentication.type: %s", e.getMessage());
    provider = PinotAuthenticationProvider.none();
  } else throw e;
}

Prevention

When it happens

Trigger: pinotConfig.getControllerAuthenticationType() yields a value outside the handled cases — misconfigured catalog property, unsupported auth scheme, or enum drift between config and connector code.

Common situations: Setting pinot.controller.authentication.type to a scheme the connector doesn't implement (e.g. oauth, kerberos); typos in catalog properties; version mismatch between docs and connector.

Understand the failure class

Related errors


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