Skip to content

Support for config & statistics routes#208

Merged
rwxd merged 1 commit into
mainfrom
issue-207
Apr 10, 2026
Merged

Support for config & statistics routes#208
rwxd merged 1 commit into
mainfrom
issue-207

Conversation

@rwxd
Copy link
Copy Markdown
Contributor

@rwxd rwxd commented Apr 10, 2026

This PR adds support for the /api/v1/servers/<server_id>/config & /api/v1/servers/<server_id>/statistics routes of the powerdns api.

Closes #207

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}/statistics proxy routes with permission checks.
  • Extend environment configuration model with global_config and global_statistics flags, 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.

Comment thread powerdns_api_proxy/proxy.py
Comment thread powerdns_api_proxy/proxy.py
Comment thread powerdns_api_proxy/models.py
@rwxd rwxd requested a review from kuhball April 10, 2026 09:00
Comment thread README.md Outdated
@rwxd rwxd merged commit 086d835 into main Apr 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Routing of /config and /statistics

3 participants