# Privacy feature request: disabling or hashing logs (using cryptolog or similar)

**URL:** https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417
**Category:** Feature
**Tags:** privacy
**Created:** [January 9, 2017, 4:18pm UTC](https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417 "2017-01-09T16:18:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mrphs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrphs/32/70153_2.png) [@mrphs](https://meta.discourse.org/u/mrphs)
#### Post date: [January 9, 2017, 4:18pm UTC](https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417/1 "2017-01-09T16:18:50Z")

</div>

Hi everyone,

I’ve been recently playing around with an installation of discourse and realized that as an admin, I can see the IP address of all users at all the time. That’s not exactly something I want to see or collect on the server that’s running this platform ([read this post if you’re wondering why](https://medium.com/@justamikeperry/technology-in-hostile-states-ten-principles-for-user-protection-a11968ac3527)). I tried looking in the admin section and couldn’t find a setting to disable logging the IP address, and thought about asking that as a feature request. While logging the IP address might not be exactly useful for most forums, maybe we can take advantage of something like EFF’s [cryptolog](https://github.com/efforg/cryptolog) to hash the IP addresses and anonymize them instead of completely disabling them.

I was wondering if anyone has any experience or insight on this topic. And whether it could be considered to be put as an option in the admin section.

Thanks for the great work!

---

<div class="post-metadata">

### Author: ![mrphs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrphs/32/70153_2.png) [@mrphs](https://meta.discourse.org/u/mrphs)
#### Post date: [January 10, 2017, 4:34pm UTC](https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417/2 "2017-01-10T16:34:02Z")

</div>

More ideas on this topic:  
Maybe under a new section that could be called “data retention policies” we could make use of two settings.

## **- Flush all the logs** **- Remove (or sanitize**1**) logs after [30**2**] days**

1. Sanitize in terms of removing the PII from it. And keeping the rest for useful things like monitoring the number of HTTP errors, etc.

2. If enabled, could have a default number but should configurable by user. Where 0 would basically be never.

---

<div class="post-metadata">

### Author: ![mrphs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrphs/32/70153_2.png) [@mrphs](https://meta.discourse.org/u/mrphs)
#### Post date: [January 14, 2017, 7:19pm UTC](https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417/3 "2017-01-14T19:19:57Z")

</div>

Related topic that I just found:

> [@Possible to not log user IP addresses?](https://meta.discourse.org/t/possible-to-not-log-user-ip-addresses/46502):
>
> In the admin screen for users we can see their last visited and registered IP addresses. In line with my company’s approach to privacy, we don’t want to record these but I can’t see a setting to switch it off. Is there something I’m missing, or would we have to fork Discourse? Or perhaps a plugin could override the code? Any help is appreciated.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 14, 2017, 7:25pm UTC](https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417/4 "2017-01-14T19:25:38Z")

</div>

Totally get where you are coming from and understand that in some countries this is not something you want to collect.

The logs would be the easy part using some sort of plugin. The trickier change is amending Discourse core not to log last IP address for user in the database.

It is all doable, not built-in, but can be done with the right hooks.

---

<div class="post-metadata">

### Author: ![mrphs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrphs/32/70153_2.png) [@mrphs](https://meta.discourse.org/u/mrphs)
#### Post date: [January 14, 2017, 7:41pm UTC](https://meta.discourse.org/t/privacy-feature-request-disabling-or-hashing-logs-using-cryptolog-or-similar/55417/5 "2017-01-14T19:41:33Z")

</div>

The interesting part is that I actually love the counter-abuse measures built in discourse and don’t want to lose them but I believe that’s possible without knowing the exact IP address. Maybe we can redact the last two bytes of the IP, or maybe we can replace it with a unique hash.

It might sound too much to ask, but it would be fantastic if someone who’s already familiar with the code base can point out which parts of the program IP addresses are being logged.
