You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardexpand all lines: content/docs/capabilities/authentication.mdx
+4
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,10 @@ By configuring your applications to route requests to Pomerium’s Proxy service
54
54
55
55
## External data sources (Enterprise)
56
56
57
+
:::enterprise
58
+
57
59
[Enterprise customers](https://www.pomerium.com/enterprise-sales/) can enforce context-aware access with Pomerium’s [external data sources](/docs/integrations) feature (directory sync).
58
60
61
+
:::
62
+
59
63
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.
Copy file name to clipboardexpand all lines: content/docs/capabilities/authorization.mdx
+131-12
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
# cSpell:ignore abac, gset, nxon
2
+
# cSpell:ignore abac, gset, nxon, unvalidated
3
3
4
4
title: Authorization & Policy
5
5
lang: en-US
@@ -34,9 +34,13 @@ You can apply policies in Pomerium to [Namespaces](/docs/capabilities/namespacin
34
34
35
35
### Namespaces
36
36
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/).
38
40
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.
40
44
41
45
### Routes
42
46
@@ -102,7 +106,11 @@ In this example, Pomerium will grant a user access if their email address ends i
102
106
103
107
### Enterprise Console GUI
104
108
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
+
:::
106
114
107
115
Use the **BUILDER** tab to build your policy:
108
116
@@ -118,17 +126,97 @@ Reapply policies as necessary to any route or namespace:
118
126
119
127
### Rego support
120
128
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/).
122
130
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.
124
132
125
-

133
+
#### Outputs
126
134
127
-
:::tip
135
+
Authorization policy written in Rego is expected to return results in `allow` and/or `deny` rules:
128
136
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
+
```
130
141
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:
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.
@@ -184,6 +272,20 @@ This example pulls session data from the Databroker service using `type.googleap
184
272
</div>
185
273
</details>
186
274
275
+
::::enterprise
276
+
277
+
In the [**Enterprise Console**](/docs/deploy/enterprise), you can write policies in Rego with the PPL builder:
278
+
279
+

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
+
187
289
### Policy overrides
188
290
189
291
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
192
294
- **CORS Preflight**: Allows unauthenticated HTTP OPTIONS requests as per the CORS spec
193
295
- **Public Access**: Allows complete, unrestricted access to an associated route (use this setting with caution)
194
296
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
+
195
310
## Manage devices
196
311
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
+
197
318
The **Manage Devices** feature in the Enterprise Console allows you to enroll and manage user devices for policy-based authorization.
The **Devices List** displays enrolled devices for each user and the approval status. Administrators can inspect, approve, or delete registered devices from this table.
202
323
203
324

204
-
205
-
See [Device Identity](docs/capabilities/device-identity) for more information.
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:
If you're using a DNS provider like Google's Cloud DNS, you can add the wildcard CNAME record without code:
56
+
57
+

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
+

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
+

71
+
72
+
You can also review the certificate in the **Certificates** dashboard:
73
+
74
+

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.
Copy file name to clipboardexpand all lines: content/docs/capabilities/device-identity.mdx
+8
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,14 @@ Enterprise users can build policies that only grant access to a route if a user
67
67
68
68
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.
69
69
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.
description: Directory Sync in Pomerium Enterprise allows you to import organizational directory data and external data sources you can use in authorization policies.
**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**
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: 
61
+
62
+
### Device enrollment
63
+
64
+
Administrators can generate custom device registration links for users within their directory: 
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.
0 commit comments