Commit Graph

43 Commits

Author SHA1 Message Date
Girish Ramakrishnan
7c4394d8cb caas: change domains route 2019-04-25 21:56:22 -07:00
Johannes Zellner
127b22d7ce Add dns interface api to inject hidden files for verification 2019-02-09 19:09:51 +01:00
Johannes Zellner
79ae75030c move caas certificate key removal to the provider backend 2019-02-09 11:59:37 +01:00
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
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
106e17f7ff caas: verify dns config
this is so that it fails if someone gives invalid token via API call
2018-06-17 22:22:05 -07: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
2ac12de204 Add domains.provider 2018-01-09 15:32:49 -08:00
Girish Ramakrishnan
693bc094cc caas: make fqdn part of dns and s3 credentials 2017-11-28 22:44:40 -08:00
Girish Ramakrishnan
e9b308bb95 Re-purpose the zoneName as the caas domain 2017-11-28 15:00:38 -08:00
Girish Ramakrishnan
432a369bff Add token to dnsConfig 2017-11-28 15:00:38 -08:00
Johannes Zellner
4cbb751d82 Fix usage of appFqdn in caas dns backend 2017-11-20 20:01:50 +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
72e912770a translate network errors to SubdomainError
fixes #391
2017-09-14 16:14:16 -07:00
Girish Ramakrishnan
9ead482dc6 Make verifyDnsConfig take zone name
part of #110
2017-06-15 19:55:24 -07:00
Johannes Zellner
babfb5efbb Make the verifyDnsConfig() api return the valid credentials 2017-01-10 11:32:44 +01:00
Johannes Zellner
b9e0530ced Fill in the noops in the other backends 2017-01-10 11:13:33 +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 Zellner
cffc6d5fa5 Reorder dns backend exports 2016-09-20 09:25:48 +02:00
Girish Ramakrishnan
c1bb264065 Set a timeout for superagent
The default is 'no timeout' and it will wait for the response forever.

https://github.com/visionmedia/superagent/issues/17#issuecomment-207742985
2016-09-12 13:06:18 -07:00
Girish Ramakrishnan
90472e1370 remove subdomains.add API 2016-09-05 17:09:00 -07:00
Girish Ramakrishnan
ecc9d1bc02 rename subdomains.update to subdomains.upsert 2016-09-05 16:58:13 -07:00
Girish Ramakrishnan
6b4d906336 remove jslint comment 2016-09-04 23:56:50 -07:00
Girish Ramakrishnan
2caf57d2c7 Add SubdomainError.BAD_FIELD
The CaaS backend return 400 for conflicts. We can use this to abort
early if there is a conflict in DNS entries. For example, if an app
subdomain already exists in DNS.

Part of #27
2016-09-04 19:35:19 -07:00
Girish Ramakrishnan
3bdae8f4ac typo 2016-09-04 18:00:28 -07:00
Girish Ramakrishnan
a4ea693c3c update superagent
the latest superchanged changed the meaning of 'error'. Previously,
error implied a network error. With the latest superagent, error means
a REST api error i.e 4xx, 5xx are flagged as errors.

error && !error.response means network error
2015-12-15 09:53:37 -08:00
Girish Ramakrishnan
2a27d96e08 pass dnsConfig in update 2015-11-08 23:57:42 -08:00
Girish Ramakrishnan
ba42611701 token is not a function 2015-11-08 23:54:47 -08:00
Girish Ramakrishnan
54486138f0 pass dnsConfig to backend api 2015-11-08 23:21:55 -08:00
Girish Ramakrishnan
b6f1ad75b8 merge SubdomainError into subdomains.js like other error classes 2015-11-06 17:58:01 -08:00
Girish Ramakrishnan
cf81ab0306 subdomains.update now takes array 2015-10-30 13:45:10 -07:00
Girish Ramakrishnan
d6bff57c7d subdomains.del now takes array values 2015-10-30 13:30:19 -07:00
Girish Ramakrishnan
5c4b4d764e implement subdomains.get for route53 2015-10-30 13:23:43 -07:00
Girish Ramakrishnan
bf13b5b931 subdomains.add takes array values 2015-10-30 13:23:43 -07:00
Girish Ramakrishnan
6ce71c7506 prepare dns backends to accepts array of values 2015-10-30 13:04:43 -07:00
Girish Ramakrishnan
0a10eb66cc caas: add subdomains.get 2015-10-29 16:41:04 -07:00
Girish Ramakrishnan
3fa50f2a1a handle getSubdomain error 2015-10-29 16:27:01 -07:00
Girish Ramakrishnan
1fb3b2c373 Add get and update subdomain to caas 2015-10-29 14:15:54 -07:00
Girish Ramakrishnan
b2df639155 Move dns backends to separate directory 2015-10-28 16:04:49 -07:00