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
16c1622b1f
Make domains.fqdn take config and domain separately
...
This way it can be used in the dns backends which don't have the domain object
2019-01-04 14:11:29 -08:00
Girish Ramakrishnan
b5b20452cc
Fix reverseProxy.getCertificate API
2018-12-19 14:20:48 -08:00
Girish Ramakrishnan
bdf9671280
Split dashboard dns setup and db operations
...
The dns setup is now a task that we can wait on. Once that task
is done, we can do db operations to switch the domain in a separate
route
2018-12-14 09:57:28 -08:00
Girish Ramakrishnan
357e44284d
Write nginx config into my.<domain>.conf
...
This way we can switch the domain as an independent task that does
not affect the existing admin conf
2018-12-14 09:20:10 -08:00
Girish Ramakrishnan
63e3560dd7
on startup, only re-generate the admin config
...
should not try to get certificates on startup
2018-12-14 09:20:06 -08:00
Girish Ramakrishnan
434525943c
move appconfig.ejs
2018-12-13 21:53:31 -08:00
Girish Ramakrishnan
f0dbf2fc4d
Make reverseProxy.configureAdmin not use config
...
This way we can set things up before modifying config for dashboard switch
2018-12-13 21:42:48 -08:00
Girish Ramakrishnan
e7294f2950
Make handleCertChanged take a callback
2018-12-11 11:02:32 -08:00
Girish Ramakrishnan
c9f325e75d
renewCerts does not call callback
2018-12-11 10:49:04 -08:00
Girish Ramakrishnan
d2f4b68c9f
Make certificate renewal a task
2018-12-10 20:48:10 -08:00
Girish Ramakrishnan
802011bb7e
Fix args to shell.sudo
2018-11-25 14:57:51 -08:00
Girish Ramakrishnan
4142d7a050
Fix error handling of all the execSync usage
2018-11-23 13:11:15 -08:00
Girish Ramakrishnan
31823f6282
Check if result is not null
2018-11-23 13:11:15 -08:00
Girish Ramakrishnan
a3b1a2c781
Get the domain correctly from subject
2018-11-15 10:47:20 -08:00
Johannes Zellner
ab255e78c5
Make the cert subject match
2018-11-15 14:18:34 +01:00
Girish Ramakrishnan
eaf9b7f049
Add certificate.new event
2018-11-14 20:47:18 -08:00
Girish Ramakrishnan
b8df4d0b79
bare domains are getting continuously renewed
...
the code is not handling the case where bare domain is not part
of the wildcard SAN.
2018-11-14 20:47:15 -08:00
Girish Ramakrishnan
eb315f34dc
Pass around domainObject
2018-11-14 20:32:14 -08:00
Girish Ramakrishnan
a3cc17705d
Do not remove default.conf and admin.conf when re-configuring apps
2018-11-10 22:02:42 -08:00
Girish Ramakrishnan
6ec36c9605
Do not crash if platform.start fails
...
With this change, the box code always starts up even if nginx fails,
docker fails etc.
2018-11-10 18:34:37 -08:00
Girish Ramakrishnan
ee6cca5cdf
Make cert an object
2018-11-05 22:39:06 -08:00
Girish Ramakrishnan
0093e840c6
Fix various typos
2018-11-05 21:26:53 -08:00
Girish Ramakrishnan
60992405d5
generate cert with correct CN
2018-11-05 20:48:28 -08:00
Girish Ramakrishnan
d96b1cc864
generate fallback cert correctly for hyphenated domains
2018-11-05 19:53:50 -08:00
Girish Ramakrishnan
c09aa2a498
Make LE work with hyphenated domains
2018-11-01 19:08:05 -07:00
Girish Ramakrishnan
668ff99450
Add support for restricted certs as part of dns setup
2018-10-30 18:15:26 -07:00
Girish Ramakrishnan
c700635656
certs: make renew switch to fallback certs
2018-10-28 19:03:57 -07:00
Girish Ramakrishnan
ffe50ff977
detect change in provider type and renew accordingly
2018-10-24 20:40:05 -07:00
Girish Ramakrishnan
73faba3c28
certs: Fix the config filename of admin domain
2018-10-24 20:32:03 -07:00
Girish Ramakrishnan
c1db52927e
Add a debug
2018-10-24 20:32:03 -07:00
Girish Ramakrishnan
ee517da4f4
Add route to renew certs of a domain
2018-10-24 13:09:41 -07:00
Girish Ramakrishnan
d47fd34f66
Use alternateDomain fqdn for ensuring certificate
...
this makes it work for hyphenated domains as well
2018-09-22 16:26:28 -07:00
Girish Ramakrishnan
64665542bc
select app's cert based on domain's wildcard flag
...
this also removes the confusing type field in the bundle. we instead
check the current nginx config to see what cert is in use.
2018-09-12 14:22:54 -07:00
Girish Ramakrishnan
54d2a4f17b
rework args to ensureCertificate
2018-09-12 12:50:04 -07:00
Girish Ramakrishnan
97ab521038
make ensureCertificate check any wildcard cert
2018-09-11 23:47:23 -07:00
Girish Ramakrishnan
c138c4bb5f
acme2: implement wildcard certs
2018-09-11 23:15:50 -07:00
Girish Ramakrishnan
d0dde04695
acme2: dns authorization
2018-09-10 21:46:53 -07:00
Girish Ramakrishnan
2f38a4018c
pass domain arg to getCertificate API
2018-09-10 20:48:47 -07:00
Girish Ramakrishnan
2c76716bc7
rename func
2018-09-10 20:35:48 -07:00
Girish Ramakrishnan
68536b6d7d
acme2 implementation
2018-09-10 16:26:24 -07:00
Girish Ramakrishnan
017460b497
acme -> acme1
2018-09-10 10:57:48 -07:00
Johannes Zellner
922b6d2b18
Also renew alternate domain certificates
...
Part of #583
2018-08-25 11:04:53 +02:00
Girish Ramakrishnan
6a3b45223a
Better name for internal functions
2018-08-24 15:38:44 -07:00
Girish Ramakrishnan
93b0f39545
ensureCertificate: make it take appDomain object
2018-08-24 15:07:13 -07:00
Girish Ramakrishnan
dbe86af31e
Make getApi takes a string domain
2018-08-24 15:00:19 -07:00
Girish Ramakrishnan
3ede50a141
remove unused function
2018-08-24 14:11:02 -07:00
Johannes Zellner
c13c4d0b28
Ensure we purge all nginx configs of an app
2018-06-29 23:14:06 +02:00
Johannes Zellner
868ed977b3
Cleanup alternateDomain dns records and nginx config
2018-06-29 23:14:06 +02:00
Johannes Zellner
3088ac098f
Put redirect label into alternateDomain nginx configs
2018-06-29 23:14:06 +02:00