Open frostaloha opened 2 months ago
Thanks for filing this proposal! Two questions:
The consent data that you capture in the below object looks rich. Is the site able to read it? Is it intended to persist longer than website data? Does it have an expiry mechanism? The risk here is that this data can be used as an identifier.
{
"consent": "custom"
"categories": [
{
"consent" : "allow":
"name": "Required",
// ...
},
{
"name": "Advertisement":
"consent" : "deny":
},
// ...
]
}
You write "… may block cookie requests from malicious websites." and "The browser may block the attempt to set the cookies that have been explicitly denied by the user." However, few websites work with cookies fully blocked. How do you mean so called necessary cookies should work?
Motivation
Currently, websites are required to present users from the EU with a dialog for selecting which cookies to accept. While the motivation behind this law is understandable, the resulting workflow is difficult to describe as convenient for both users and websites.
At the same time, cookie consent messages are commonly blocked using an Adblock lists (e.g., "I don't care about cookies"). While this approach is effective in removing these messages, it does not allow the user to control how the cookies are managed—whether they are accepted, rejected, or dismissed without a clear response. Additionally, there is no option to selectively accept or reject specific cookies.
At Aloha, we believe it's time for a paradigm shift in how cookie consent is managed. We propose moving it from the website level to the browser level, providing a more user-centric and effective approach to privacy management.
Key features of the proposed standard
Proposed Solution Details
The workflow
1. User Website Access:
Upon a user's visit to a website, the website initiates the consent management process.
2. Browser Capability Check:
The website queries the browser to determine if it supports advanced cookie management features.
3. Preference Handling:
The website processes the retrieved preferences.
4. Browser Consent Dialog:
The browser displays a consent dialog to the user, incorporating the information provided by the website about the specific cookie categories.
5. User Choice Communication:
The user's consent decision is communicated back to the website, which then applies the chosen settings to the website’s operation.
6. Future Visit Preferences:
The browser may store the user's decision for future interactions with the website. In subsequent visits, the browser may use the "allowCustom" preference to relay the saved settings back to the website, streamlining the consent process.
Mandatory Part
It is proposed to implement a browser API that enables websites to determine and manage the user's cookie preferences. This API would function similarly to the "ethereum" object in the browser's JavaScript API, which facilitates interaction with wallet-enabled websites.
A new
cookiesConsentManager
object would be introduced to theglobalThis
scope, with aconsentPreferences
property reflecting the user's choices, which are likely configured within the browser interface. TheconsentPreferences
object would contain the following values:If the value is set to
allowCustom
, this indicates that the user has specified detailed preferences, as described below.Detailed Preferences
When the
consentMode
is set toaskEveryTime
, the functioncookiesConsentManager.AskForPreferences(SelectableCookies selectableCookies)
should be invoked, passing aSelectableCookies
object. This object describes the cookie categories and optionally the companies that utilize them. For each category, a name, description, and list of associated companies can be provided. Each company entry may include a name, domain, and description.If a website does not support custom selection for certain cookie categories, it should indicate this by setting the
supportCustom
property tofalse
. The default value for this property istrue
.When
supportCustom
is set tofalse
for a particular category, the browser should restrict the user from choosing any options other than "allow all" or "deny all" for that category.This ensures that the user's choices are consistent with the website's supported functionality.
Additionally, if a specific category is crucial for the site, the site can set
required
totrue
, and the browser must not allow this category to be unchecked. The default value isfalse
.If the site sets
required
totrue
in the root element, it indicates that the site cannot function without cookies, and the user must either accept them or leave the site.Example:
The
AskForPreferences
function returns a similar (or even the same) object, with an addedconsent
field for each item.This field can contain one of the following values:
-
allow
: The user accepted the cookies described by this object and all its descendants-
deny
: The user rejected the cookies described by this object and all its descendants.-
custom
: The user made a detailed selection, requiring inspection of child objects.Example:
- If the user selects to allow all or to deny all, the
consent
field in theSelectableCookies
object is set toallow
ordeny
, respectively.- If the user allows or denies specific categories, the
consent
field at the object level is set tocustom
, with the corresponding category-levelconsent
fields reflecting the user's choices.- If a category-level field is
custom
, this indicates that the user has chosen to allow or deny cookies from specific companies within that category.Example, returned object, case 1: User allowed all cookies
Top-level
consent
is set toallow
, so, all other elements should be ignoredExample, returned object, case 2: User allowed some categories
Top-level consent is set to custom, so, it is required to traverse child elements/
User allowed "Required" cookies cagtegory and denied "Advertisement" category.
Example, returned object, case 3: User allowed some companies within category
Top-level consent is set to custom, so, it is required to traverse child elements.
Consent in "Required" cookies category also set to custom, therefore, user chose specific companies. In the example below, they chose to allow cookies from company "Parther1" and deny cookies from company "Parther2":
Optional Features
Non-Compliance Notifications
In the event that cookies are explicitly denied by the user, but the website attempts to set them regardless, the browser may take the following actions: