-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support issue, issuewild and iodef CAA property tags #11
Comments
Thanks for the suggestion. It has to be prevented that the user or the parse creates a I want to keep the library so that for the user it would be nearly impossible to create an incorrect DNS packet or ambiguous packet. |
We can prevent the user from not making such a mistake by not exposing the enum or checking for such mistakes when encoding the packet. As for creating it when parsing, that would be a bug in the parser. With correct code, it will simply not be possible.
Right now it's trivial for a user to create an incorrect DNS packet by creating a CAA record with a tag of "issue", "issuewild" or "iodef" and then using a value that doesn't parse to the type specified by the RFC. That's what I'm trying to avoid with this suggestion. We can use Rust's type system to avoid that. |
If we are not exposing the enum, how can the user create such RR then? About the parser you are right. |
By doing the construction through methods. Say |
How the user can access the different data? For example, a |
That boils down to your API design choice but here is one way to do it. |
These have value types explicitly defined in the RFC (https://tools.ietf.org/html/rfc8659#section-4.2).
Perhaps instead of having
tag
andvalue
fields for CAA RRs, we could just havevalue
whose type is an enum like?
The text was updated successfully, but these errors were encountered: