File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 4242import org .apache .drill .exec .server .rest .header .ResponseHeadersSettingFilter ;
4343import org .apache .drill .exec .server .rest .ssl .SslContextFactoryConfigurator ;
4444import org .apache .drill .exec .work .WorkManager ;
45+ import org .eclipse .jetty .http .HttpCookie ;
4546import org .eclipse .jetty .http .HttpVersion ;
4647import org .eclipse .jetty .security .SecurityHandler ;
4748import org .eclipse .jetty .security .authentication .SessionAuthentication ;
@@ -276,7 +277,14 @@ private SessionHandler createSessionHandler(final SecurityHandler securityHandle
276277 //SessionManager sessionManager = new HashSessionManager();
277278 sessionHandler .setMaxInactiveInterval (config .getInt (ExecConstants .HTTP_SESSION_MAX_IDLE_SECS ));
278279 // response cookie will be returned with HttpOnly flag
279- sessionHandler .getSessionCookieConfig ().setHttpOnly (true );
280+ sessionHandler .setHttpOnly (true );
281+ sessionHandler .setSameSite (HttpCookie .SameSite .STRICT );
282+
283+ if (config .getBoolean (ExecConstants .HTTP_ENABLE_SSL )) {
284+ sessionHandler .setSessionCookie ("__Secure-Drill-Session-Id" );
285+ } else {
286+ sessionHandler .setSessionCookie ("Drill-Session-Id" );
287+ }
280288 sessionHandler .addEventListener (new HttpSessionListener () {
281289 @ Override
282290 public void sessionCreated (HttpSessionEvent se ) { }
You can’t perform that action at this time.
0 commit comments