Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a custom domains Capabilities page/guide #1343

Merged
merged 14 commits into from
Apr 11, 2024

Conversation

ZPain8464
Copy link
Contributor

@ZPain8464 ZPain8464 commented Apr 2, 2024

This PR adds a first draft of the Custom Domains capabilities page.

TODOs:

  • Add Cluster Concepts link once that's published
  • Add a Next Steps section
  • Possibly add a video? or add the guide portion as a separate Guide
  • Determine Reference page requirements for this

Related to https://github.com/pomerium/internal/issues/1766

@ZPain8464 ZPain8464 requested a review from a team as a code owner April 2, 2024 20:16
Copy link

netlify bot commented Apr 2, 2024

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit d1485c8
🔍 Latest deploy log https://app.netlify.com/sites/pomerium-docs/deploys/661822b999df460008fe4a31
😎 Deploy Preview https://deploy-preview-1343--pomerium-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@desimone desimone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments. Would defer to @calebdoxsey for a technical review and @cmo-pomerium for copy.


:::info

See the Clusters Concepts page for more information about clusters in Pomerium Zero.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume link is coming?

Suggested change
See the Clusters Concepts page for more information about clusters in Pomerium Zero.
See the [Clusters] Concepts page for more information about clusters in Pomerium Zero.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@@ -56,6 +56,8 @@ const sidebars = {
type: 'category',
label: 'Capabilities',
items: [
// zero
'docs/capabilities/custom-domains',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually we should probably put these all collected together with a prepended highlight like ent or something.


### DNS validation

In order for Pomerium to issue 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a nice detail we cover how.

@ZPain8464 ZPain8464 requested a review from calebdoxsey April 2, 2024 22:37
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 consists of two steps:

1. A TXT record containing a specific token value must be placed into the `_acme-challenge.<YOUR_DOMAIN>` endpoint
1. A **wildcard CNAME record** must be added under the custom domain that points to your cluster's **Starter Domain**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more of an either/or.

Either a TXT record must be placed at _acme-challenge.<YOUR_DOMAIN>, or a CNAME record must be placed at _acme-challenge.<YOUR_DOMAIN> that points to another domain that has the TXT record. Since we own the .pomerium.app sub-domain, we can write the TXT record for them.

Using a *.<YOUR_DOMAIN> CNAME record also works for this. We recommend it because it also allows client requests to be forwarded to Pomerium.


In the context of Pomerium Zero, an FQDN is the complete domain name of a custom domain. The example below resembles a valid FQDN, where `service` is the hostname, `mycorp` is the subdomain, and `example.com` is the domain name:

`service.mycorp.example.com`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the best example here would be. Maybe we should give some example routes?

For example, given routes like:

  • verify.mycorp.example.com
  • internal-tool.mycorp.example.com
  • authenticate.mycorp.example.com

You would want to use mycorp.example.com as the custom domain.

@ZPain8464 ZPain8464 requested a review from calebdoxsey April 3, 2024 18:37
@ZPain8464
Copy link
Contributor Author

@calebdoxsey could you review this again when you have a second?


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.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: "you may want" -> "you'll likely want"


In Pomerium Zero, a valid **Custom Domain** is a fully qualified domain name (FQDN) where the domain owner can demonstrate control over the domain through DNS validation.

After you successfully add a custom domain to your cluster, Pomerium will automatically issue and renew X.509 wildcard certificates on behalf of the domain to secure the connection over TLS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest removing this paragraph if you like my suggestion for the previous paragraph.

(Otherwise, I'd suggest using "TLS certificate" rather than "X.509 certificate" as that's the terminology first used in the Overview section.)

Comment on lines 33 to 39
### Fully Qualified Domain Names

In the context of Pomerium Zero, an FQDN is the complete domain name of a custom domain. The example below resembles a valid custom domain, where `mycorp` is the subdomain and `example.com` is the domain name:

`mycorp.example.com`

If you build routes with this custom domain to upstream services with hostnames like `verify`, `internal-tool`, and `authenticate`, your routes would look like:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should skip some of the jargon where possible?

Maybe just:

Suggested change
### Fully Qualified Domain Names
In the context of Pomerium Zero, an FQDN is the complete domain name of a custom domain. The example below resembles a valid custom domain, where `mycorp` is the subdomain and `example.com` is the domain name:
`mycorp.example.com`
If you build routes with this custom domain to upstream services with hostnames like `verify`, `internal-tool`, and `authenticate`, your routes would look like:
Say you want to use Pomerium Zero with the domain `mycorp.example.com`. After adding this custom domain, you'll be able to build routes like:

- `internal-tool.mycorp.example.com`
- `authenticate.mycorp.example.com`

### DNS validation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest moving this section further down, after "How to add a custom domain", and possibly renaming this section to "How it works". (I expect more users will want to know "how do I do this" compared to "what's going on behind the scenes".)


### DNS validation

In order for Pomerium to issue 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one terminology nit: Pomerium doesn't "issue" certificates itself (only a "certificate authority" can do that), so if we want to be more precise I might suggest using "request" or "provision" instead of "issue".


## How to add a custom domain

Add a wildcard CNAME record that points to your starter domain:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should include a little code snippet too?

Suggested change
Add a wildcard CNAME record that points to your starter domain:
Add a wildcard CNAME record that points to your starter domain, for example:
*.mycorp.example.com CNAME unique-jellyfish-3578.pomerium.app
In Google Cloud Platform, this looks something like:

For example, one of Cloudflare's help pages does something similar when giving instructions for adding a CNAME:
Screen Shot 2024-04-10 at 9 29 06 AM

@ZPain8464 ZPain8464 merged commit 399a21c into main Apr 11, 2024
8 checks passed
@ZPain8464 ZPain8464 deleted the zpain/custom-domains-guide branch April 11, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants