Skip to content
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

Enable IP anonymisation by default, let users disable anonymisation during Piwik installation #5052

Closed
mattab opened this issue Apr 28, 2014 · 17 comments
Assignees
Labels
c: Privacy For issues that impact or improve the privacy. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Apr 28, 2014

The goal of this ticket is to help Piwik users ensure they comply with advanced Privacy legislation by default, while giving them a chance to disable advanced privacy features, in this case: IP anonymisation.

Steps:

  • Add a new message and checkbox on the last step of the installer. Proposed message:
  • When users visit your website, Piwik will not use the full IP Address (such as $IP) but instead Piwik will anonymise it first (to $IP_ANON). IP address anonymisation is one the requirement set by the law in some countries such as Germany.
    [x] Anonymise IP addresses of users in Piwik (better privacy)

Reasoning to enable by default:

  • More countries are working to implement stronger privacy laws around data usage and storage. One key requirement to be compliant is that the IP must be anonymised to prevent the Piwik administrator from finding out the unique visitors and where they connected from.
  • Piwik aims to provide state of the art privacy settings: Privacy & Analytics. We have a chance to show leadership in collecting less information about individual users.
  • We've participated in online rallies against mass surveillance and promoting importance of privacy
  • It was suggested by FSF during their review of ethics around privacy
  • It is important to help our users whom many are German to be compliant with their local privacy laws.

Please comment with any feedback, suggestion or question.

@mattab
Copy link
Member Author

mattab commented Jun 16, 2014

Also this was requested by FSF as part of making Piwik a GNU package: #5276

  • Could you make IP address anonymisation the default? Protecting users' privacy is an important responsibility.

Also:

@mattab mattab added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@mattab mattab modified the milestones: Piwik 2.5.0, Short term Aug 3, 2014
@mattab mattab modified the milestones: Piwik 2.9.0, Short term Oct 22, 2014
@mattab mattab removed the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Oct 22, 2014
@mattab
Copy link
Member Author

mattab commented Oct 31, 2014

See also Let users deactivate DoNotTrack feature during installation #6566

@mnapoli mnapoli self-assigned this Nov 2, 2014
@mnapoli
Copy link
Contributor

mnapoli commented Nov 2, 2014

Could we maybe explain also if this has any impact on some features (like geolocation, user tracking)?

For example me I'm not familiar enough with every feature of Piwik and that's an information I would like to have: I would be OK to leave this option enabled but I would need to know the tradeoffs.

@mnapoli
Copy link
Contributor

mnapoli commented Nov 2, 2014

@mattab I wasn't sure where to put the form honestly. I gave it a go, any feedback?

capture d ecran 2014-11-03 a 11 44 01

I'm planning to add #6566 afterwards.

mnapoli added a commit that referenced this issue Nov 2, 2014
@mattab
Copy link
Member Author

mattab commented Nov 2, 2014

Nice!

feedback:

  • if the user reloads the "Congratulations" page then the IP anonimiser will not be enabled and it will load the dashboard. Somehow it's important that we enable by default and let user deactivate it. So maybe you can activate it in the background of JavaScript Tracking Code step, and then let user deactivate it.
  • make the default anonimisation two bytes instead of one (A.B.0.0)
  • maybe the border around settings can be removed
  • set by the law -> set by the privacy laws

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

if the user reloads the "Congratulations" page then the IP anonimiser will not be enabled

Actually the anonymizer is enabled when the page is shown. Then the form is optional: if you submit it, what you checked gets saved. If you don't, the default was already applied.

maybe the border around settings can be removed

That's how forms are rendered. I took example on the other steps of the installation to have the form, I have no idea how to customize it, especially since the form library is an old PEAR library and I couldn't find any decent doc online (no docs either on developer.piwik.org). Anyway maybe it's not so bad because I'll be adding #6566 and we'll have several checkbox so borders make sense.

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

make the default anonymisation two bytes instead of one (A.B.0.0)

By default today it's 1 byte. Should I change the default in the class? Or should I manually set 2 bytes in the installation?

I'm afraid that:

  • if I change the default in the class, will it affect previous installs that haven't changed the default value?
  • if I don't change the default in the class, then that's completely messy: the default setting value will be 1, but actually the installation process overrides it by storing in database a new default value of "2" (for every new Piwik install)

