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

Better external IP anonymization interface #131

Open
sfraint opened this issue Oct 31, 2019 · 1 comment
Open

Better external IP anonymization interface #131

sfraint opened this issue Oct 31, 2019 · 1 comment

Comments

@sfraint
Copy link
Contributor

sfraint commented Oct 31, 2019

Today, to use IP-address-anonymization from Netconan externally, you can do something like:

from netconan.ip_anonymization import IpAnonymizer, anonymize_ip_addr
import uuid

salt = str(uuid.uuid4())
anonymizer = IpAnonymizer(salt=salt)
anon_str = anonymize_ip_addr(anonymizer, '1.2.3.4')

But it would be nice to have a better string-based IP-address anonymization interface in the anonymizer objects themselves.

There is an existing method IpAnonymizer.anonymize(addr), but this operates on an unintuitive type (int) and relies on the caller to do all the work (i.e. convert IP address to int, check if the address needs to be anonymized).

@sfraint sfraint changed the title Better external IP-address-anonymization interface Better external IP anonymization interface Oct 31, 2019
@Kircheneer
Copy link
Contributor

Possibly #186 addresses some of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants