Jump to: navigation, search

Difference between revisions of "Designate/Blueprints/Blacklist API"

(API Resource)
(API Resource)
Line 14: Line 14:
  
 
The blacklist resource provides the following data:
 
The blacklist resource provides the following data:
* id – A system-defined UUID assigned to the blacklisted domain when it is created for the first time (required)
+
* '''id''' – A system-defined UUID assigned to the blacklisted domain when it is created for the first time (required)
* name – The name of the blacklisted domain (required)
+
* '''name''' – The name of the blacklisted domain (required)
* created_at – Timestamp the blacklisted domain was created (required)
+
* '''created_at''' – Timestamp the blacklisted domain was created (required)
* updated_at – Timestamp the blacklisted domain was updated (can be null)
+
* '''updated_at''' – Timestamp the blacklisted domain was updated (can be null)
* description – UTF-8 text field
+
* '''description''' – UTF-8 text field (optional)
  
 
=== API Details ===
 
=== API Details ===

Revision as of 21:56, 15 November 2013

Create an API Call to Manage Blacklisted Domains

This blueprint proposes to provide an admin-only API call to dynamically manage blacklisted domains.

Overview

Blacklisted domains are domains that Designate will prevent from being used at the TLD level. It does not prevent them from being used as lower level domains. For instance, if google.com is blacklisted, then that would effectively stop someone trying to add the domain www.google.com. However, it would not prohibit google.com.au, so that domain would need to be blacklisted separately, if desired.

Currently, the list of blacklisted domains resides in the .config file. Designate must be restarted before any changes to the .config file take place. One possible solution to this could be to make the .config file reloadable without restarting the Designate service. However, there are only limited Operations personnel who have access to the .config file, and while blacklisted domains are not normally added or changed often, when it is needed, it needs to be done quickly. Providing an API call would allow support personnel to be given admin rights to this API call so that they can effectively make the change in a timely manner, without trying to find the one or two people who can change the .config file.

To implement this management capability, a new API call will be created, along with a new database table to store the blacklisted domains, and they will no longer be in the .config file.

API Resource

One new resource, blacklist will be exposed as part of the Designate API. The blacklist resource will allow authorized users to create a new blacklisted domain.

The blacklist resource provides the following data:

  • id – A system-defined UUID assigned to the blacklisted domain when it is created for the first time (required)
  • name – The name of the blacklisted domain (required)
  • created_at – Timestamp the blacklisted domain was created (required)
  • updated_at – Timestamp the blacklisted domain was updated (can be null)
  • description – UTF-8 text field (optional)

API Details

Verb Resource Description
GET /blacklist Returns the list of blacklisted domains
GET /blacklist/{id} Returns a specific blacklisted domain
POST /blacklist Creates a new blacklisted domain based on the parameters supplied in the request body
PUT No Op A PUT is not needed
DELETE /blacklist/{id} Delete the blacklisted domain. No message body is expected in the request