# Session Cookie Does Not Contain the "Secure" Attribute

**URL:** <https://discuss.codelibs.org/t/session-cookie-does-not-contain-the-secure-attribute/2207>\
**Category:** English:Fess\
**Created:** [July 25, 2023, 11:44am UTC](https://discuss.codelibs.org/t/session-cookie-does-not-contain-the-secure-attribute/2207 "2023-07-25T11:44:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firas\_Chikhrouhou1](https://discuss.codelibs.org/user_avatar/discuss.codelibs.org/firas_chikhrouhou1/32/550_2.png) [@Firas\_Chikhrouhou1](https://discuss.codelibs.org/u/Firas_Chikhrouhou1)\
**Post date:** [July 25, 2023, 11:44am UTC](https://discuss.codelibs.org/t/session-cookie-does-not-contain-the-secure-attribute/2207/1 "2023-07-25T11:44:31Z")

</div>

Vulnerability Info:  
The secure cookie flag is an option that can be set by the application server when sending a new cookie to the user within an HTTP Response. The purpose of the secure flag is to prevent cookies from being observed by unauthorized parties due to the transmission of a the cookie in clear text.

Solution:  
The fix that i am proposing is Secure the Cookies Session adding the “Secure” attribute into the session-config section on: fess-14.6.1/app/WEB-INF/web.xml

Result:  
the cookies are still not secured even i added below lines on web.xml  
 ![image](https://discuss.codelibs.org/uploads/default/original/1X/37949aac1d72c2eefd33f6c9b9b6bf79020c4ff8.png)

---

<div class="post-metadata">

**Author:** ![Firas\_Chikhrouhou1](https://discuss.codelibs.org/user_avatar/discuss.codelibs.org/firas_chikhrouhou1/32/550_2.png) [@Firas\_Chikhrouhou1](https://discuss.codelibs.org/u/Firas_Chikhrouhou1)\
**Post date:** [July 25, 2023, 11:45am UTC](https://discuss.codelibs.org/t/session-cookie-does-not-contain-the-secure-attribute/2207/2 "2023-07-25T11:45:34Z")

</div>

@shinsuke could you please help me on this topic

---

<div class="post-metadata">

**Author:** ![shinsuke](https://discuss.codelibs.org/user_avatar/discuss.codelibs.org/shinsuke/32/6_2.png) [@shinsuke](https://discuss.codelibs.org/u/shinsuke)\
**Post date:** [July 25, 2023, 12:29pm UTC](https://discuss.codelibs.org/t/session-cookie-does-not-contain-the-secure-attribute/2207/3 "2023-07-25T12:29:28Z")

</div>

It’s in tomcat\_config.properties.
