-
Notifications
You must be signed in to change notification settings - Fork 369
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
New record type: OPENPGPKEY #2370
Comments
Hi Paul! In general I'm weary of adding DNS types that aren't commonly used. Can I see the PR? Tom |
You can preview one here. |
Well, that's quite an impressive bit of coding you've done there. You've even implemented the integration tests. I'd be glad to include this in the project, but you'll be on the hook for maintaining it since it isn't something I have a lot of expertise in. Ok? One code change I'd like to suggest: Shift the logic out of helpers.js into the Go code. A lot of the processing is done in Javascript in helpers.js. That makes it difficult to test and debug. (Not that there aren't testing frameworks for Javascript, but we can't use them because of otto, etc.) In general the functions in helpers.js (like A, CNAME, etc.) just pass along the human input and do the "heavy lifting" in Go. Go has the advantage of the libraries and testing frameworks that we know well. I would suggest putting that code in its own module (for example dnscontrol/pkg/openpgpkey) Tom |
I looked around for places to put the heavy lifting in go because it seems like better APIs are available especially for the UTF8 normalization parts, but there does not seem to be an appropriate place to do so. The multiple pathways seem to be set up to take data immediately from js files and into use in records. Do I just need to be creative or is there a recommended point to start massaging the data so it's ready for use everywhere, irrespective of the ingress route? |
Good question! The Javascript exports the result as JSON. The fields are the names of the object keys. The import is done by the UnmarshlJSON functions in models/record.go:
A good example is the "target" field. It isn't exported. So, the javascript exports it with a field called Your code would do something similar but would do transformations on the data first. |
Any interest in submitting that as a PR? |
Hi Tim, I never got round to this as it requires dumping functions from js
to go. Not quite sure where they'd go until I've spent some time on it. You
may close this if you wish.
|
Would this be interesting?
Some providers support this record type. I mainly did this as code-golf, for fun.
It is PR ready, just needs a re-base.
It required a PR for the miekg lib to fix a buffer issue, which is now merged.
It requires at least miekg/dns@730c265 or 1.1.54
I know many orgs use (ECC) PGP Keys for security disclosures, and some (wish to) post those via DNS.
The text was updated successfully, but these errors were encountered: