nzx9 / isc-bind-api

REST API for BIND DNS server using dnspython and FastAPI

Home Page:https://github.com/apititan/pydnsapi/wiki/Quick-Start-Guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About API Titan Works

Today, every company is a software company; we use software every day; consider Uber, which is merely an app. BIND DNS, Postfix, Apache, Dovecot, and many more are over 20 years old and are still actively used in industry today. Almost all of these software setups have been automated by directly altering configuration files with automation tools such as Ansible, Puppet, and others. While sysadmins have some relief due to the idempotent nature of these tools, they are required to repeat the configurations as many times as they like. If something goes wrong, it is exceptionally difficult to debug because the same software is configured in so many different ways across Linux distributions, the default OS on which these pieces of software are running. There is no certainty that misconfiguration will not occur. There is no certainty that a misconfiguration would compromise security or performance.There is no certainty that a misconfiguration would compromise security or performance.

If we can create a well-defined HTTP APIS for managing and configuring this widely used software, we will be able to address all of the issues raised above. To deal with these pieces of software, everyone must learn a single unified and secure API, which will make their lives easier.

At API Titan Works, we aim to create a global community of API developers and experts who are passionate about the open source software model in order to make our vision a reality.

Why BIND First

A DNS lookup is the first step in almost every Internet connection.

There is a DNS lookup to resolve a DNS name to an IP address before your mail server sends an email or before your web browser displays a web page. Watch Eddy Winstead of ISC's DNS Fundamentals presentation or read A Warm Welcome to DNS by Bert Hubert of PowerDNS.

BIND 9 on the Internet

BIND is used successfully in a wide range of applications, including publishing the (DNSSEC-signed) DNS root zone and many top-level domains, hosting providers who publish very large zone files with many small zones, enterprises with both internal (private) and external zones, and service providers with large resolver farm.

PyDNS API

This project aims to create a REST API for BIND DNS, the Internet's de-facto DNS software, using dnspython, a DNS toolkit for Python Programming Language. It is useful for queries, zone transfers, dynamic updates, nameserver testing, and a variety of other tasks.

dnspython provides both high and low level DNS access.

  • The high level classes search for data by name, type, and class and return an answer set.

  • The low-level classes allow for the manipulation of DNS zones, messages, names, and records directly. Almost every RR type is supported.

dnspython was initially created at Nominum where to test DNS nameservers.

Inspired by

While we in search for the tool kit for developing this API we have inspired by this great project where it has used FastAPI Python framework to develop an API for BIND DNS.

About FastAPI

FastAPI


Documentation: https://fastapi.tiangolo.com

Source Code: https://github.com/tiangolo/fastapi


FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.

The key features are:

  • Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic). One of the fastest Python frameworks available.
  • Fast to code: Increase the speed to develop features by about 200% to 300%. *
  • Fewer bugs: Reduce about 40% of human (developer) induced errors. *
  • Intuitive: Great editor support. Completion everywhere. Less time debugging.
  • Easy: Designed to be easy to use and learn. Less time reading docs.
  • Short: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
  • Robust: Get production-ready code. With automatic interactive documentation.
  • Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.

* estimation based on tests on an internal development team, building production applications.

Core Feature of PyDNS API

This is a BIND DNS API that supports the following core functions and others:

  • It can export a BIND zone file to a JSON file
  • It utilises the HTTP GET method to locate a specific DNS record.
  • It utilises the HTTP PUT method to replace or update a DNS record
  • It utilises the HTTP DELETE method for deleting a DNS record
  • It safeguards the API Key.
  • Ii offers an audit log for 'apikey' to 'DNS changes.'
  • It makes use of the acme.sh tool kit to generate LetsEncrypt certificates via the API.
  • It can be installed in a Docker container to make it easier to run in any environment that supports Docker
  • Auto-generated API documents

What is Next.

Let's move to the installation guide

About

REST API for BIND DNS server using dnspython and FastAPI

https://github.com/apititan/pydnsapi/wiki/Quick-Start-Guide

License:GNU General Public License v3.0


Languages

Language:Python 63.8%Language:Shell 31.6%Language:Dockerfile 4.7%