wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
730 stars 713 forks source link

setCookie always sets an encoded value in authentication scripts #5765

Open rksk opened 5 years ago

rksk commented 5 years ago

Even if we disable "sign" and "encrypt" as below

setCookie(context.response, "name1", "value1", {"expires" : "session",
                                            "path" : "/",
                                            "httpOnly" : false,
                                            "hostOnly" : false,
                                            "secure" : false,
                                            "encrypt" : false,
                                            "sign" : false});

The cookie sent to the browser has the following format base64encode({"signature": null,"value": "value1"})

Suggestions

[1] https://docs.wso2.com/display/IS570/Adaptive+Authentication+JS+API+Reference#AdaptiveAuthenticationJSAPIReference-setCookie(response,name,value,properties)

senthalan commented 5 years ago

I have created https://github.com/wso2/product-is/issues/5758 to track the 2nd suggestion

ruwanta commented 5 years ago

In the documentation please add the following.

  1. The cookie is only interpreted by Identity server.
  2. Please do not make any assumption about the cookie value or format.
  3. Please do not access the cookie with front end Javascript.