Skip to content

Commit 399a21c

Browse files
ZPain8464desimonekenjenkins
authored
Adds a custom domains Capabilities page/guide (#1343)
* adds first draft of custom domains * updates text * expands guide * runs prettier * fixes cspell error * fixes precommit failure * Update content/docs/capabilities/custom-domains.mdx Co-authored-by: bobby <[email protected]> * Update content/docs/capabilities/custom-domains.mdx Co-authored-by: bobby <[email protected]> * Update content/docs/capabilities/custom-domains.mdx Co-authored-by: bobby <[email protected]> * updates text based on feedback * updates description * Update content/docs/capabilities/custom-domains.mdx Co-authored-by: Kenneth Jenkins <[email protected]> * updates guide based on feedback * updates text --------- Co-authored-by: bobby <[email protected]> Co-authored-by: Kenneth Jenkins <[email protected]>
1 parent 434a9c0 commit 399a21c

File tree

6 files changed

+77
-0
lines changed

6 files changed

+77
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
# cSpell:ignore mycorp
3+
id: custom-domains
4+
title: Custom Domains
5+
sidebar_label: Custom Domains
6+
description: The Custom Domains page teaches you how to add your own domain in Pomerium Zero and how to use it to build routes to your services.
7+
---
8+
9+
# Custom Domains in Pomerium Zero
10+
11+
This document describes **Custom Domains** in Pomerium Zero.
12+
13+
## Overview
14+
15+
When you deploy a cluster in Pomerium Zero, we provision a randomly generated starter subdomain under `pomerium.app` that's assigned to that cluster (for example, `unique-jellyfish-3578.pomerium.app`).
16+
17+
Each starter subdomain comes with its own DNS records and TLS certificates, which makes it easier for new users to quickly build and test routes and policies in Pomerium Zero.
18+
19+
After testing Pomerium Zero with your starter domain, you may want to add a custom domain for use by your cluster's routes to secure your apps and services.
20+
21+
:::info
22+
23+
See the Clusters Concepts page for more information about clusters in Pomerium Zero.
24+
25+
:::
26+
27+
## Custom Domains
28+
29+
In Pomerium Zero, a **Custom Domain** is a wildcard subdomain you can use to build routes in Pomerium. After adding the appropriate record to your DNS provider, Pomerium will automatically provision and renew a TLS certificate for this subdomain.
30+
31+
For example, if you added a custom domain like `mycorp.example.com` to Pomerium Zero, you could build routes like:
32+
33+
- `verify.mycorp.example.com`
34+
- `internal-tool.mycorp.example.com`
35+
- `authenticate.mycorp.example.com`
36+
37+
## How to add a custom domain
38+
39+
Add a **wildcard CNAME record** that points to your starter domain. For example:
40+
41+
```bash
42+
*.mycorp.example.com CNAME unique-jellyfish-3578.pomerium.app
43+
```
44+
45+
If you're using a DNS provider like Google's Cloud DNS, you can add the wildcard CNAME record without code:
46+
47+
![Add a CNAME record in GCP](../capabilities/img/custom-domains/gcp-cname-record.png)
48+
49+
Add the custom domain in the Zero Console:
50+
51+
1. Select **Settings**
52+
1. In the **Editing Clusters Settings** dashboard, select **Domains**
53+
1. In the **Custom Domains** field, select the **+** icon to add a domain name
54+
1. Enter your custom domain
55+
56+
![Entering the fully qualified domain name in the Zero Console](../capabilities/img/custom-domains/add-custom-domain.gif)
57+
58+
If added successfully, you will be able to build routes with your custom domain instead of the starter domain. Pomerium will automatically issue and renew X.509 certificates for this custom domain, which you can verify by the Common Name found in the certificate:
59+
60+
![Reviewing the Let's Encrypt certificate for a custom domain](../capabilities/img/custom-domains/custom-domain-certificates.png)
61+
62+
You can also review the certificate in the **Certificates** dashboard:
63+
64+
![Review certificate details in the Certificate dashboard in the Zero Console](../capabilities/img/custom-domains/certificate-details.gif)
65+
66+
### How custom domains work
67+
68+
In order for Pomerium to provision certificates on behalf of a custom domain, you must prove that you control the domain name specified in the certificate through DNS validation. Per the [ACME protocol](https://datatracker.ietf.org/doc/html/rfc8555#section-2), Pomerium uses its own ACME client to communicate with Let's Encrypt, a free Certificate Authority, to validate a domain's DNS records.
69+
70+
Let's Encrypt provides several [challenge types](https://letsencrypt.org/docs/challenge-types/) to validate a domain, including the [DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge). At a high level, this challenge requires that either:
71+
72+
- A `TXT` record must be placed at `_acme-challenge.<YOUR_DOMAIN>`
73+
- Or, a `CNAME` record must be placed at `_acme-challenge.<YOUR_DOMAIN>` that points to another domain with the `TXT` record
74+
75+
Because Pomerium owns the `pomerium.app` subdomain, we can write the `TXT` record for you. All you need to do is point a wildcard CNAME record to your cluster's starter domain.
Loading
Loading
Loading
Loading

sidebars.js

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ const sidebars = {
5656
type: 'category',
5757
label: 'Capabilities',
5858
items: [
59+
// zero
60+
'docs/capabilities/custom-domains',
5961
// core & open source
6062
//
6163
// Core concepts

0 commit comments

Comments
 (0)