Internet-Draft | HttpOnlyPrefix | February 2025 |
Weiss | Expires 29 August 2025 | [Page] |
This draft introduces the __HttpOnly and __HttpOnlyHost cookie name prefixes that ensure the cookie was set with an HttpOnly attribute.¶
This note is to be removed before publishing as an RFC.¶
The latest revision of this draft can be found at https://yoavweiss.github.io/httponly_prefix/draft-httponlyprefix-weiss-http.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-httponlyprefix-weiss-http/.¶
Source for this draft and an issue tracker can be found at https://github.com/yoavweiss/httponly_prefix.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 29 August 2025.¶
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
There are cases where it's important to distinguish on the server side between cookies [COOKIES] that were set by the server and ones that were set by the client.¶
One such case is cookies that are normally always set by the server, unless some unexpected code (an XSS exploit, a malicious extension, a commit from a confused developer, etc.) happens to set them on the client.¶
This draft add a signal that would enable servers to make such a distinction.¶
More specifically, it defines the __HttpOnly and __HttpOnlyHost prefixes, that make sure that a cookie is not set on the client side using script.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
These requirements apply to cookies set in Set-Cookie
response headers by the server,
as well as ones received in a Cookie
request header from the client.¶
These requirements apply to cookies received in a Set-Cookie
response header from the server.¶
There are no particular security considerations. These new prefixes will only limit the ability of non-compliant cookies to be set. They do not open up new capabilities for server to set cookies where they previously could not.¶
This document has no IANA actions.¶
TODO acknowledge.¶