Allow users to import their own Domains
Dependant on: #218 and #219
Summary
We should allow users to use any domain of their choice
Problem / Impact
By not having this feature we are putting up a large blocker to having fission used in production.
Solution
We need to allow users to point their nameservers at our own then be able to link the domain to their account.
Detail
- A user reads our DNS documentation and gets the list of our namesevers
- They point their domain at those name servers
- from the cli they type
fission add domain test.xyz - They are asked if they own the domain? Yes
- They are shown the nameservers and are asked if they've updating their DNS information? yes
- The CLI verifys the name servers are correctly setup
- the domain will be inserted into the table denoting which domains are owned by which user
If a user types fission set domain test.xyz
- The same steps from
addwill occur in addition to below - the domain will be saved to the local
fission.yamlfile - the domain will be updated to point to the latest CID for the project
Updates to the API
- Add an endpoint
GET /user/domain/{domain}that will return the status of a domain. Is it's nameservers configured? does a user already own it? is it available to be assigned to the requesting user? - Add an endpoint
POST /user/domain/{domain}That will add the domain to the user
Dependant on
#129 For allowing more than one domain per account
Unknowns
- How will we handle SSL certs?
Impossibles
CNAME redirects
Netlify allows users to point subdomain and apex (depending on DNS provider) CNAME records to their pages directions. i.e. CNAME *.benchurch.com -> {site}.netlify.com.
https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/#configure-an-apex-domain
However due to how IPFS and IPNS lookups work I believe we wont be able to fill that case.
Sanity check here would be nice @fission-suite/core
Inspriation
https://docs.netlify.com/domains-https/custom-domains/
After Completion
- We will need to update the CLI to accommodate this change (create issue)
- Update our support pages to detail out the process
- We will need to handle users setting DNS records for other services (blogs, email etc..)
I think we have to write out externally hosted vs on our name servers.
The externally hosted version should just be CNAME to SUBDOMAIN.fission.name
(CNAME of root depends on the provider. Have to see what we can support with Route53)
The switch to our name servers is the same as purchasing a domain from us.
I would prioritize CNAME first. And probably make “use our name servers” as a separate issue as it is a sub flow of purchasing.
The new domains table that I suggested in the other issue applies here.
Wrote up some details over here (https://github.com/fission-suite/web-api/issues/255) before realizing that it was a repeat issue.
These are the steps for registering a domain (and also addresses the SSL concern above):
- check that the nameservers for
example.comare properly configured - check that no other user owns the domain name
- create a Route53 hosted zone for
example.com - request SSL certs for
example.comusing the DNS challenge option - add DNS records to the
example.comRoute53 hosted zone for the DNS challenge - add the SSL certs for
example.comto the load balancer in front of the IPFS gateway - add
example.comto the list of user's domains in the DB