Opera's LDAP-authenticated PowerDNS user interface
PHP JavaScript CSS Ruby
Clone or download
thomas-pike Merge pull request #82 from CyBeRoni/fix-reverse-update
Add missing reverse ptr check to rrset 'update' action
Latest commit a34262b Aug 13, 2018
Permalink
Failed to load latest commit information.
config Mention that baseurl should not include trailing slash May 18, 2018
extensions Initial public commit Jan 20, 2017
migrations Adding alternative user data source based on PHP_AUTH_ variables. Apr 12, 2018
model Add missing reverse ptr check to 'update' action Jun 27, 2018
public_html Change how submit button gets disabled (closes #84) Jul 26, 2018
scripts Update copyright dates Jan 16, 2018
templates Add support for ALIAS type Jun 8, 2018
tests Add test for DNSKEY::get_tag Apr 23, 2018
vagrant Created Vagrant and Ansible configuration to easily set up a local de… Jun 4, 2018
views Enable API-RECTIFY when enabling DNSSEC and warn for existing zones w… May 11, 2018
.gitignore Created Vagrant and Ansible configuration to easily set up a local de… Jun 4, 2018
LICENSE Fix LICENSE file to be an unmodified Apache 2.0 license Apr 23, 2018
NOTICE Update copyright dates Jan 16, 2018
Pest.php Initial public commit Jan 20, 2017
PestJSON.php PowerDNS 4 API support. Feb 8, 2017
README.md Add mention of the API documentation in the README Aug 2, 2018
bindzonefile.php Enable restoration of deleted zones Jan 16, 2018
core.php Fix simplify_search function to work with reverse proxy May 7, 2018
email.php Update copyright dates Jan 16, 2018
ldap.php Update copyright dates Jan 16, 2018
pagesection.php Update copyright dates Jan 16, 2018
phpunit.xml Fix handling of origin '.' Aug 8, 2017
powerdns.php Update copyright dates Jan 16, 2018
requesthandler.php Cleaned the variable declaration Jun 19, 2018
router.php Update copyright dates Jan 16, 2018
routes.php Update copyright dates Jan 16, 2018

README.md

Opera DNS UI

A tool to manage a PowerDNS authoritative server in a corporate LDAP-driven environment.

Features

  • Connects to PowerDNS via its JSON API.
  • Allows login managed by LDAP server.
  • Create zones; add, edit and delete records.
  • Grant multiple users access to administer a zone.
  • Lower access level that allows to view a zone and request changes.
  • Provides its own JSON API for making changes to DNS records.
  • Keeps a changelog of all DNS changes done through it.
  • (Optionally) export all zones as bind-format zone files and store changes in git.

Demo

You can view the DNS UI in action on the demonstration server.

Use one of the following sets of username / password credentials to log in:

  • testuser / testuser - normal user with admin access granted to a few domains
  • testadmin / testadmin - admin user

All data on this demonstration server is reset nightly at 00:00 UTC.

Compatibility

The current version is only compatible with PowerDNS 4.0.4 and higher. Previous 4.0.x versions suffer from a critical API bug related to TTL values.

As another option, you can use PowerDNS 3 with Opera DNS UI v0.1.3, but the 0.1 version of the DNS UI will not receive any new features or non-critical fixes.

Requirements

  • Apache 2.2.18+ / nginx
  • PHP 5.6+
  • PHP intl (Internationalization Functions) extension
  • PHP JSON extension
  • PHP CURL extension
  • PHP Multibyte String extension
  • PHP LDAP extension
  • PHP PDO_PGSQL extension
  • PostgreSQL database
  • PowerDNS authoritative server 4.0.4+

Installation

  1. Configure PowerDNS:

    webserver=yes
    webserver-address=...
    webserver-allow-from=...
    webserver-port=...
    api=yes
    api-key=...
    
  2. Clone this repo to somewhere outside of your default web server document root.

  3. Create a postgresql user and database.

    createuser -P dnsui-user
    createdb -O dnsui-user dnsui-db
    
  4. Add the following directives to your web server configuration (eg. virtual host config):

    • Apache:

      DocumentRoot /path/to/dnsui/public_html
      DirectoryIndex init.php
      FallbackResource /init.php
      AllowEncodedSlashes NoDecode
      

      Full Apache virtualhost example

    • nginx:

      root /path/to/dnsui/public_html;
      index init.php;
      location / {
          try_files $uri $uri/ @php;
      }
      location @php {
          rewrite ^/(.*)$ /init.php/$1 last;
      }
      location /init.php {
          fastcgi_pass unix:/run/php/php7.0-fpm.sock ;
          include /etc/nginx/snippets/fastcgi-php.conf;
      }
      

      Full nginx server example

  5. Set up an authentication module for your virtual host (eg. authnz_ldap for Apache).

  6. Copy the file config/config-sample.ini to config/config.ini and edit the settings as required.

  7. Set scripts/ldap_update.php to run on a regular cron job.

Usage

Anyone in the LDAP group defined under admin_group_cn in config/config.ini will be able to add and modify all zones. They will also be able to grant access under "User access" for any zone to any number of users.

API

By going to the URL /api/v2 with your web browser you can see documentation of the rest API, including all of the available API methods. See this on the demo server.

Screenshots

Editing multiple records in one batch

Editing multiple records in one batch

Comprehensive changelog of all changes

Comprehensive changelog of all changes

License

Copyright 2013-2018 Opera Software

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.