Project

General

Profile

Draft 20 version of DNS API » History » Version 16

Brian Gupta, 05/10/2011 01:09 AM

1 1 Brian Gupta
h1. Draft 20 version of DNS API, with working notes
2
3 5 Brian Gupta
h2. Current API
4
5 4 Ohad Levy
|_.DNS |
6 1 Brian Gupta
|/dns|POST|Create a new DNS record|@{"fqdn":string(name/ip), "value":string(ip/reverse), "type":string(A/PTR)}@|
7
|/dns/value|DELETE|remove value(ip or reverse) DNS record||
8
9 2 Brian Gupta
h2. Record types
10 1 Brian Gupta
11 2 Brian Gupta
h3. Should be implemented in next version of DNS API
12 3 Brian Gupta
13 12 Brian Gupta
|_.Path|_.REST Type|_.Description|_.Example Input JSON|_.Notes|
14
|/dns/zone/A|GET/POST/DELETE|A Record - Name to IPv4 address|@{"fqdn":string(name), "value":string(ip), "type":string(A)}@|Supports multiple records|
15
|/dns/zone/PTR|GET/POST/DELETE|PTR - Reverse record, IP address to Name|@{"fqdn":string(ip/ipv6), "value":string(name), "type":string(PTR)}@|Does not support multiple records|
16
|/dns/zone/CNAME|GET/POST/DELETE|CNAME - DNS Alias|@{"fqdn":string(name), "value":string(name), "type":string(CNAME)}@|Bind 9 doesn't support roundrobin cnames, so we should at first limit CNAMEs to a single record|
17
|/dns/zone/AAAA|GET/POST/DELETE|IPv6 A Record - Name to IPv6 address|@{"fqdn":string(ipv6), "value":string(name), "type":string(AAAA)}@|IPv6 address, supports multiple records|
18
|/dns/zone/TXT|GET/POST/DELETE|TXT - Text string|@{"fqdn":string(name), "value":string("arbitrary text string"), "type":string(TXT)}@|supports multiple records|
19
|/dns/zone/SPF|GET/POST/DELETE|SPF - Sender Policy Framework records|@{"fqdn":string(name), "value":string("v=spf1 a:mail.example.com -all"), "type":string(SPF)}@|supports multiple records|
20
|/dns/zone/MX|GET/POST/DELETE|MX - Mail Exchanger records|@{"fqdn":string(name), "value":integer(preference), "value":string(ip/name), "type":string(MX)}@|Needs an extra preference number field, supports multiple records|
21 1 Brian Gupta
22 2 Brian Gupta
h3. Deferred:
23 3 Brian Gupta
24 1 Brian Gupta
/dns/zone/SOA (Can not be dynamically deleted, and needs extra code to handle)
25
/dns/zone/NS (Needs manual serial number increment
26 13 Brian Gupta
/dns/zone/SRV (Needs more research.. Looks easy enough http://en.wikipedia.org/wiki/SRV_record, but isn't a priority yet) 
27 16 Brian Gupta
/dns/zone/ZONE (Currently smartproxy uses nsupdate to make changes so zone creation and deletion is not supported on the backend.)
28 1 Brian Gupta
29 11 Brian Gupta
h2. Methods
30
31
GET
32
POST
33
DELETE
34
35 2 Brian Gupta
h2. Ohad notes
36 3 Brian Gupta
37 1 Brian Gupta
GET /dns -> list of dns zones managed by that proxy
38
GET /dns/zone -> list of all zone records
39
GET /dns/zone/record_type list of all dns records with a given type, for
40
example all CNAME would be /dns/1.2.3.4/CNAME
41
GET /dns/zone/record -> details of the specific record.
42
43
POST /dns/zone -> creates a new record
44
DELETE /dns/zone/record -> deletes a record
45
46 8 Brian Gupta
h2. Brian notes
47 3 Brian Gupta
48 1 Brian Gupta
Dynamic DNS RFC http://tools.ietf.org/html/rfc2136
49
Howto: http://caunter.ca/nsupdate.txt
50
51
SOA: https://lists.isc.org/pipermail/bind-users/2003-November/047015.html
52
MX: http://forums.devshed.com/dns-36/using-nsupdate-to-add-an-mx-record-326788.html
53
NS: http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1304925290721+28353475&threadId=702920
54 6 Brian Gupta
55 8 Brian Gupta
h2. Other APIs to investigate
56 6 Brian Gupta
57
http://dyn.com/developer
58 1 Brian Gupta
http://docs.amazonwebservices.com/Route53/latest/APIReference/
59
http://ns.zerigo.com/
60 8 Brian Gupta
61
h2. DNS backends
62
63
NSUPDATE/BIND
64
Amazon/Route53
65
Dynect/DynDNS
66
DNSMadeEasy
67
UltraDNS
68 9 Brian Gupta
ActiveDirectory/Microsoft DNS
69 14 Paul Kelly
70
h3. Additional features
71 15 Brian Gupta
72 14 Paul Kelly
An API to retrieve the proxy's settings might be useful for consistency checks and diagnostic reasons.
73
Should foreman also be provided with the ability to push settings out into the proxies, though this might prove to be a security issue?