New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of cookies to eliminate cookie constent for unregistered users #3624
Comments
Notes from @ajnyga, pulled over from other docs:
While the OJSSID cookie itself does not contain personal data, I think the most important thing is to erase the old sessions from the sessions database table as fast as possible. What I am thinking here is that would it be possible to get the cookie consent as part of the user registration. Alec of course knows if sessions are needed also for users that are not logged in.
But if OJS can be easily used without cookies when user is not logged in, then maybe add the cookie consent to the login form? Just a simple checkbox, "I accept cookies". |
An overview on how the above suggestion could work (ping @jmacgreg @asmecher @bozana):
The alternative of course is that you ask for the consent from all users visiting an OJS site, also those that are not logged in. But I can not figure out where/how you would save the user consent for users who do not accept cookies because I have understood that you need to have the consents before creating cookies and OJS now creates one immediately when you enter an OJS site. Happy to help here if you just point to way you want to go. |
@ajnyga, sounds good, though of course you could use the existing There are a few things that use sessions before a user is logged in (e.g. the language), so this would be a good optional behavior rather than something OJS always did (at least until GDPR-type requirements become more common, which is possible too). |
thanks @asmecher I believe that cookies that store things like language selections are not regarded as cookies that need consent under GDPR because they do not contain or lead to personal data. So one option would be to add selections like language to another cookie. See https://www.automated-intelligence.com/news-and-events/blog/cookies-gdpr-need-know/ ("if you use cookies to uniquely identify a device or the person using that device, that’s now treated as personal data under GDPR"). But this is something @jmacgreg could confirm. Also, I am not sure how it is enforced, but theoretically GDPR also applies to journals that have users coming from the EU, which probably means the majority of journals in Canada (http://www.canadianlawyermag.com/article/getting-ready-for-gdpr-3607/). Of course the main target here are companies, not journals. |
Another question @asmecher how does OJS empty the |
@ajnyga, that's part of PHP's session manager support; see session_set_save_handler, which |
@jmacgreg @asmecher (and @NateWr hoping to see your comments as well, you are not out of the European union yet!) Round-up of the things I am planning to do:
Why use a new cookie? Because, if I have understood correctly, the OJSSID has a very short lifespan and I think we want to prevent the situation where users have to click on the cookie consent all the time. The cookie consent cookie does not have any personal data, so we can give it a long lifespan. Problems:
But most of these can be prevented by first checking if What do you think about the overall plan here? This should not be too much work actually. The other option would be to change OJS so that no cookies are ever created if the user does not log in and the cookie consent is asked when the user logs in. But I could not figure out how to do as a feature you can enable/disable like Alec requested. I think it requires a lot more changes to the code. |
I am probably not the best person to comment on a cookie notice, because I think they're often used when not needed. For that reason, I like the use of a config option here. I think it's ok to have any specific request link to that context's privacy policy. If you'd like, you could add a site-wide privacy policy field to use for requests to the site-wide context. |
In GDPR case cookie notice is needed if the cookie has personal data. I know that OJSSID does not have, but it is connected to some pretty detailed data in the sessions table. So to be honest, I am not 100% sure the OJSSID cookies actually requires a cookie notice according GDPR. See for example https://webmasters.stackexchange.com/questions/114973/are-session-cookies-exempt-from-consent-under-gdpr |
Agreed with the config option. My reading of the above link, @ajnyga, is that session cookies like OJS' probably don't need a notice, and we can advise people of that, but others will likely want the option. |
Thanks for the feedback. @asmecher can you as well look at my suggestion here: #3624 (comment) If it sounds ok, I can do a pr based on that. I think it has a big impact on the way the system works so just to be sure I am missing something. The code changes are actually not that big I think. |
@ajnyga, sorry for the delay. Broadly speaking, without cookies (and without a replacement session mechanism), the I suspect there will not be many of these. The Another option -- just mentioning it for the sake of completeness -- is to use URL-based SIDs until the user has agreed to the cookie policy. I see a lot of potential downsides (e.g. security) and no real need to go there. |
thanks! when do you plan to release 3.1.1.1? |
We were hoping to have it out already, but it looks like it'll still be 1-2 weeks. |
Ok! (maybe this should be mentioned in the forum GDPR thread?) |
Hoping for one more comment to this issue... Cookies that do not have personal data do not require consent. The session cookie itself does not have personal data, but the sessions table does have. However, I began to think whether we could just minimize the personal data in the session. Before the user is logged in, the session table only has these:
I believe we could just encrypt the IP address and the user_agent string before we save it to the sessions table and always compare encrypted values. For the login form, we could add a consent checkbox regarding the privacy policy, which would then mention what is saved to the cookie and to the sessions table. What do you think? Is there a reason why we could not encrypt the IP and the user_agent? |
The above would as simple as adding
here: https://github.com/pkp/pkp-lib/blob/master/classes/session/SessionManager.inc.php#L61-L62 |
Hmm, I'm not sure, but I have a feeling that's starting to circumvent the purpose of the GDPR regulations -- we're storing a key that can uniquely track the user without their consent. I'd lean towards the options that don't generate cookies at all until the consent was given; did you hit a blocker there? |
In general GDPR does not care about cookies at all. It only cares about personal data. So if a cookie stores just some simple settings etc. you do not need consent. IP address is regarded as personal data, but encrypted IP is clearly a different thing. At least I can not see how it would be personal data while it can not be used to identify a person. But with the other approach I did not hit a blocker, just figured that this would be an easier solution and wanted to hear your thoughts. I am on a vacation right now (greeting from Mallorca), but will do a PR next Wednesday. I think only 4-5 files need minor changes. Another thing with GDPR is that it encourages to limit the collection of personal data. So encrypting the IP address, if it is only used to compare existing sessions, would make OJS more GDPR compliant in any case. I have not found any other purpose for IP in the sessions table. |
So the question really is that is encrypting an IP irreversible. |
There's a potentially overlapping request at #1179 to exempt bot user agents from session management. |
With apologies for the delay, @ajnyga -- this is still waiting for review, correct? |
Sorry for the delay, this new github UI does not seem to show new messages the way the old one did... This is not waiting for review yet, because it is not passing tests. I will maybe try another test run today. Have been busy with other things. |
Not a problem, just making sure I haven't forgotten something. |
A new try on this (tests running): pkp/ojs#2106 |
Is this still a requirement or are people satisfying their requirements through a plugin? |
@NateWr , which plugins are there to a) make statistics opt-in and b) set cookies? |
Reading documentation about GDPR and OJS (by James, Antti-Jusi, Dulip... back in 2018) I arrive to this issue.
Nate I don't know about any plugin for OJS 3.x to solve this... apart of an old attempt from Anti-Jussi (for OJS 3.1?). Most of the people solved this adding a cookie-consent library to our header or with customHeader plugin... but:
So yes, I feel it's still important to find a normalized solution to say every OJS respects GDPR (at least at cookie level) "out of the box". We used the brainsum library because:
|
Ok thanks. I had a read over this issue and #6340 and I can see we're touching on several things. Based on the discussion above, we want to be able to run OJS without requiring cookie consent until a user registers. I have updated the issue title and description to reflect this. The comments also discussed using a config option to require a cookie consent notice anyway. When work is ready for that, it should be handled in a separate issue. This issue will focus on running OJS without requiring cookie consent. @ajnyga and @asmecher you've both been active in the discussion above. Can you review the updated comment at the top of this issue to see if it accurately reflects what we want to do? |
Yes, @NateWr, that looks accurate. But we do need to consider how we store the user's current locale if we don't depend on cookies; in the installer a cookie is used directly, and once installed the system uses |
Sorry for the misunderstanding. But even if OJS is able to function without cookies (which, by the way, as they would be "legitimate cookies" I think is a desirable but not essential functionality), plugins will still use them, so the need for a way to block them is still necessary to comply with GDPR, don't you think? @NateWr I searched, but I couldn't find any issue talking about the need of a cookie-consent feature. Should I open one, do you prefer talking it in Discussions or should I start a "feature request"? |
@asmecher is the infrastructure lead so I'll let him decide where he wants to have that discussion. |
I can't think of any plugins that rely on cookies (besides in the use of user sessions), and they would be free to use the PHP |
Probably I'm missing something but, only from the plugins.xml list, we have:
But I recognize I thought we had more than this, so probably we can indicate this in the plugin description and relay in user's responsibility? I feel like we are straying from the main topic of this thread, so if the conversation continues maybe we can talk about it in another thread, discussion, FR or mattermost? |
Those plugins don't rely on cookies, but the services they integrate might. But again, I don't think we have any way to prevent that from happening -- the custom header plugin is a good example; people can put whatever JS they want into it. Maybe I misunderstood what you're proposing? |
If I have understood the EU regulations (GDPR and ePrivacy) correctly, one cannot save cookies without a consent from the user. The cookies in OJS/OMP are not strictly necessary for readers. Hence, OJS/OMP cookies require consent accroding to: Therefore, I think you need to regulate this so that the user needs to give a consent before OJS/OMP can save any cookie (answer yes or no). If a user has dismissed cookies, they need to be asked again for consent if they wish to login. |
PKP and CRAFT-OA projects are working together to make OJS full GDRP compliant "out of the box". The approach is just the way you summarize: no cookies will be created till visitor's explicit agreement. Not sure when all this work will see the light but won't be so far. @asmecher, now I noticed I missed to answer your comments:
Exactly. The services called by the plugin asks for a JS that creates a cookie.
In parallel to the work Dulip is doing to remove the OJS session cookie, what I was proposing was to develop a plugin that removes any cookies that have been created by third party services. That is easy to implement with libraries like cookieconsent. Actually, that's what we were implementing in our journals to deal with cookies from Google Analytics (which we don't need anymore because now we use plausible), Twitter, etc. Here is a test journal: https://revistes.uab.cat/periodicum/ One possible answer is "our obligation is to OJS, not to third party services" but third party services are called from OJS plugins... so it doesn't seem out of place to me to apply an extra protection mechanism to cover these cases. |
Describe the problem you would like to solve
OJS creates a session cookie for every user who visits a journal. This requires journal providers under European GDPR laws to get consent to use a cookie from every user.
This is annoying and unnecessary for readers of the journal. And it is difficult to configure for publishers.
Describe the solution you'd like
Remove the requirement to use cookies for users without an account in the journal. That way, the journal only needs to seek consent to use cookies when a user registers a new account.
Who is asking for this feature?
Publishers operating under European GDPR laws.
Additional information
The comments below discuss several aspects of GDPR compliance:
This issue overlaps with general improvements to session/cookie management: #6340.
The original issue description is below:
The text was updated successfully, but these errors were encountered: