Skip to content

Commit dd2a6a9

Browse files
desimoneZPain8464
andauthored
docs: restructure around concepts, capabilities, releases, internals, and integrations (#170)
Signed-off-by: Bobby DeSimone <[email protected]> Signed-off-by: Bobby DeSimone <[email protected]> Co-authored-by: zachary painter <[email protected]>
1 parent 2a9fa5d commit dd2a6a9

File tree

440 files changed

+5276
-6169
lines changed

Some content is hidden

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

440 files changed

+5276
-6169
lines changed

.github/ISSUE_TEMPLATE/doc-error.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Page: https://www.pomerium.com/docs/${page}
1414

1515
## What's the resolution?
1616

17-
<!-- If you don't know the correct information, that's fine. Just knowing we need to fix something is usually enough. -->
17+
<!-- If you don't know the correct information, that's fine. Just knowing we need to fix something is usually enough. -->

.github/workflows/backport.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Backport
2+
permissions:
3+
contents: read
4+
on:
5+
pull_request_target:
6+
types:
7+
- closed
8+
- labeled
9+
10+
jobs:
11+
backport:
12+
runs-on: ubuntu-latest
13+
name: Backport
14+
steps:
15+
- name: Generate token
16+
id: generate_token
17+
uses: tibdex/github-app-token@f717b5ecd4534d3c4df4ce9b5c1c2214f0f7cd06
18+
with:
19+
app_id: ${{ secrets.BACKPORT_APP_APPID }}
20+
private_key: ${{ secrets.BACKPORT_APP_PRIVATE_KEY }}
21+
22+
- name: Backport
23+
uses: pomerium/backport@e2ffd4c5a70730dfd19046859dfaf366e3de6466
24+
with:
25+
github_token: ${{ steps.generate_token.outputs.token }}
26+
title_template: '{{originalTitle}}'
27+
copy_original_labels: true

.github/workflows/pre-commit.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
11+
with:
12+
fetch-depth: 0
13+
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
14+
with:
15+
extra_args: --show-diff-on-failure --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}

.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-prettier
3+
rev: v2.4.1
4+
hooks:
5+
- id: prettier
6+
additional_dependencies:
7+
8+
files: ^content\/.*$

LICENSE.md

+45-45
Large diffs are not rendered by default.

