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

Decide on consistent terminology for test targets #1531

Open
mxsasha opened this issue Oct 17, 2024 · 1 comment
Open

Decide on consistent terminology for test targets #1531

mxsasha opened this issue Oct 17, 2024 · 1 comment

Comments

@mxsasha
Copy link
Collaborator

mxsasha commented Oct 17, 2024

Much of our code uses the word "domain". This has multiple meanings, which are mixed up, and this is causing repeated ambiguity, confusion, and wasted time. We should fix this. The first step is figure out new names, and start using them in new or modified code or the database.

See for example:

class DomainTestDnssec(BaseTestModel):
timestamp = models.DateTimeField(auto_now_add=True)
domain = models.CharField(max_length=255)
report = ListField(default="")
status = EnumField(DnssecStatus, default=DnssecStatus.insecure)
log = models.TextField(default="", null=True)
score = models.IntegerField(null=True)
max_score = models.IntegerField(null=True)
maildomain = models.ForeignKey(MailTestDnssec, null=True, related_name="testset", on_delete=models.CASCADE)

Is the domain field the domain entered by the user? What is maildomain? And why does maildomain (through DomainServersModel) have a domain field as well, which is not an FK? Is that the same as the other domains? etc.

There are a few different things referred to as "domain" (and sometimes, "hostname"):

  • A. The test target entered by the user or in the API request. Often a domain, but far from always. Any DNS name will do.
  • B. A name of a specific server for/against which we run a test. For example, the list of NS or MX records derived from A.
  • C. An IP of A or B.

There is some hierarchy: for NS RPKI we take A, find all NS (B), then find each IP (C), then check RPKI status. It's not perfectly uniform - for web we take A, find all IPs on that label (C), then run TLS against it. For mail TLS we take A, find all MX records (B), resolve those to IPs and run against one v4 and one v6 IP (C).

The word "domain" fits nowhere, so we can recognise old code by it still using that term. I still haven't come up with great terms especially for A and B though.

Any changes here would be reflected in our docs or labels, but probably not in the user frontend.

@apio-sys
Copy link
Contributor

Maybe simply "host" or "hostname" would ne a more appropriate term for A and B?

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

No branches or pull requests

2 participants