phpmyadmin / error-reporting-server

phpMyAdmin server side component for the error reporting system
MIT License
20 stars 28 forks source link

Avoid IP leakage in traces #169

Closed emanuelb closed 7 years ago

emanuelb commented 7 years ago

The following issues that has stack-traces contain 'Client IP' field https://github.com/phpmyadmin/error-reporting-server/issues/157 https://github.com/phpmyadmin/error-reporting-server/issues/142 https://github.com/phpmyadmin/error-reporting-server/issues/141 https://github.com/phpmyadmin/error-reporting-server/issues/134 https://github.com/phpmyadmin/error-reporting-server/issues/150

fix:

  1. if possible don't store client IP (is it needed/used?)
  2. if IP information is needed/stored, consider masking(remove latest 2 bytes)/hashing it in logs/traces.
nijel commented 7 years ago

It's not really needed, it's coming from standard CakePHP logging.

nijel commented 7 years ago

I've removed it from the issues. On the other side, there are many logs on the web server which will store the IP address, so I don't think this is worth addressing besides taking care of not disclosing them when creating issues on GitHub.

emanuelb commented 7 years ago

The webserver IP storage in logs can be addressed also by general solutions to IP logging:

  1. not log IPs.
  2. Log masked values (2 bytes stripping is recommended) see: https://piwik.org/docs/privacy/#step-1-automatically-anonymize-visitor-ips
  3. Hashed values (preserve same IP detection always) or encrypted-with-throw-away-keys (preserve same IP detection between rotation of encrypted keys, see slides 23-25 in https://www.eff.org/hope9/privacy-tricks)

taking care of not disclosing them when creating issues on GitHub.

it's better to come up with solution that doesn't rely on taking care, such as disabling output of Client-IP in CakePHP traces.

I've removed it from the issues.

:+1: here the last remaining issues that contain ClientIP to remove:

https://github.com/phpmyadmin/error-reporting-server/issues/135 https://github.com/phpmyadmin/error-reporting-server/issues/136 https://github.com/phpmyadmin/error-reporting-server/issues/137 https://github.com/phpmyadmin/error-reporting-server/issues/138 https://github.com/phpmyadmin/error-reporting-server/issues/140

non stacktrace error: https://github.com/phpmyadmin/error-reporting-server/issues/72