From: Peter van Dijk Date: Fri, 5 Oct 2012 08:45:42 +0000 (+0000) Subject: remove remotebackend README (moved to docs); update remotebackend TODO X-Git-Tag: auth-3.2-rc1~125 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b690857f649647213ddd24c3238537dd2d3d909;p=thirdparty%2Fpdns.git remove remotebackend README (moved to docs); update remotebackend TODO git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2757 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/modules/remotebackend/README b/modules/remotebackend/README deleted file mode 100644 index e310344fac..0000000000 --- a/modules/remotebackend/README +++ /dev/null @@ -1,181 +0,0 @@ -Remote backend for PowerDNS. - -This backend provides unix socket / pipe / http remoting for powerdns. - -NB! THIS BACKEND IS EXPERIMENTAL - DO NOT USE IN PRODUCTION ENVIRONMENT - -This backend is provided under the same licensing terms as PowerDNS itself. - -1. Compiling - -Install following libraries for dependencies: libjsoncpp, libcurl - -To compile this backend, you need to configure --with-modules="remote pipe". - -Also, you need to apply the patch 0001-Added-remotebackend-for-compile.patch -to enable compiling the backend. Then you need to run ./bootstrap and -configure. - -2. Usage - -The only configuration option for this backend is remote-connection-string. - -It comprises of two elements: type of backend, and parameters - -remote-connection-string=:=,=... - -You can pass as many parameters as you want, for unix and pipe backends, these -are passed along to the remote end as initialization. See API. - -2.1. Unix backend - -parameters: path - -remote-connection-string=unix:path=/path/to/socket - -2.2. Pipe backend - -parameters: command - -remote-connection-string=unix:command=/path/to/executable - -2.3. HTTP backend - -parameters: url, url-suffix - -HTTP backend tries to do RESTful requests to your server. See examples. - -URL should not end with /, and url-suffix is optional, but if you define it, it's -up to you to write the ".php" or ".json". Lack of dot causes lack of dot in -URL. - -3. API - -3.1. Queries - -Unix and Pipe backend sends JSON formatted string to the remote end. Each -JSON query has two sections, 'method' and 'parameters'. - -HTTP backend calls methods based on URL and has parameters in the query string. -The calls are always GET calls. - -3.2. Replies - -You *must* always reply with JSON hash with at least one key, 'result'. This -must be false if the query failed. Otherwise it must conform to the expected -result. - -You can optionally add 'log' array, each line in this array will be logged in -PowerDNS. - -3.3. Methods - -The following methods are used: - -Method: lookup -Parameters: qtype, domain, remote, local, real-remote, zone_id -Reply: array of -Optional values: domain_id and scopeMask - -Method: list -Parameters: zonename, domain_id -Reply: array of -Optional values: domain_id and scopeMask - -Method: getBeforeAndAfterNamesAbsolute -Parameters: id, qname -Reply: unhashed, before, after - -Method: getBeforeAndAfterNames -Parameters: id, zonename, qname -Reply: before, after - -Method: getDomainMetadata -Parameters: name, kind -Reply: array of strings - -Method: getDomainKeys -Parameters: name, kind -Reply: array of domain keys - -Method: getTSIGKey -Parameters: name -Reply: algorithm, content - -Method: setDomainMetadata -Parameters: name, kind, value -Reply: true or false - -Method: addDomainKey -Parameters: flags, active, content -Reply: id-of-key - -Method: remoteDomainKey -Parameters: name, id -Reply: true or false - -Method: activateDomainKey -Parameters: name, id -Reply: true or false - -Method: deactivateDomainKey -Parameters: name, id -Reply: true or false - -4. EXAMPLES - -Scenario: SOA lookup via pipe or unix - -Query: - -{ - "method": "lookup", - "parameters": { - "qname": "example.com", - "qtype": "SOA", - "zone_id": "-1" - } -} - -Reply: - -{ - "result": - [ - { "qtype": "SOA", - "qname": "example.com", - "content": "dns1.icann.org. hostmaster.icann.org. 2012080849 7200 3600 1209600 3600", - "ttl": 3600, - "priority": 0, - "domain_id": -1 - } - ] -} - - -Scenario: SOA lookup via HTTP backend - -Query: - -/dns/lookup/example.com/SOA - -Reply: - -{ - "result": - [ - { "qtype": "SOA", - "qname": "example.com", - "content": "dns1.icann.org. hostmaster.icann.org. 2012080849 7200 3600 1209600 3600", - "ttl": 3600, - "priority": 0, - "domain_id": -1 - } - ] -} - -5. TODO - - - Improve error handling and reply validation - - Code coverage - diff --git a/modules/remotebackend/TODO b/modules/remotebackend/TODO index 02a1c742a3..eea3574b92 100644 --- a/modules/remotebackend/TODO +++ b/modules/remotebackend/TODO @@ -1,3 +1,6 @@ - detect jsoncpp and libcurl in configure - move coprocess from pipebackend to core so remotebackend can run without pipebackend - make ruby scripts compatible with 1.8 +- Improve error handling and reply validation +- Code coverage +- move calls that change things to POST