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

Improve ips/domains view to also include properties of domains/ips respectively #69

Open
honoki opened this issue Jun 10, 2021 · 0 comments

Comments

@honoki
Copy link
Owner

honoki commented Jun 10, 2021

At the moment bbrf ips pulls a list of all documents of the type "ip" that belong to a program. However, the CouchDB currently stores IPs in two ways:

  1. As individual documents, e.g. a document with identifier 1.1.1.1 and type ip;
  2. As properties of a domain, e.g. a document with identifier one.example.com and type domain that has property: "ips":["1.1.1.1"]

BBRF does not enforce any kind of synchronization between these representations of IP addresses, which means there is a possibility that an IP may exist as a property of a domain, but not as a unique document in the database (and vice-versa).

It may be a useful addition to ensure both types of IP addresses get returned when running the bbrf ips command, to make abstraction of the way IPs are stored in the database. This would allow you to run e.g.:

bbrf domain add one.example.com:1.1.1.1
bbrf ips # includes 1.1.1.1

# whereas at the moment, this requires `bbrf ip add 1.1.1.1` first

The same would apply for bbrf domains.

Will keep this issue open while I contemplate the impact of this change further. Input welcome!

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

1 participant