Skip to content

Commit 75261dd

Browse files
committed
SAML2: add cookie with HttpOnly too #10013
1 parent 47f6019 commit 75261dd

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

Lines changed: 1 addition & 0 deletions
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)