[PR #2678] [MERGED] Implement RFC #2195 #3233

Closed
opened 2026-03-16 11:32:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2678
Author: @pvdrz
Created: 12/13/2024
Status: Merged
Merged: 12/19/2024
Merged by: @djc

Base: mainHead: pvdrz/rfc-2195


📝 Commits (5)

  • 050d19f refactor!: remove ZoneConfig::file
  • ab282e9 rename: StoreConfig -> ServerStoreConfig
  • 8e921de refactor!: add ZoneTypeConfig and split StoreConfig
  • 56e49c3 remove the zone-level enable_dnssec setting
  • 6473abc merge is_zone_signing_key and is_zone_update_auth into a single enum

📊 Changes

11 files changed (+509 additions, -345 deletions)

View changed files

📝 bin/src/dnssec.rs (+22 -21)
📝 bin/src/hickory-dns.rs (+173 -167)
📝 bin/src/lib.rs (+219 -63)
📝 bin/tests/integration/authority_battery/dnssec.rs (+3 -5)
📝 bin/tests/integration/authority_battery/dynamic_update.rs (+3 -5)
📝 bin/tests/integration/config_tests.rs (+73 -27)
📝 bin/tests/integration/named_test_rsa_dnssec.rs (+0 -36)
📝 conformance/packages/dns-test/src/templates/hickory.name-server.toml.jinja (+3 -2)
📝 tests/test-data/test_configs/all_supported_dnssec.toml (+5 -7)
📝 tests/test-data/test_configs/dnssec_with_update.toml (+4 -6)
📝 tests/test-data/test_configs/dnssec_with_update_deprecated.toml (+4 -6)

📄 Description

This PR implements RFC #2195. More specifically it:

  • Removes ZoneConfig::file as the following ZoneConfig
    ZoneConfig {
        file: "path1",
        stores: vec![
            FileConfig {
                zone_file_path: "path2",
            }
       ],
        ..
    }
    
    was considered valid even though it is ambiguous. However, custom deserializers are implemented so that the file field inside named.toml can still be used if it is not ambiguous and if it is set for the valid type of zone (Primary or Secondary).
  • Splits StoreConfig so each ZoneType has its own set of valid stores. This also comes with a new enum ZoneTypeConfig that moves all the ZoneConfig fields inside the enum's variants. Making impossible to set configuration fields that are irrelevant for a specific ZoneType.

TODO:

  • Refactor the dnssec related fields so it is impossible to set dnssec_enabled = false and [zones.keys] at the same time.
  • Figure out if enable_axfr is valid for Primary servers or it is only relevant for Secondary servers.

🔄 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/hickory-dns/hickory-dns/pull/2678 **Author:** [@pvdrz](https://github.com/pvdrz) **Created:** 12/13/2024 **Status:** ✅ Merged **Merged:** 12/19/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `pvdrz/rfc-2195` --- ### 📝 Commits (5) - [`050d19f`](https://github.com/hickory-dns/hickory-dns/commit/050d19fa221dba795eefb348d9985a9b0645ab44) refactor!: remove `ZoneConfig::file` - [`ab282e9`](https://github.com/hickory-dns/hickory-dns/commit/ab282e9d65a5defb4cb9eec0eca1ead4c47c1c6f) rename: StoreConfig -> ServerStoreConfig - [`8e921de`](https://github.com/hickory-dns/hickory-dns/commit/8e921def6fdedb0fb514a6ae3e415dd0eb1bb49b) refactor!: add `ZoneTypeConfig` and split `StoreConfig` - [`56e49c3`](https://github.com/hickory-dns/hickory-dns/commit/56e49c38658b59ade238bf80eeb8ce599e50ae6d) remove the zone-level enable_dnssec setting - [`6473abc`](https://github.com/hickory-dns/hickory-dns/commit/6473abcd1dfae0fd86668b22f1f5a21d4c8adf87) merge is_zone_signing_key and is_zone_update_auth into a single enum ### 📊 Changes **11 files changed** (+509 additions, -345 deletions) <details> <summary>View changed files</summary> 📝 `bin/src/dnssec.rs` (+22 -21) 📝 `bin/src/hickory-dns.rs` (+173 -167) 📝 `bin/src/lib.rs` (+219 -63) 📝 `bin/tests/integration/authority_battery/dnssec.rs` (+3 -5) 📝 `bin/tests/integration/authority_battery/dynamic_update.rs` (+3 -5) 📝 `bin/tests/integration/config_tests.rs` (+73 -27) 📝 `bin/tests/integration/named_test_rsa_dnssec.rs` (+0 -36) 📝 `conformance/packages/dns-test/src/templates/hickory.name-server.toml.jinja` (+3 -2) 📝 `tests/test-data/test_configs/all_supported_dnssec.toml` (+5 -7) 📝 `tests/test-data/test_configs/dnssec_with_update.toml` (+4 -6) 📝 `tests/test-data/test_configs/dnssec_with_update_deprecated.toml` (+4 -6) </details> ### 📄 Description This PR implements RFC #2195. More specifically it: - Removes `ZoneConfig::file` as the following `ZoneConfig` ```rust ZoneConfig { file: "path1", stores: vec![ FileConfig { zone_file_path: "path2", } ], .. } ``` was considered valid even though it is ambiguous. However, custom deserializers are implemented so that the `file` field inside `named.toml` can still be used if it is not ambiguous and if it is set for the valid type of zone (Primary or Secondary). - Splits `StoreConfig` so each `ZoneType` has its own set of valid stores. This also comes with a new enum `ZoneTypeConfig` that moves all the `ZoneConfig` fields inside the enum's variants. Making impossible to set configuration fields that are irrelevant for a specific `ZoneType`. TODO: - [x] Refactor the dnssec related fields so it is impossible to set `dnssec_enabled = false` and `[zones.keys]` at the same time. - [x] Figure out if `enable_axfr` is valid for `Primary` servers or it is only relevant for `Secondary` servers. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:32:31 +03:00
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/hickory-dns#3233
No description provided.