matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.94k stars 2.66k forks source link

Allow Live API module regardless of Visit Log deactivation #21000

Open 9joshua opened 1 year ago

9joshua commented 1 year ago

This issue incorporated the Live API module, making it unavailable if the Visit Log is deactivated: https://github.com/matomo-org/matomo/issues/16259

Some users still need access to the Live API even if they don't want the visit Log in their UI.

Suggest adding an additional option to deactivate the Live API module for more flexibility...

image

tsteur commented 1 year ago

Note that for privacy compliance reasons this is a feature we cannot develop unless it's behind a config ini setting. For GDPR compliance the API needs to be blocked too when this feature is disabled.

9joshua commented 1 year ago

I think having the option secured within a config setting would be acceptable for most users who need this - especially if the setting is available to Cloud users as well.

michalkleiner commented 1 year ago

Apologies @9joshua, I've looked at the linked issue but I'm not 100% sure I understand what is the enhancement. Can you maybe describe it in detail/in other words what config option we'd need to add and what it controls, and whether there's still a further UI setting that enables/disables something? And what that something is? Appreciate that!

sgiehl commented 1 year ago

@michalkleiner We have the possibility to disable visits log and visits profile in the UI. When the visits log is disabled, this will automatically also disallow any calls to Live.getLastVisitsDetails. The issue here is around allowing access to that API method, while still disabling the visits log in the UI.

@9joshua This might be something we could implement, but keep in mind, that enabling the API again, would allow any user to access it.

9joshua commented 1 year ago

Hi @michalkleiner - If the Visitor Log is disabled via the general or website settings, access to the Live API module is also blocked. There are instances where a user may still want to use the Live API for real-time reporting even though they have disabled the Visitor Log.

Not all data in the Live API module would necessarily result in a breach of privacy policy or regulation - for example the Live.getCounters returns no personally identifiable information and other Live methods can be used with the showColumns parameter to prevent requests containing PII.

Suggest adding a config ini setting which can override the disabling of the Live API module when the Visitor Log is disabled.

sgiehl commented 1 year ago

Live.getCounters is still available with disabled visits log. Only Live.getLastVisitsDetails is disabled. And opening up that method means that anyone, having view access, can request any data. Even if providing certain values of showColumns wouldn't result in returning PII, that won't prevent anyone from requesting PII. And that is where the problem is. In terms of privacy you can't guarantee that anyone might have requested relevant data.

michalkleiner commented 1 year ago

Thanks for the extra details and explanation @sgiehl and @9joshua!

randy-innocraft commented 4 months ago

Hi @9joshua. Thank you for creating the issue and bringing this to our attention, that's very appreciated. We have reviewed and triaged this ticket internally. Our team will prioritise this, and we will update you on the progress here when we have an update to share. If you have any further information or questions, please feel free to add them here.

9joshua commented 1 month ago

Another Cloud customer cannot access the Live API after following our CNIL compliance guide which includes disabling visitor profiles & the visits log. They have asked if there could be an option to separately allow Live API calls in this scenario, perhaps with a delay to keep real-time data inaccessible. Not sure how this would work with privacy regulations.

Their position is that yesterday's data is not "Live" data and should not be restricted.