{"record":{"id":"94bb01949571dd02","repo":"prestodb/presto","slug":"authentication-using-external-authorization-requir","errorCode":null,"errorMessage":"Authentication using external authorization requires SSL to be enabled","messagePattern":"Authentication using external authorization requires SSL to be enabled","errorType":"validation","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java","lineNumber":307,"sourceCode":"                        KERBEROS_KEYTAB_PATH.getValue(properties),\n                        Optional.ofNullable(KERBEROS_CREDENTIAL_CACHE_PATH.getValue(properties)\n                                .orElseGet(() -> defaultCredentialCachePath().map(File::new).orElse(null))));\n            }\n\n            Map<String, String> extraCredentials = EXTRA_CREDENTIALS.getValue(properties).orElse(ImmutableMap.of());\n            Optional.ofNullable(extraCredentials.get(GCS_CREDENTIALS_PATH_KEY))\n                    .ifPresent(credentialPath -> OkHttpUtil.setupGCSOauth(builder, credentialPath, Optional.ofNullable(extraCredentials.get(GCS_OAUTH_SCOPES_KEY))));\n\n            if (ACCESS_TOKEN.getValue(properties).isPresent()) {\n                if (!useSecureConnection) {\n                    throw new SQLException(\"Authentication using an access token requires SSL to be enabled\");\n                }\n                builder.addInterceptor(tokenAuth(ACCESS_TOKEN.getValue(properties).get()));\n            }\n\n            if (EXTERNAL_AUTHENTICATION.getValue(properties).orElse(false)) {\n                if (!useSecureConnection) {\n                    throw new SQLException(\"Authentication using external authorization requires SSL to be enabled\");\n                }\n\n                // create HTTP client that shares the same settings, but without the external authenticator\n                TokenPoller poller = new HttpTokenPoller(builder.build());\n\n                Duration timeout = EXTERNAL_AUTHENTICATION_TIMEOUT.getValue(properties)\n                        .map(value -> Duration.ofMillis(value.toMillis()))\n                        .orElse(Duration.ofMinutes(2));\n\n                KnownTokenCache knownTokenCache = EXTERNAL_AUTHENTICATION_TOKEN_CACHE.getValue(properties).get();\n                Optional<RedirectHandler> configuredHandler = EXTERNAL_AUTHENTICATION_REDIRECT_HANDLERS.getValue(properties)\n                        .map(CompositeRedirectHandler::new)\n                        .map(RedirectHandler.class::cast);\n                RedirectHandler redirectHandler = Optional.ofNullable(REDIRECT_HANDLER.get())\n                        .orElseGet(() -> configuredHandler.orElseThrow(() -> new RuntimeException(\"External authentication redirect handler is not configured\")));\n                ExternalAuthenticator authenticator = new ExternalAuthenticator(redirectHandler, poller, knownTokenCache.create(), timeout);\n\n                builder.authenticator(authenticator);","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java#L289-L325","documentation":"PrestoDriverUri.setupClient requires SSL when external authorization (external authentication/redirect flow) is configured; a non-HTTPS JDBC URL cannot safely perform the external auth challenge, so this SQLException is raised during connection setup.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java:307 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Connect with an https:// JDBC URL when using external authentication","Disable external authentication if connecting over plain HTTP is acceptable for the environment"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}