-
Notifications
You must be signed in to change notification settings - Fork 199
Add CAA record support to GeoDNS #144
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: abh <16861+abh@users.noreply.github.com>
Co-authored-by: abh <16861+abh@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for CAA records in GeoDNS, enabling domain owners to specify authorized Certificate Authorities. Key changes include adding CAA record type mapping and parsing logic in zones/reader.go, new test coverage in zones/reader_test.go, and updated documentation in README.md.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| zones/reader.go | Added mapping and parsing logic for CAA records. |
| zones/reader_test.go | Introduced tests to verify the proper creation and handling of CAA records. |
| README.md | Updated documentation with CAA record examples and explanations. |
Comments suppressed due to low confidence (2)
zones/reader.go:500
- It may be unclear that the 'weight' field is stored in the Record.Weight property rather than in the dns.CAA struct. Consider adding a brief comment to explain this design decision.
if rec["weight"] != nil {
zones/reader_test.go:250
- [nitpick] Consider adding an explicit assertion to verify that the weight defaults to 0 for records (like issuewild) that do not set a weight, to ensure complete test coverage.
assert.Equal(t, uint8(0), issuewild.Flag, "Issuewild CAA record flag should default to 0")
abh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration for CAA records should be in the DNS record text format (similar to a bind zone file) rather than as structured JSON.
Co-authored-by: abh <16861+abh@users.noreply.github.com>
Updated CAA record implementation to use DNS text format instead of JSON structure. Now supports standard bind-style format like |
This PR implements CAA (Certificate Authority Authorization) record support in GeoDNS, allowing domain owners to specify which Certificate Authorities are authorized to issue certificates for their domains.
Changes Made
zones/reader.goREADME.mdwith examplesCAA Record Format
The implementation supports the standard CAA record format with optional flag and weight fields:
{ "": { "caa": [ { "tag": "issue", "value": "ca.example.net" }, { "flag": 0, "tag": "issuewild", "value": "ca.example.net" }, { "flag": 128, "tag": "iodef", "value": "mailto:security@example.com", "weight": 100 } ] } }Features
issue,issuewild, andiodefTesting
The implementation follows the existing patterns in GeoDNS for record type handling, ensuring consistency with the codebase architecture.
Fixes #102.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.