content/_generate-recovery-token.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ In the event that you lose access to the console via delegated access (the polic
44

55
To generate a token, run the `pomerium-console generate-recovery token` command with the following flags:
66

7-
| Flag | Description |
8-
| --------------------------- | ----------- |
7+
| Flag | Description |
8+
| --- | --- |
99
| `--database-encryption-key` | base64-encoded encryption key for encrypting sensitive data in the database. |
10-
| `--database-url` | The database to connect to (default "`postgresql://pomerium:pomerium@localhost:5432/dashboard?sslmode=disable`"). |
11-
| `--namespace` | The namespace to use (default "`9d8dbd2c-8cce-4e66-9c1f-c490b4a07243`" for Global). |
12-
| `--out` | Where to save the JWT. If not specified, it will be printed to stdout. |
13-
| `--ttl` | The amount of time before the recovery token expires. Requires a unit (example: `30s`, `5m`).|
10+
| `--database-url` | The database to connect to (default "`postgresql://pomerium:pomerium@localhost:5432/dashboard?sslmode=disable`"). |
11+
| `--namespace` | The namespace to use (default "`9d8dbd2c-8cce-4e66-9c1f-c490b4a07243`" for Global). |
12+
| `--out` | Where to save the JWT. If not specified, it will be printed to stdout. |
13+
| `--ttl` | The amount of time before the recovery token expires. Requires a unit (example: `30s`, `5m`). |
1414

1515
:::tip
16+
1617
You can run the `pomerium-console` binary from any device with access to the database.
18+
1719
:::

content/_install-mkcert.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ rootCA-key.pem rootCA.pem
1111

1212
The output of `mkcert -install` may vary depending on your operating system.
1313

14-
[installing mkcert]: https://github.com/FiloSottile/mkcert#installation
14+
[installing mkcert]: https://github.com/FiloSottile/mkcert#installation

content/docs/topics/auth-logs.md content/docs/capabilities/audit-logs.mdx

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
---
2-
title: Authorization Logs
2+
title: Audit Logs
33
description: Learn how to read Pomerium authorization logs.
4-
pagination_prev: null
54
lang: en-US
5+
sidebar_label: Audit logs
66
keywords: [pomerium, troubleshooting, auth, authorization, logs]
7+
sidebar_class_name: enterprise
78
---
89

910
import Tabs from '@theme/Tabs';
1011
import TabItem from '@theme/TabItem';
1112

12-
Pomerium provides verbose logging to help users manage and troubleshoot their configurations. The amount of logs output can be overwhelming, so on this page we'll cover how to sort for and understand logs from the authorization service. These logs often provide the most helpful information when first configuring Pomerium.
13+
# Audit logs
14+
15+
Pomerium provides verbose logging to help users audit, manage, and troubleshoot their configurations. The amount of logs output can be overwhelming, so on this page we'll cover how to sort for and understand logs from the authorization service. These logs often provide the most helpful information when first configuring Pomerium.
1316

1417
## Find Logs
1518

@@ -106,16 +109,16 @@ kubectl logs -f deploy/pomerium-authorize | grep '"service":"authorize"' | jq
106109

107110
The keys described below usually contain the relevant information when debugging an authorization issue:
108111

109-
| Key | Description |
110-
| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
111-
| <a className="entRef-anchor" id="allow">#</a><a href='#allow'>`allow`</a> | If true, at least one allow rule passed. As long as `deny` is false, the request will be allowed. |
112-
| <a className="entRef-anchor" id="allow-why-false">#</a><a href='#allow-why-false'>`allow-why-false` & `allow-why-true`</a> | The short reason strings why access was allowed (or not allowed). <br/> <br/> In the example output above, `claim-unauthorized` means that there was a policy rule on a claim that didn't pass.<br/><br/>`non-pomerium-route` means that it was not a request to `/.pomerium/`, which is allowed for any authenticated user. |
113-
| <a className="entRef-anchor" id="deny">#</a><a href='#deny'>`deny`</a> | If true it means that at least one deny rule passed, and the request will be denied. |
114-
| <a className="entRef-anchor" id="deny-why-false">#</a><a href='#deny-why-false'>`deny-why-false` & `deny-why-true`</a> | The short reason strings why access was denied (or not denied). <br/><br/>In the example above, `valid-client-certificate-or-none-required` means that either a valid client certificate was provided, or the policy didn't require one. By default pomerium policies have this PPL rule added to them. It's how we implement client certificates. |
115-
| <a className="entRef-anchor" id="databroker">#</a><a href='#databroker'>`databroker_server_version` & `databroker_record_version`</a> | These values are used for auditing. With these version numbers and a complete history of all changes in the databroker, you can determine what data was used for policy evaluation. |
112+
| Key | Description |
113+
| --- | --- |
114+
| <a className="entRef-anchor" id="allow">#</a><a href='#allow'>`allow`</a> | If true, at least one allow rule passed. As long as `deny` is false, the request will be allowed. |
115+
| <a className="entRef-anchor" id="allow-why-false">#</a><a href='#allow-why-false'>`allow-why-false` & `allow-why-true`</a> | The short reason strings why access was allowed (or not allowed). <br/> <br/> In the example output above, `claim-unauthorized` means that there was a policy rule on a claim that didn't pass.<br/><br/>`non-pomerium-route` means that it was not a request to `/.pomerium/`, which is allowed for any authenticated user. |
116+
| <a className="entRef-anchor" id="deny">#</a><a href='#deny'>`deny`</a> | If true it means that at least one deny rule passed, and the request will be denied. |
117+
| <a className="entRef-anchor" id="deny-why-false">#</a><a href='#deny-why-false'>`deny-why-false` & `deny-why-true`</a> | The short reason strings why access was denied (or not denied). <br/><br/>In the example above, `valid-client-certificate-or-none-required` means that either a valid client certificate was provided, or the policy didn't require one. By default pomerium policies have this PPL rule added to them. It's how we implement client certificates. |
118+
| <a className="entRef-anchor" id="databroker">#</a><a href='#databroker'>`databroker_server_version` & `databroker_record_version`</a> | These values are used for auditing. With these version numbers and a complete history of all changes in the databroker, you can determine what data was used for policy evaluation. |
116119

117120
## Understanding Authorization Logs
118121

119122
The most confusing keys for new users to understand are likely `allow-why-false` and `deny-why-false`. To better understand them, we should first discuss how Pomerium Policy Language (**PPL**) works.
120123

121-
PPL allows a request to a route if the claim matches at least one **allow** policy rule, and matches zero **deny** policy rules. With that in mind, `allow-why-false` and `allow-why-true` will describe a situation where the request either does or not not meet the requirements of an **allow** block a policy applied to that route. Conversely, `deny-why-true` and `deny-why-false` will describe why a request did or did not match a **deny** block for a policy assigned to the route.
124+
PPL allows a request to a route if the claim matches at least one **allow** policy rule, and matches zero **deny** policy rules. With that in mind, `allow-why-false` and `allow-why-true` will describe a situation where the request either does or not not meet the requirements of an **allow** block a policy applied to that route. Conversely, `deny-why-true` and `deny-why-false` will describe why a request did or did not match a **deny** block for a policy assigned to the route.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
sidebar_label: Authentication
3+
description: This article describes how Pomerium provides a single source of authentication and identity to all services it manages.
4+
---
5+
6+
# Authentication / SSO
7+
8+
While Pomerium itself is not an identity provider, Pomerium does integrate with your existing single-sign-on Identity Provider (**IdP**) of choice. Pomerium uses your IdP to add authentication, single-sign-on, and identity context to all upstream applications even if the app itself doesn't directly support single-sign-on, which is great for legacy apps.
9+
10+
Pomerium supports any identity provider that uses the open standard [OpenID Connect][openid connect] (**OIDC**). In addition to (OIDC), Pomerium supports most well known identity providers specifically, and Pomerium Enterprise users are able to leverage full directory sync for even more context around things like roles, groups, and whatever other relevant user identity context which exists in your directory.
11+
12+
[openid connect]: https://en.wikipedia.org/wiki/OpenID_Connect
+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
title: Authorization & Policy
3+
lang: en-US
4+
sidebar_label: Authorization
5+
description: How to get Pomerium's CLI which be used to proxy TCP services and kubernetes commands
6+
keywords:
7+
[
8+
pomerium,
9+
context-aware proxy,
10+
authorization proxy,
11+
access decision point,
12+
rbac,
13+
abac,
14+
dynamic access,
15+
]
16+
---
17+
18+
# Authorization
19+
20+
## Policy
21+
22+
A [Policy](/docs/capabilities/authorization.mdx) defines what permissions a set of users or groups has. Policies are applied to Namespaces or Routes to associate the set of permissions with a service or set of service, completing the authentication model.
23+
24+
Policies can be constructed three ways:
25+
26+
### Web UI
27+
28+
From the **BUILDER** tab, users can add allow or deny blocks to a policy, containing and/or/not/nor logic to allow or deny sets of users and groups.
29+
30+
![A policy being constructed in Pomerium Enterprise allowing a single user access](./img/authorization/example-policy-single-user.png)
31+
32+
Policies can be constructed three ways:
33+
34+
### Pomerium Policy Language
35+
36+
From the **EDITOR** tab users can write policies in Pomerium Policy Language (**PPL**), a YAML-based notation.
37+
38+
![A policy as viewed from the editor tab](./img/authorization/example-policy-editor.png)
39+
40+
PPL documents contain one or more rules. Each rule has a corresponding action and one or more logical operators. Each logical operator contains criteria and each criterion has a name and corresponding data.
41+
42+
PPL documents are defined via YAML:
43+
44+
```yaml
45+
- allow:
46+
or:
47+
- email:
48+
49+
- email:
50+
51+
```
52+
53+
The available rule actions are:
54+
55+
- `allow`
56+
- `deny`
57+
58+
The available logical operators are:
59+
60+
- `and`
61+
- `or`
62+
- `not`
63+
- `nor`
64+
65+
The available criteria types are:
66+
67+
- `accept`
68+
- `authenticated_user`
69+
- `claim`
70+
- `date`
71+
- `day_of_week`
72+
- `domain`
73+
- `email`
74+
- `groups`
75+
- `http_method`
76+
- `http_path`
77+
- `record`
78+
- `reject`
79+
- `time_of_day`
80+
- `user`
81+
82+
Some criteria also support a sub-path as part of the criterion name:
83+
84+
```yaml
85+
- allow:
86+
or:
87+
- claim/family_name: Smith
88+
```
89+
90+
See [Pomerium Policy Language](/docs/capabilities/ppl) for more details.
91+
92+
### Rego
93+
94+
For those using [OPA](https://www.openpolicyagent.org/), the **REGO** tab will accept policies written in Rego.
95+
96+
:::tip
97+
98+
A policy can only support PPL or Rego. Once one is set, the other tab is disabled.
99+
100+
:::
101+
102+
<details>
103+
<summary>Example Rego Policy</summary>
104+
<div>
105+
106+
This example policy compares the `given_name` claim from a user's session against a list of popular first names, and only allows the 100 most popular first names.
107+
108+
```rego
109+
package pomerium.policy
110+
session = s {
111+
s = gset_databroker_record("type.googleapis.com/user.ServiceAccount", input.session.id)
112+
s != null
113+
} else = s {
114+
s = get_databroker_record("type.googleapis.com/session.Session", input.session.id)
115+
s != null
116+
} else = {} {
117+
true
118+
}
119+
user = u {
120+
u = get_databroker_record("type.googleapis.com/user.User", session.user_id)
121+
} else = {} {
122+
true
123+
}
124+
allow = [true, {"custom-rego-authorized"}] {
125+
# grab all the claims from the user and session objects
126+
session_claims := object.get(session, "claims", {})
127+
user_claims := object.get(user, "claims", {})
128+
all_claims := object.union(session_claims, user_claims)
129+
# get the given_name claim. claim values are always an array of strings
130+
given_names := object.get(all_claims, "given_name", [])
131+
# query a JSON dump of the most popular baby names from 2020
132+
response := http.send({
133+
"method": "GET",
134+
"url": "https://raw.githubusercontent.com/aruljohn/popular-baby-names/master/2020/boy_names_2020.json",
135+
"force_json_decode": true,
136+
})
137+
# only include the top 100 names
138+
all_names := response.body.names
139+
popular_names := array.slice(all_names, 0, 99)
140+
# check that there's a given name in the popular names
141+
some i
142+
some j
143+
popular_names[i] == given_names[j]
144+
} else = [false, {"custom-rego-unauthorized"}] {
145+
session.id != ""
146+
} else = [false, {"user-unauthenticated"}] {
147+
true
148+
}
149+
```
150+
151+
This example pulls session data from the Databroker service using `type.googleapis.com/session.Session` for users and `type.googleapis.com/user.ServiceAccount` for service accounts.
152+
153+
</div>
154+
</details>
155+
156+
### Overrides
157+
158+
- **Any Authenticated User**: This setting will allow access to a route with this policy attached to any user who can authenticate to your Identity Provider (**IdP**).
159+
- **CORS Preflight**: Allow unauthenticated HTTP OPTIONS requests as per the CORS spec.
160+
- **Public Access**: This setting allows complete, unrestricted access to an associated route. Use this setting with caution.
161+
162+
## Devices
163+
164+
Introduced in v0.16.0, the **Manage Devices** page lets administrators manage user devices for policy-based authorization.
165+
166+
### Manage Devices
167+
168+
<ManageDevices />
169+
170+
### Devices List
171+
172+
Displays the currently enrolled devices for each user, along with their current approval status. Administrators can inspect, approve, or delete registered devices from this table.
173+
174+
![List of user devices](./img/authorization/console-devices.png)

0 commit comments

Comments
 (0)