This FAQ section covers common questions about the adscsrf and _zcsr_tmp cookies used in ADSelfService Plus. It aims to explain their role in cross-site request forgery (CSRF) protection and overall portal functionality, and clarifies any security concerns related to the absence of the HttpOnly flag.
FAQ
Q: Why are some cookies in ADSelfService Plus not set as HttpOnly?
A: The adscsrf and _zcsr_tmp cookies are used as CSRF tokens. For CSRF protection to work, these cookies must be accessible to client-side scripts (JavaScript) so they can be included in request headers and validated by the server. Setting the HttpOnly flag would prevent this access and break the intended functionality.
Q: Do cookies without the HttpOnly flag pose a security risk?
A: These cookies are not used for session management or to store sensitive authentication data. Their sole purpose is to enable CSRF protection, so not marking them as HttpOnly does not introduce a security risk to the application in this context.
Q: Can the adscsrf and _zcsr_tmp cookies be set as HttpOnly?
A: No. Setting them as HttpOnly would prevent JavaScript from reading these values, which is necessary to submit them with requests for proper CSRF validation by the server. This is standard in web applications implementing CSRF protection mechanisms.
Q: What are best practices for cookies used in CSRF protection?
A:
CSRF token cookies should be accessible to client-side code (i.e., should not be HttpOnly).
Ensure these cookies are only used for CSRF protection and do not carry sensitive session data.
Use Secure and SameSite attributes where possible to further limit risk.