rohityadavcloud commented on a change in pull request #6149:
URL: https://github.com/apache/cloudstack/pull/6149#discussion_r831347939
##########
File path:
plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAMLUtils.java
##########
@@ -280,7 +280,7 @@ public static void setupSamlUserCookies(final
LoginCmdResponse loginResponse, fi
resp.addCookie(new Cookie("timezone", URLEncoder.encode(timezone,
HttpUtils.UTF_8)));
}
resp.addCookie(new Cookie("userfullname",
URLEncoder.encode(loginResponse.getFirstName() + " " +
loginResponse.getLastName(), HttpUtils.UTF_8).replace("+", "%20")));
- resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly",
ApiConstants.SESSIONKEY, loginResponse.getSessionKey()));
+ resp.addHeader("SET-COOKIE",
String.format("%s=%s;HttpOnly;Path=/client/api", ApiConstants.SESSIONKEY,
loginResponse.getSessionKey()));
Review comment:
we might want to take the path from the configurable setting? cc
@Pearl1594 to check if it makes sense to read the variable defined in
server.properties
##########
File path:
plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAMLUtils.java
##########
@@ -280,7 +280,7 @@ public static void setupSamlUserCookies(final
LoginCmdResponse loginResponse, fi
resp.addCookie(new Cookie("timezone", URLEncoder.encode(timezone,
HttpUtils.UTF_8)));
}
resp.addCookie(new Cookie("userfullname",
URLEncoder.encode(loginResponse.getFirstName() + " " +
loginResponse.getLastName(), HttpUtils.UTF_8).replace("+", "%20")));
- resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly",
ApiConstants.SESSIONKEY, loginResponse.getSessionKey()));
+ resp.addHeader("SET-COOKIE",
String.format("%s=%s;HttpOnly;Path=/client/api", ApiConstants.SESSIONKEY,
loginResponse.getSessionKey()));
Review comment:
LGTM otherwise
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]