A modern, web-based interface for managing PowerDNS zones and records, featuring Role-Based Access Control (RBAC) and OpenID Connect (OIDC) authentication.
Project vibe-coded by Gemini Code Assist.
- API Driven: All zone and record manipulations are performed exclusively via the PowerDNS API.
- Zone Management: Create and delete forward and reverse DNS zones.
- Record Management: Add, edit, and delete DNS records (A, AAAA, CNAME, MX, TXT, etc.) with validation.
- Safe Editing: Changes are staged in a session and must be explicitly applied, allowing for review before commitment.
- RBAC: Granular permission system with Users, Groups, and Policies (Owner, Write, Read, None) per zone or globally.
- Authentication: Support for local users (Argon2 hashing) and SSO via OIDC.
- Multi-language: English and French support. Easily extensible by adding JSON files in the
localesdirectory.
Configuration is handled via environment variables or a .env file.
| Variable | Description | Default |
|---|---|---|
PDNS_API_URL |
URL to PowerDNS API | http://localhost:8081/api/v1 |
PDNS_API_KEY |
PowerDNS API Key | your_powerdns_api_key |
PDNS_SERVER_ID |
PowerDNS Server ID | localhost |
PDNS_TIMEOUT |
API Timeout (seconds) | 10.0 |
PDNS_MAX_CONNECTIONS |
Max HTTP connections | 100 |
PDNS_MAX_KEEPALIVE |
Max keepalive connections | 20 |
SECRET_KEY |
Secret key for sessions | change-me-in-production |
SESSION_MAX_AGE |
Session duration (seconds) | 3600 |
DATABASE_URL |
Database connection string | sqlite+aiosqlite:///pdnsmgr.db |
To enable Single Sign-On (SSO), configure the following variables. The application uses the openid email profile scopes.
OIDC_CLIENT_ID=your-client-id
OIDC_CLIENT_SECRET=your-client-secret
OIDC_DISCOVERY_URL=https://your-oidc-provider/.well-known/openid-configurationThe redirect URI should be configured in your OIDC provider as: http://your-domain/auth/callback.
The project uses SQLAlchemy with asyncio. By default, it uses SQLite.
-
SQLite :
DATABASE_URL=sqlite+aiosqlite:///pdnsmgr.db -
PostgreSQL :
DATABASE_URL=postgresql+asyncpg://user:password@localhost/dbname -
MariaDB / MySQL :
DATABASE_URL=mysql+aiomysql://user:password@localhost/dbname
-
Install Dependencies Ensure you have Python 3.8+ installed.
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
Run the Application
uvicorn main:app --host 0.0.0.0 --port 8000
-
First Login On the first run, a default admin user is created if it doesn't exist.
- Username:
admin - Password: Generated and stored in
admin_passwordfile at the root.
- Username:
-
RBAC Management The administration interface is accessible only to members of the
adminsgroup via the/adminURI. It allows managing:- Users and their groups.
- Groups.
- Policies for zone access (wildcard support).