Commit Graph

42 Commits

Author SHA1 Message Date
Johannes Zellner 32f8a52c2b add provider specific removePrivateFields to redact tokens and secrets 2019-02-09 11:59:37 +01:00
Girish Ramakrishnan 65210ea91d rework dns api to take domainObject
the DNS backends require many different params, it's just easier to
pass them all together and have backends do whatever.

For example, route53 API requires the fqdn. Some other backends require just the
"part" to insert.

* location - location in the database (where app is installed)
* zoneName - the dns zone name
* domain - domain in the database (where apps are installed into)
* name/getName() - this returns the name to insert in the DNS based on zoneName/location
* fqdn - the fully resolved location in zoneName

verifyDnsConfig also takes a domain object even if it's not in db just so that we can
test even existing domain objects, if required. The IP param is removed since it's not
required.

for caas, we also don't need the fqdn hack in dnsConfig anymore
2019-01-04 22:38:12 -08:00
Girish Ramakrishnan a756345138 consolidate hyphenatedSubdomains handling 2018-09-11 21:41:50 -07:00
Girish Ramakrishnan 6f398144cb validate hyphenatedSubdomain 2018-08-25 18:29:55 -07:00
Johannes Zellner b35c81e546 Handle hyphenatedSubdomains in the backend verifyDnsConfig() 2018-08-22 12:16:19 +02:00
Johannes Zellner 163563f400 Remove now unused dnsRecordId 2018-06-29 23:14:06 +02:00
Girish Ramakrishnan 6ca28d9a58 validate dns config parameters 2018-06-17 22:21:51 -07:00
Girish Ramakrishnan 863afc68cb DomainError -> DomainsError 2018-04-29 11:20:12 -07:00
Girish Ramakrishnan 58386b0c54 remove resolveNs 2018-02-08 14:39:35 -08:00
Girish Ramakrishnan 26c95a25b6 Use the native dns resolver
it now supports cancel()

also, fixes #514
2018-02-08 11:37:58 -08:00
Girish Ramakrishnan 2ac12de204 Add domains.provider 2018-01-09 15:32:49 -08:00
Girish Ramakrishnan cb814a50d7 Fix waitForDNSRecord for subdomain installations 2017-12-06 12:31:25 +05:30
Johannes Zellner e1be8b669f Do not rely on admin subdomain for dns backend config validation 2017-11-20 19:59:40 +01:00
Johannes Zellner 260ac0afb7 Remove subdomains.js in favor of multidomain capable domains.js 2017-11-20 19:59:26 +01:00
Girish Ramakrishnan d9ab1a78d5 Make the my location customizable
Fixes #22
2017-10-25 23:00:43 -07:00
Girish Ramakrishnan db1e39be11 Do not overwrite subdomain when location was changed
* Install in subdomain 'test'
* Move to subdomain 'test2'
* Move to another existing subdomain 'www' (this should be detected as conflict)
* Move to subdomain 'www2' (this should not remove 'www'). This is why dnsRecordId exists.
2017-09-14 22:31:48 -07:00
Girish Ramakrishnan 72e912770a translate network errors to SubdomainError
fixes #391
2017-09-14 16:14:16 -07:00
Girish Ramakrishnan a96f8abaca DO DNS: list all pages of the domain 2017-09-05 15:52:59 -07:00
Girish Ramakrishnan 204340eac0 Set ttl
Fixes #384
2017-07-27 13:25:37 -07:00
Girish Ramakrishnan 3745e96a6f domain -> fqdn 2017-06-15 19:56:04 -07:00
Girish Ramakrishnan 9ead482dc6 Make verifyDnsConfig take zone name
part of #110
2017-06-15 19:55:24 -07:00
Girish Ramakrishnan ddb69eb25c remove native-dns and use dig directly
native-dns module is unmaintained and we keep getting sporadic
errors from that module

Fixes #220
2017-05-26 16:51:05 -07:00
Girish Ramakrishnan 11697f11cf use constants for admin location 2017-05-24 15:41:37 -07:00
Johannes Zellner d709a5cfe4 Attempt to give better digitalocean DNS error messages 2017-04-05 16:50:31 +02:00
Girish Ramakrishnan cc6dae0f9e check if ns is set to DO nameservers 2017-02-14 22:27:27 -08:00
Girish Ramakrishnan 58528450e2 dns: Handle 422 errors in DO backend
Fixes #214
2017-02-14 20:51:44 -08:00
Girish Ramakrishnan 3176bc1afa Fix failing tests 2017-01-10 16:54:15 -08:00
Girish Ramakrishnan f3d3b31bed Fix error return type 2017-01-10 16:16:42 -08:00
Johannes Zellner 226164c591 This error is already a SubdomainError 2017-01-10 11:40:05 +01:00
Johannes Zellner babfb5efbb Make the verifyDnsConfig() api return the valid credentials 2017-01-10 11:32:44 +01:00
Johannes Zellner c1029ba3b0 Implement verifyDnsConfig() for digitalocean 2017-01-10 11:12:13 +01:00
Girish Ramakrishnan 3ede9af34b remove subdomains.status 2016-12-14 14:47:03 -08:00
Girish Ramakrishnan d475d9bcbf Make waitForDns provider specific
This will allow us to create a proper 'noop' backend that does
not wait for dns to be in sync. This is required for local/intranet
setups.
2016-12-14 14:43:20 -08:00
Johannes db41633663 Support multiple DNS record upserts with digitalocean
Fixes #99
2016-11-30 17:00:16 +01:00
Johannes eb963f3e1b Report auth issues in digitalocean dns backend 2016-10-25 16:18:33 +02:00
Johannes Zellner adcdd45053 Specifically handle MX records for digitalocean to suit their api 2016-09-27 12:10:31 +02:00
Johannes Zellner 5ac12452a1 Give MX records a priority on digitalocean 2016-09-20 09:25:48 +02:00
Johannes Zellner 6cecad89ec Remove a console.log 2016-09-20 09:25:48 +02:00
Johannes Zellner 73df6a8dd7 empty subdomain value is represented as @ in DO 2016-09-20 09:25:48 +02:00
Johannes Zellner 6fa643049f Fix status code check 2016-09-20 09:25:48 +02:00
Johannes Zellner 835176ad75 Add support to update a domain in digitalocean 2016-09-20 09:25:48 +02:00
Johannes Zellner 98bb7e3a1a Add initial digitalocean dns backend 2016-09-20 09:25:48 +02:00