dnsadmin

command module
v0.0.0-...-1f1cc01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

README

Nameserver admin api

Create users

Users are stored in a htpasswd compatible textfile that uses bcrypt as hash encryption for passwords.

$ htpasswd -cBb -C 10 users.conf foo bar

Endpoints

Data must be sent as application/json, all responses are application/json.

GET /status

Check if API service is running.

Request:

  • none

Response:

  • Returns ok if the service is running or an error otherwise.
POST /user/login

Authenticate user.

Request:

  • username (username to login, string)
  • password (password to login with, string)

Response:

  • Sets a cookie that must be sent with all further requests.
GET /user/logout

Remove authentication stored for user.

Request:

  • none

Response:

  • Expires cookie set by login endpoint.
POST /user/change-password

Update password for logged in user.

Request:

  • password (new password, string)

Response:

  • Sets a cookie that must be sent with all further requests.
GET /domain/list

Get list of domains for logged in user.

Request:

  • none

Response:

  • List of domain entries, each with the fields domain (string), type (string, either masteror slave), master (string, ip address of master for slaves)
PUT /slave/{domain}

Register / update a slave domain.

Request:

  • master (ip address of master for given domain, string)

Response:

  • Domain that was registered / updated (string).
DELETE /slave/{domain}

Unregister a slave domain.

Request:

  • none

Response:

  • Domain that was unregistered (string).

Documentation

Overview

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL