Categorygithub.com/outout14/sacrebleu-api
repositorypackage
0.0.0-20210117222026-ad3dd47ae240
Repository: https://github.com/outout14/sacrebleu-api.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Sacrebleu-API

The API server which interacts with the sacrebleu-dns DNS server database to create/modify/delete records with token based authentification.

This software interacts directly with the SQL database and does not need to be on a server with sacrebleu-dns.

The API documentation is accessible on [your_server]:[port]/doc/.

Arguments

You can show theses informations using ./sacrebleu-api -h.

-config string
        the patch to the config file (default "config.ini")
-createadmin
        create admin user in the database
-sqlmigrate
        initialize / migrate the database

Configuration

Variables names are case sensitives.

Variable nameTypeExampleInformations
app_modestring"production"Anything different than production will show debug messages
AppSection
IPstring"127.0.0.1"IP address on which the HTTP server must listen. Blank to listen on all IPs
Portint5001Port on which the HTTP server must listen
LogfilebooltrueEnable or disable file logs.
Logdirstring/var/logLog file directory.
AllowedOriginsarrayhttp://localhost:8000, https://dash.example.comList of websites that can access the API (CORS header)
DatabaseSection
Typestring"postgresql"SQL Database type. "postgresql" or "mysql" (anything different than "postgresql" will rollback to "mysql")
Hoststring"127.0.0.1" "/var/run/postgres"Can be either an IP or a path to a socket for Postgres
Usernamestring"sacrebleu"SQL Database Username
Passwordstring"superSecretPassword"SQL Database Password (optional)
Portstring"5432"SQL Database port ("5432" for postgres or "3306" for MySQL by default)
DBstring"sacrebleudatabase"SQL Database Name
DNSSection
Nameserversarrayns1.example.org., ns2.example.org, ...Nameservers FQDN

Working

  • All API endpoints (domains, users and records)
  • Automatic SOA generation when a record is edited or created
  • Swagger

ToDo

  • XFR
  • DNSSEC
  • Unit tests
  • Clean up