Description
It seems that HADOOP-10379 introduced a bug on how hadoop.auth cookies are being constructed.
Before HADOOP-10379, cookies were constructed using Servlet's Cookie class and corresponding HttpServletResponse methods. This was taking care of setting attributes like 'Version=1' and double-quoting the cookie value if necessary.
HADOOP-10379 changed the Cookie creation to use a StringBuillder and setting values and attributes by hand. This is not taking care of setting required attributes like Version and escaping the cookie value.
While this is not breaking HadoopAuth AuthenticatedURL access, it is breaking access done using HtttpClient. I.e. Solr uses HttpClient and its access is broken since this change.
It seems that HADOOP-10379 main objective was to set the 'secure' attribute. Note this can be done using the Cookie API.
We should revert the cookie creation logic to use the Cookie API and take care of the security flag via setSecure(boolean).
Attachments
Attachments
Issue Links
- is related to
-
HADOOP-10911 hadoop.auth cookie after HADOOP-10710 still not proper according to RFC2109
- Closed