Question
How do we enable Secure Flag in Set-Cookie Request Header in Digital.ai Release and Deploy?
Steps to follow
XLRelease
- Stop the Release server
- Go to the $XLRelease_HOME/conf/xl-release-server.conf file and add the following token:
secure.cookie.enabled=true
- Save the file
- Start the XLRelease server
- Verify the output as below:
If you try sample Release curlers you should see the output below with Set-Cookie with Secure flag:
#curl -i -X GET http://localhost:5516/support/system-information -v -u admin
HTTP/1.1 200 OK
Date: Thu, 15 Jun 2023 18:50:19 GMT
Set-Cookie: XSRF-TOKEN=2aaad4a8-4240-4ab0-8115-61a33b730f5c; Path=/; Secure; SameSite=Lax
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Vary: Accept
Content-Language: en-IN
Content-Type: application/json;charset=utf-8
X-Frame-Options: SAMEORIGIN
Set-Cookie: JSESSIONID=MDI3OGM4MmItNGMxOC00NmVlLWJlZWQtZjFkNGZhYjZiYzRj; Path=/; Secure; HttpOnly;
SameSite=Lax
Vary: Accept-Encoding, User-Agent
Content-Length: 4424
Note: The same is observed in the browser with Developer Tools -> Storage Tab -> Cookies -> Cookie JSESSIONID -> With Secure enabled.
Deploy:
- Stop the Deploy server
- Go to $XLDEPLOY_HOME/centralConfiguration/deploy-client.yaml file and set the following token, which will be false by default.:
secure-cookie-enabled: true
- Save the file
- Start the Deploy server
- Verify the output as below:
If you try sample XLDeploy curlers you should see the output below with Set-Cookie with Secure flag
#curl http://localhost:4516/xldeploy/server/state -i -X GET -v -u admin
HTTP/1.1 200 OK
Date: Thu, 15 Jun 2023 07:58:53 GMT
Set-Cookie: XSRF-TOKEN=6bbc3dd9-dc46-43da-8120-18a95f3ec696; Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Language: en-IN
Content-Type: text/xml;charset=utf-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Set-Cookie: SESSION_XLD=; Max-Age=0; Expires=Thu, 1 Jan 1970 00:00:00 GMT; Path=/; Secure; HttpOnly;
SameSite=Lax
Content-Length: 65
RUNNING
Note: The same is observed in the browser with Developer Tools -> Storage Tab -> Cookies -> Cookie SESSION_XLD -> With Secure enabled.
Comments
Please sign in to leave a comment.