[PR #144] Add CAA record support to GeoDNS #430

Open
opened 2026-03-13 14:53:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/abh/geodns/pull/144
Author: @Copilot
Created: 6/4/2025
Status: 🔄 Open

Base: mainHead: copilot/fix-102


📝 Commits (4)

  • fab1f9f Initial plan for issue
  • 1955205 Initial plan for CAA record implementation
  • 8889dfa Implement CAA record support in GeoDNS
  • e4de2c5 Add CAA record text format support per feedback

📊 Changes

4 files changed (+390 additions, -40 deletions)

View changed files

📝 README.md (+31 -0)
📝 go.sum (+0 -36)
📝 zones/reader.go (+134 -4)
📝 zones/reader_test.go (+225 -0)

📄 Description

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.md with 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:security@example.com", "weight": 100 }
    ]
  }
}

Features

  • Flag field: Optional, defaults to 0 if not specified
  • Tag support: Standard tags like issue, issuewild, and iodef
  • 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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/abh/geodns/pull/144 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 6/4/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `copilot/fix-102` --- ### 📝 Commits (4) - [`fab1f9f`](https://github.com/abh/geodns/commit/fab1f9ff9ff14426da769f592ff2fa637647faac) Initial plan for issue - [`1955205`](https://github.com/abh/geodns/commit/1955205143096e6f95685141c1243fa4ae4e91c8) Initial plan for CAA record implementation - [`8889dfa`](https://github.com/abh/geodns/commit/8889dfad5233d619c6a0daaf220233352e1964fa) Implement CAA record support in GeoDNS - [`e4de2c5`](https://github.com/abh/geodns/commit/e4de2c5df3ff43dfaed0f5bba3b5b5022453d73d) Add CAA record text format support per feedback ### 📊 Changes **4 files changed** (+390 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+31 -0) 📝 `go.sum` (+0 -36) 📝 `zones/reader.go` (+134 -4) 📝 `zones/reader_test.go` (+225 -0) </details> ### 📄 Description 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.md` with 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: ```json { "": { "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 - **Flag field**: Optional, defaults to 0 if not specified - **Tag support**: Standard tags like `issue`, `issuewild`, and `iodef` - **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](https://gh.io/copilot-coding-agent-tips) in the docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/geodns#430
No description provided.