Is there any prior research that describes how a cookie, or cookie
alternative would be used to provide such a guarantee?
I don't think you can provide such a guarantee, except by perhaps saying so in your privacy policy and then following that policy.
The scope would be restricted to a one, or a very limited set of URLs,
Setting scope can be done by the secure flag and by the domain and path attributes when the cookie is set. However, it is very hard for the end-user to track this using a normal browser; Say you restrict your cookie to the path /loggedIn
. If the user visits your URL /information
, on first glance it appears that your site won't be receiving the cookie for requests to this URL. However, the page may be making requests to /loggedIn
using JavaScript or via resource requests, enabling the user to be stealthily tracked.
Yes, a privacy concerned user could check this. However, if they were that concerned about privacy they would simply clear their cookies anyway, making your complex cookie policy and implementation useless.
The client setting the cookie name and value doesn't solve this problem. You could be still tracking the user server side using the cookie name and value information. I disagree with ThoriumBR about Session Fixation because I don't think that this increases the risk of such an attack. If the attacker can set the cookie on the victim's browser, then it is irrelevant whether this cookie is a user chosen name and value or a sever chosen name or value. Also it doesn't change the risk level of another similar vulnerability - Login CSRF. Yes if the vulnerability exists then the attacker could log in the user into the attacker's account and set the cookie name and value, however setting the cookie name and value doesn't add any value in itself.
If you're concerned that using cookies will dissuade privacy conscious users from using your site then you do not need to use them at all in order to maintain client-side state. One way is to make your site work via post-backs only. That is, every site action and navigation causes a POST request to be made, and the POST data contains a token to server side state.
e.g.
<form method="post" action="/siteAction">
<input type="hidden" name="token" value="aaaaaaaaaaaaaaaaaaaaaa" />
<input type="hidden" name="action" value="navigateAccountPage" />
<input type="hidden" name="params" value="{foo: 'bar'}" />
</form>
*params
should be html encoded, however left out for simplicity's sake
This will allow you to store state client-side without the need for any cookies. The user knows they are not being tracked as they can simply check their browser cookies and storage (technically HTML5 storage, Flash and Silverlight to be thorough).