I'd rather go with changing the default value in the Config class TBH.

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

OK so actually I think we need to discuss this further and find a consistent solution with #6566

Here is the default config in the code:

namespace Piwik\Plugins\PrivacyManager;

class Config
{
    private $properties = array(
        'doNotTrackEnabled'         => array('type' => 'boolean', 'default' => true),
        'ipAnonymizerEnabled'       => array('type' => 'boolean', 'default' => false),
        'ipAddressMaskLength'       => array('type' => 'integer', 'default' => 1),
    );
  • do not track is enabled
  • ip anonymization is disabled
  • ip anonymization mask length is 1

Currently in my branch I manually enable "ip anonymization" in the controller (during the installation), which will store true in database thus overriding the class default. I think that's useless to do that if we can simply change the default value in the class. Same for the mask length.

I should only store the setting value in database if it differs from the default PHP value (I'm talking only about the install steps).

What do you think?

@mattab
Copy link
Member Author

mattab commented Nov 3, 2014

 Actually the anonymizer is enabled when the page is shown.

sounds good!

Anyway maybe it's not so bad because I'll be adding #6566 and we'll have several checkbox so borders make sense.

+1

will it affect previous installs that haven't changed the default value?

I don't think it would as we 'should' have stored the number of bytes.

By default today it's 1 byte. Should I change the default in the class?

+1 - created an issue so it's notified in changelog #6579

@mattab
Copy link
Member Author

mattab commented Nov 3, 2014

I think that's useless to do that if we can simply change the default vale in the class. Same for the mask length.

Sure, changing default is better.

There is this requirement:

  • new default privacy settings should affect only new installation of piwik
  • existing installation that use IP anon or DNT (or don't use it) should not be affected by upgrading to 2.9.0 (especially we shouldn't enable IP anonimisation and DNT if user had it disabled before upgrade)

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

so is that OK to change the default values in the Config class then?

@mattab
Copy link
Member Author

mattab commented Nov 3, 2014

I guess so but I haven't tested so I can't confirm

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

I have tested with a new account: no value is stored in database (so the default options are used from the config files). If I change the settings of the user, then settings are stored in database afterwards.

So if we change the class default values:

  • users that have modified the preferences will not see changes
  • users that haven't modified the privacy preferences will see changes, e.g. IP anonymization will be enabled in 2.9 whereas it wasn't in 2.8

So I guess that we can't use that solution…

@mattab
Copy link
Member Author

mattab commented Nov 3, 2014

I propose that you change the default and then add an Upgrade file for 2.9.0 that will disable IPAnon if it was "unset". So that for users who upgrade that never changed it, we keep their old settings (no IP anonimisation)

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

OK I think we have 3 options:

  • change the default value and users that haven't enabled IP anonymization will have it enabled in 2.9: bad per the requirements
  • leave the default value "disabled", and enable it in the installation process: bad IMO, what is the point of a default value if it is overridden by a different default in every new install… This will be confusing as hell, especially when we forget about this ticket and wonder why it works that way. And is that possible to install Piwik without going through the web installation process? Then IP anonymization will be disabled by default…
  • in the 2.9 upgrade we set "IP anonymization" as "disabled" when it is not configured, and we change the default value as "enabled". That way old installs will keep working the same, and new installs will use the new default value ("enabled"). A bit better, but requires a migration.

By the way the last solution is just a patch up and doesn't prevent the whole thing from happening again, or happening for other settings too…

@mnapoli
Copy link
Contributor

mnapoli commented Nov 3, 2014

ha missed your comment! OK so that's the solution I prefer too!

@mnapoli mnapoli changed the title Enable IP anonimisation by default, let users disable anonymisation during Piwik installation Enable IP anonymisation by default, let users disable anonymisation during Piwik installation Nov 3, 2014
mnapoli added a commit that referenced this issue Nov 3, 2014
…vious Piwik installs, a migration script disable it on upgrade to 2.9.
mnapoli added a commit that referenced this issue Nov 3, 2014
…an enrich

The PrivacyManager plugins adds 2 settings to that form to let user disable (enabled by default) DoNotTrack and IP anonymization
@mattab mattab closed this as completed Nov 3, 2014
@mattab
Copy link
Member Author

mattab commented Nov 3, 2014

👍

see also #6160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Privacy For issues that impact or improve the privacy. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants