geodns
geodns copied to clipboard
Add CAA record support to GeoDNS
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
-
Added CAA record type mapping in
zones/reader.go - Implemented CAA record parsing logic with support for flag, tag, value, and weight fields
-
Added comprehensive documentation in
README.mdwith examples - Created test coverage to validate CAA record functionality
CAA 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:[email protected]", "weight": 100 }
]
}
}
Features
- Flag field: Optional, defaults to 0 if not specified
-
Tag support: Standard tags like
issue,issuewild, andiodef - Weight support: Full load balancing support like other record types
- Error handling: Comprehensive validation for required fields
- RFC compliance: Follows RFC 6844 specification
Testing
- All existing tests continue to pass
- New comprehensive test case validates CAA record parsing
- Tests cover flag defaults, required field validation, and weight support
- Build successful with no breaking changes
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.