{"record":{"id":"c7938f4cb290c617","repo":"prestodb/presto","slug":"unknown-authentication-type-c7938f","errorCode":null,"errorMessage":"Unknown authentication type - ","messagePattern":"Unknown authentication type - ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/auth/PinotControllerAuthenticationProvider.java","lineNumber":53,"sourceCode":"        String type = pinotConfig.getControllerAuthenticationType();\n        switch (type) {\n            case \"NONE\":\n                this.delegate = PinotEmptyAuthenticationProvider.instance();\n                break;\n            case \"PASSWORD\":\n                try {\n                    this.delegate = new PinotPasswordAuthenticationProvider(\n                            pinotConfig.getControllerAuthenticationUser(),\n                            pinotConfig.getControllerAuthenticationPassword(),\n                            PinotSessionProperties.class.getMethod(\"getControllerAuthenticationUser\", ConnectorSession.class),\n                            PinotSessionProperties.class.getMethod(\"getControllerAuthenticationPassword\", ConnectorSession.class));\n                }\n                catch (NoSuchMethodException e) {\n                    throw new RuntimeException(\"Failed to create Controller auth provider\", e);\n                }\n                break;\n            default:\n                throw new RuntimeException(\"Unknown authentication type - \" + type);\n        }\n    }\n\n    private PinotControllerAuthenticationProvider(PinotAuthenticationProvider delegate)\n    {\n        this.delegate = requireNonNull(delegate, \"Delegate controller authentication provider is required\");\n    }\n\n    @Override\n    public Optional<String> getAuthenticationToken()\n    {\n        return delegate.getAuthenticationToken();\n    }\n\n    @Override\n    public Optional<String> getAuthenticationToken(ConnectorSession session)\n    {\n        return delegate.getAuthenticationToken(session);","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/auth/PinotControllerAuthenticationProvider.java#L35-L71","documentation":"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>'.","triggerScenarios":"pinotConfig.getControllerAuthenticationType() yields a value outside the handled cases — misconfigured catalog property, unsupported auth scheme, or enum drift between config and connector code.","commonSituations":"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.","solutions":["Change pinot.controller.authentication.type to a supported value","Fix typos/case in the catalog properties file","Add a case for the desired auth type in PinotControllerAuthenticationProvider if it must be supported","Verify with connector docs which auth types are implemented"],"exampleFix":"// before\npinot.controller.authentication.type=basic\n// after\npinot.controller.authentication.type=user_password","handlingStrategy":"validation","validationCode":"// validate controller auth config before provider construction\nSet<String> supported = Set.of(\"none\", \"user_password\");\nString type = pinotConfig.getControllerAuthenticationType();\nif (type != null && !supported.contains(type.toLowerCase())) {\n  throw new IllegalArgumentException(\"Unsupported controller auth type: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try {\n  provider = new PinotControllerAuthenticationProvider(pinotConfig);\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unknown authentication type\")) {\n    log.error(\"Fix pinot.controller.authentication.type: %s\", e.getMessage());\n    provider = PinotAuthenticationProvider.none();\n  } else throw e;\n}","preventionTips":["Copy auth config values verbatim from connector documentation","Lint catalog properties in CI for accepted enum values","Add new auth types to the provider switch when adopting them","Document supported types next to the catalog template"],"tags":["pinot","authentication","config","unsupported-value"],"backgroundTag":"unknown-auth-type","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}