Skip to content

Commit f9b1767

Browse files
SAML2: add cookie with HttpOnly too #10013 (#10047)
1 parent 4876761 commit f9b1767

File tree

1 file changed

+1
-0
lines changed
  • plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml

1 file changed

+1
-0
lines changed

plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAMLUtils.java

+1
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ public static void setupSamlUserCookies(final LoginCmdResponse loginResponse, fi
320320
String sessionKeyCookie = String.format("%s=%s;Domain=%s;Path=%s;%s", ApiConstants.SESSIONKEY, loginResponse.getSessionKey(), domain, path, sameSite);
321321
s_logger.debug("Adding sessionkey cookie to response: " + sessionKeyCookie);
322322
resp.addHeader("SET-COOKIE", sessionKeyCookie);
323+
resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly;Path=/client/api;%s", ApiConstants.SESSIONKEY, loginResponse.getSessionKey(), sameSite));
323324
}
324325

325326
/**

0 commit comments

Comments
 (0)