Skip to content

Commit 5c155a4

Browse files
committed
Merge branch 'main' into kenjenkins/cli-client-certs
2 parents 0685758 + 98af26a commit 5c155a4

File tree

172 files changed

+2676
-1033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+2676
-1033
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
If you notice a self-signed certificate warning, see [Handle Self-Signed Certificate Warning](/docs/internals/troubleshooting#handle-self-signed-certificate-warning) to bypass it.
1+
If you notice a self-signed certificate warning, see [Handle Self-Signed Certificate Warning](/docs/troubleshooting#handle-self-signed-certificate-warning) to bypass it.

content/docs/capabilities/authentication.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ By configuring your applications to route requests to Pomerium’s Proxy service
5454

5555
## External data sources (Enterprise)
5656

57+
:::enterprise
58+
5759
[Enterprise customers](https://www.pomerium.com/enterprise-sales/) can enforce context-aware access with Pomerium’s [external data sources](/docs/integrations) feature (directory sync).
5860

61+
:::
62+
5963
From the Enterprise Console, you can import external data from sources other than your IdP. User identity context such as users, groups, roles, language, time zones, location, and more can be included into your authorization policy so you can make granular access control decisions.

content/docs/capabilities/authorization.mdx

+131-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# cSpell:ignore abac, gset, nxon
2+
# cSpell:ignore abac, gset, nxon, unvalidated
33

44
title: Authorization & Policy
55
lang: en-US
@@ -34,9 +34,13 @@ You can apply policies in Pomerium to [Namespaces](/docs/capabilities/namespacin
3434

3535
### Namespaces
3636

37-
Administrators can create a namespace, add users, groups, and routes to it, and configure a policy that applies to that specific namespace.
37+
:::enterprise
38+
39+
Namespace support is available only for [Enterprise customers](https://www.pomerium.com/enterprise-sales/).
3840

39-
Namespace support is only available for [Enterprise customers](https://www.pomerium.com/enterprise-sales/).
41+
:::
42+
43+
Administrators can create a namespace, add users, groups, and routes to it, and configure a policy that applies to that specific namespace.
4044

4145
### Routes
4246

@@ -102,7 +106,11 @@ In this example, Pomerium will grant a user access if their email address ends i
102106

103107
### Enterprise Console GUI
104108

105-
The Enterprise Console provides a policy builder GUI so you can build policies and reapply them to multiple routes and namespaces.
109+
:::enterprise
110+
111+
The Enterprise Console provides a policy builder GUI so you can build policies and reapply them to multiple routes and namespaces. See our [**Enterprise**](/docs/deploy/enterprise) page to learn more.
112+
113+
:::
106114

107115
Use the **BUILDER** tab to build your policy:
108116

@@ -118,17 +126,97 @@ Reapply policies as necessary to any route or namespace:
118126

119127
### Rego support
120128

121-
Pomerium Core and Enterprise support policies expressed in [Rego](https://www.openpolicyagent.org/docs/latest/#rego) for organizations that prefer to use [OPA](https://www.openpolicyagent.org/).
129+
Pomerium supports policies expressed in [Rego](https://www.openpolicyagent.org/docs/latest/#rego) for organizations that prefer to use [OPA](https://www.openpolicyagent.org/).
122130

123-
For Enterprise customers, use the **Rego** tab to configure your policy:
131+
See the [Outputs](#outputs), [Inputs](#inputs), and [Functions](#functions) reference sections below to learn how they apply to policy evaluation.
124132

125-
![Apply Rego in Console editor](./img/authorization/ppl-rego-policy.png)
133+
#### Outputs
126134

127-
:::tip
135+
Authorization policy written in Rego is expected to return results in `allow` and/or `deny` rules:
128136

129-
A policy can only support PPL or Rego. Once one is set, the other tab is disabled.
137+
```rego
138+
# a policy that always allows access
139+
allow := true
140+
```
130141

131-
:::
142+
```rego
143+
# a policy that always denies access
144+
deny := true
145+
```
146+
147+
Pomerium grants access according to the same rules as [PPL](/docs/capabilities/ppl#actions):
148+
149+
> Only two actions are supported: allow and deny. deny takes precedence over allow. More precisely: a user will have access to a route if at least one allow rule matches and no deny rules match.
150+
151+
`allow` and `deny` rules support four forms:
152+
153+
1. A simple boolean:
154+
155+
```rego
156+
allow := true
157+
```
158+
159+
2. An array with a single boolean value:
160+
161+
```rego
162+
deny := [true]
163+
```
164+
165+
3. An array with two values: a boolean and a **reason**:
166+
167+
```rego
168+
allow := [false, "user-unauthorized"]
169+
```
170+
171+
4. An array with three values: a boolean, a reason, and additional data:
172+
173+
```rego
174+
allow := [false, "user-unauthorized", { "key": "value" }]
175+
```
176+
177+
The **reason** value is useful for debugging, since it appears in [authorization logs](/docs/reference/authorize-log-fields#find-authorize-logs). There are two special reasons that trigger functionality in Pomerium:
178+
179+
- `user-unauthenticated` indicates that the user needs to sign in, and results in a redirect to the Authenticate service
180+
- `device-unauthenticated` indicates that the user needs to register a new device
181+
182+
#### Inputs
183+
184+
Rego scripts are evaluated with inputs available on the `input` object:
185+
186+
```rego
187+
allow if input.http.method == "POST"
188+
```
189+
190+
Rego defines the following inputs:
191+
192+
| **Input name** | **Type** | **Description** |
193+
| :-- | :-- | :-- |
194+
| `http` | Object | Represents the HTTP request |
195+
| `http.method` | String | The method used in the HTTP request |
196+
| `http.hostname` | String | The hostname in the HTTP request |
197+
| `http.path` | String | The path in the HTTP request |
198+
| `http.url` | String | The full URL in the HTTP request |
199+
| `http.headers` | Object | The headers in the HTTP request |
200+
| `http.client_certificate` | Object | The client certificate details |
201+
| `http.client_certificate.presented` | Boolean | `true` if the client presented a certificate |
202+
| `http.client_certificate.leaf` | String | The leaf certificated provided by the client (unvalidated) |
203+
| `http.client_certificate.intermediates` | String | The remainder of the client certificate chain |
204+
| `http.ip` | String | The user's IP address |
205+
| `http.session` | Object | Represents the user's session |
206+
| `http.session.id` | String | The session ID |
207+
| `http.is_valid_client_certificate` | Boolean | `true` if the presented client certificate is valid |
208+
209+
#### Functions
210+
211+
The function below is available in Rego scripts:
212+
213+
- `get_databroker_record(record_type, record_id)`: Returns data from the Databroker service.
214+
215+
For example:
216+
217+
```rego
218+
session := get_databroker_record("type.googleapis.com/session.Session", input.session.id)
219+
```
132220

133221
<details>
134222
<summary>Example Rego Policy</summary>
@@ -184,6 +272,20 @@ This example pulls session data from the Databroker service using `type.googleap
184272
</div>
185273
</details>
186274

275+
::::enterprise
276+
277+
In the [**Enterprise Console**](/docs/deploy/enterprise), you can write policies in Rego with the PPL builder:
278+
279+
![Apply Rego in Console editor](./img/authorization/ppl-rego-policy.png)
280+
281+
:::note
282+
283+
A policy can only support PPL or Rego. Once one is set, the other tab is disabled.
284+
285+
:::
286+
287+
::::
288+
187289
### Policy overrides
188290

189291
Pomerium Core and Enterprise offer the following options for overriding your authorization policy:
@@ -192,14 +294,31 @@ Pomerium Core and Enterprise offer the following options for overriding your aut
192294
- **CORS Preflight**: Allows unauthenticated HTTP OPTIONS requests as per the CORS spec
193295
- **Public Access**: Allows complete, unrestricted access to an associated route (use this setting with caution)
194296

297+
:::note robots.txt behavior
298+
299+
By default, Pomerium serves a **robots.txt** response directly, instructing search engines _not_ to crawl the route domain:
300+
301+
```txt
302+
User-agent: *
303+
Disallow: /
304+
```
305+
306+
For routes with policies that allow public, unauthenticated access, Pomerium _will not_ serve **robots.txt** directly. Instead, Pomerium will proxy requests for `/robots.txt` to the upstream service.
307+
308+
:::
309+
195310
## Manage devices
196311

312+
:::enterprise
313+
314+
[Device identity](/docs/capabilities/device-identity) is an Enterprise feature. Check out our [Enterprise](/docs/deploy/enterprise) page to learn more.
315+
316+
:::
317+
197318
The **Manage Devices** feature in the Enterprise Console allows you to enroll and manage user devices for policy-based authorization.
198319

199320
![Enroll devices](./img/authorization/enroll-device.png)
200321

201322
The **Devices List** displays enrolled devices for each user and the approval status. Administrators can inspect, approve, or delete registered devices from this table.
202323

203324
![List of user devices](./img/authorization/console-devices.png)
204-
205-
See [Device Identity](docs/capabilities/device-identity) for more information.

content/docs/capabilities/branding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Add custom colors, logos, and error messages.
55

66
# Custom Branding / White Labeling
77

8-
:::tip
8+
:::enterprise
99

1010
This article describes a use case available to [Pomerium Enterprise](/docs/deploy/enterprise/install) customers.
1111

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<iframe
12+
width="100%"
13+
height="500"
14+
src="https://www.youtube.com/embed/qj1D5Rgziz0?si=hXM8itfRJ_2lXztP"
15+
title="YouTube video player"
16+
frameborder="0"
17+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
18+
referrerpolicy="strict-origin-when-cross-origin"
19+
allowfullscreen></iframe>
20+
21+
This document describes **Custom Domains** in Pomerium Zero.
22+
23+
## Overview
24+
25+
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`).
26+
27+
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.
28+
29+
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.
30+
31+
:::info
32+
33+
See the Clusters Concepts page for more information about clusters in Pomerium Zero.
34+
35+
:::
36+
37+
## Custom Domains
38+
39+
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.
40+
41+
For example, if you added a custom domain like `mycorp.example.com` to Pomerium Zero, you could build routes like:
42+
43+
- `verify.mycorp.example.com`
44+
- `internal-tool.mycorp.example.com`
45+
- `authenticate.mycorp.example.com`
46+
47+
## How to add a custom domain
48+
49+
Add a **wildcard CNAME record** that points to your starter domain. For example:
50+
51+
```bash
52+
*.mycorp.example.com CNAME unique-jellyfish-3578.pomerium.app
53+
```
54+
55+
If you're using a DNS provider like Google's Cloud DNS, you can add the wildcard CNAME record without code:
56+
57+
![Add a CNAME record in GCP](../capabilities/img/custom-domains/gcp-cname-record.png)
58+
59+
Add the custom domain in the Zero Console:
60+
61+
1. Select **Settings**
62+
1. In the **Editing Clusters Settings** dashboard, select **Domains**
63+
1. In the **Custom Domains** field, select the **+** icon to add a domain name
64+
1. Enter your custom domain
65+
66+
![Entering the fully qualified domain name in the Zero Console](../capabilities/img/custom-domains/add-custom-domain.gif)
67+
68+
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:
69+
70+
![Reviewing the Let's Encrypt certificate for a custom domain](../capabilities/img/custom-domains/custom-domain-certificates.png)
71+
72+
You can also review the certificate in the **Certificates** dashboard:
73+
74+
![Review certificate details in the Certificate dashboard in the Zero Console](../capabilities/img/custom-domains/certificate-details.gif)
75+
76+
### How custom domains work
77+
78+
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.
79+
80+
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:
81+
82+
- A `TXT` record must be placed at `_acme-challenge.<YOUR_DOMAIN>`
83+
- Or, a `CNAME` record must be placed at `_acme-challenge.<YOUR_DOMAIN>` that points to another domain with the `TXT` record
84+
85+
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.

content/docs/capabilities/device-identity.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ Enterprise users can build policies that only grant access to a route if a user
6767

6868
The Enterprise Console’s **Manage Devices** GUI provides a dashboard where administrators can enroll devices and generate custom registration links for users in their directory.
6969

70+
:::enterprise
71+
72+
Before you can generate device registration links for users within your directory, you must sync your directory data first.
73+
74+
See [**Directory Sync**](/docs/capabilities/directory-sync) for more information.
75+
76+
:::
77+
7078
To enroll a new device:
7179

7280
1. In the Console sidebar, select **Devices**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
id: directory-sync
3+
title: Directory Sync
4+
description: Directory Sync in Pomerium Enterprise allows you to import organizational directory data and external data sources you can use in authorization policies.
5+
keywords: [directory sync, idp, identity provider, groups, directory]
6+
---
7+
8+
# Directory Sync
9+
10+
**Directory Sync** is the process of synchronizing external directory data from your identity provider into the Enterprise Console. This document discusses how directory sync works in Pomerium and its use cases.
11+
12+
:::enterprise
13+
14+
**Directory Sync** is a Pomerium Enterprise feature. [Contact us](https://www.pomerium.com/enterprise-sales/) to upgrade today.
15+
16+
:::
17+
18+
:::note
19+
20+
**Directory Sync** integrations in the Enterprise Console are only available for certain identity providers. See [**IdP Options**](#idp-options) below for more information.
21+
22+
:::
23+
24+
## Directory sync in the Enterprise Console
25+
26+
To start a directory sync in the Enterprise Console:
27+
28+
1. Go to the **Identity Providers** tab
29+
1. Select your **Identity Provider**
30+
1. Next to **IDP Options**, fill out the required fields (see [**IdP Options**](#idp-options) below for more information)
31+
1. In the [**Polling Min Delay**](/docs/reference/identity-provider-settings#identity-provider-polling-minmax-delay) and [**Polling Max Delay**](/docs/reference/identity-provider-settings#identity-provider-polling-minmax-delay) fields, keep the default durations
32+
1. Select **SAVE SETTINGS** ![Selecting the Identity Providers tab in Enterprise Console for a directory sync](./img/directory-sync/directory-sync-idp-tab.gif)
33+
34+
Once you save your settings, it may take awhile for the sync to complete. Go to [**Monitor directory sync**](#monitor-directory-sync) for more information.
35+
36+
### Monitor directory sync
37+
38+
The Enterprise Console polls the identity provider data source based on the durations defined in the **Polling Min Delay** and **Polling Max Delay** fields.
39+
40+
See [**Identity Provider Min/Max Delay**](/docs/reference/identity-provider-settings#identity-provider-polling-minmax-delay) for more information on how to monitor directory sync.
41+
42+
### IdP Options
43+
44+
The requirements and instructions for directory sync vary depending on the identity provider. You can view the **IDP Options** for an identity provider in the Enterprise Console, or refer to the relevant identity provider guide for vendor-specific steps:
45+
46+
- [Auth0](/docs/identity-providers/auth0)
47+
- [Cognito](/docs/identity-providers/cognito)
48+
- [Microsoft Entra ID (Azure AD)](/docs/identity-providers/azure)
49+
- [GitHub](/docs/identity-providers/github)
50+
- [GitLab](/docs/identity-providers/gitlab)
51+
- [Google](/docs/identity-providers/google)
52+
- [Okta](/docs/identity-providers/okta)
53+
- [OneLogin](/docs/identity-providers/one-login)
54+
- [Ping](/docs/identity-providers/ping)
55+
56+
## How to use directory sync
57+
58+
### Directory data as policy criteria
59+
60+
After a successful sync, directory data sourced from your identity provider will be available in the Enterprise Console. You can use this data as context in your authorization policies to control which users and groups can access upstream applications and services: ![Using directory sync group data as criteria in the Enterprise Console PPL builder](./img/directory-sync/directory-sync-group-criteria.png)
61+
62+
### Device enrollment
63+
64+
Administrators can generate custom device registration links for users within their directory: ![Generating device registration links for users in the Enterprise Console](./img/directory-sync/device-enrollment.png)
65+
66+
:::enterprise
67+
68+
See [**Device Identity**](/docs/capabilities/device-identity) for more information on how to enroll and manage devices in the Enterprise Console.
69+
70+
:::

0 commit comments

Comments
 (0)