{"record":{"id":"c3e71a2dfd08d33d","repo":"prestodb/presto","slug":"unknown-authentication-type","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/PinotBrokerAuthenticationProvider.java","lineNumber":53,"sourceCode":"        String type = pinotConfig.getBrokerAuthenticationType();\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.getBrokerAuthenticationUser(),\n                            pinotConfig.getBrokerAuthenticationPassword(),\n                            PinotSessionProperties.class.getMethod(\"getBrokerAuthenticationUser\", ConnectorSession.class),\n                            PinotSessionProperties.class.getMethod(\"getBrokerAuthenticationPassword\", ConnectorSession.class));\n                }\n                catch (NoSuchMethodException e) {\n                    throw new RuntimeException(\"Failed to create Broker auth provider\", e);\n                }\n                break;\n            default:\n                throw new RuntimeException(\"Unknown authentication type - \" + type);\n        }\n    }\n\n    private PinotBrokerAuthenticationProvider(PinotAuthenticationProvider delegate)\n    {\n        this.delegate = requireNonNull(delegate, \"Delegate broker 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/PinotBrokerAuthenticationProvider.java#L35-L71","documentation":"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'.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set the broker authentication type in the catalog config to a supported value (e.g. user/password or none)","Check the exact configured value for typos/case mismatches","List handled cases in the switch and use one of them; add support for the desired type in code if needed","Align connector version with the documentation for the auth type you intend to use"],"exampleFix":"// before\npinot.broker.authentication.type=kerberos\n// after\npinot.broker.authentication.type=user_password\npinot.broker.authentication.user=myuser\npinot.broker.authentication.password=mypass","handlingStrategy":"validation","validationCode":"// validate config before constructing the provider\nSet<String> supported = Set.of(\"none\", \"user_password\"); // per connector switch\nString type = pinotConfig.getBrokerAuthenticationType();\nif (type != null && !supported.contains(type.toLowerCase())) {\n  throw new IllegalArgumentException(\"Unsupported broker auth type: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try {\n  provider = new PinotBrokerAuthenticationProvider(pinotConfig);\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unknown authentication type\")) {\n    log.error(\"Check pinot.broker.authentication.type in catalog properties: %s\", e.getMessage());\n    provider = PinotAuthenticationProvider.none(); // degrade gracefully\n  } else throw e;\n}","preventionTips":["Validate catalog properties against connector docs before deployment","Use exact accepted tokens for the auth type config key","Add a config sanity check to deployment/CI pipelines","Keep connector version in sync with the auth features you need"],"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"}