Conversation
There was a problem hiding this comment.
Pull request overview
Adds support in the proxy for PowerDNS “config” and “statistics” endpoints, controlled by new environment-level permissions.
Changes:
- Implement
/api/v1/servers/{server_id}/config,/api/v1/servers/{server_id}/config/{config_setting_name}, and/api/v1/servers/{server_id}/statisticsproxy routes with permission checks. - Extend environment configuration model with
global_configandglobal_statisticsflags, plus corresponding helper checks and unit tests. - Document the new permission flags in the README and update auth-route coverage tests to include the new endpoints.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
powerdns_api_proxy/proxy.py |
Adds the new config/statistics routes and permission gating before forwarding to upstream PowerDNS. |
powerdns_api_proxy/models.py |
Adds new environment flags used to authorize config/statistics access. |
powerdns_api_proxy/config.py |
Adds helper functions to evaluate the new environment flags. |
tests/unit/proxy_test.py |
Includes the new endpoints in the “missing/wrong token” route matrix. |
tests/unit/config_test.py |
Adds unit tests for the new global_config / global_statistics checks. |
README.md |
Documents the new environment options for config and statistics access. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kuhball
reviewed
Apr 10, 2026
kuhball
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the
/api/v1/servers/<server_id>/config&/api/v1/servers/<server_id>/statisticsroutes of the powerdns api.Closes #207