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
Copy file name to clipboardexpand all lines: content/docs/courses/zero-fundamentals/advanced-policies.mdx
+4-7
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,10 @@ If you're following these guides sequentially, your current policy only includes
42
42
<TabItemvalue="ppl-editor"label="PPL Editor">
43
43
44
44
```yaml showLineNumbers
45
-
allow:
46
-
and:
47
-
- domain:
48
-
is: example.com
45
+
allow:
46
+
and:
47
+
- domain:
48
+
is: example.com
49
49
```
50
50
51
51
</TabItem>
@@ -55,7 +55,6 @@ This policy is a great first step to protecting your services. If you're using a
55
55
56
56
With Pomerium Policy Language (PPL), you can build richer policies that apply to real-world use cases. Let's cover a few example "real-world" policies below that would fall into the "advanced" category.
57
57
58
-
59
58
### Grant access based on the email criterion
60
59
61
60
You can build an allowlist so that access is only granted to users with a matching email address:
@@ -132,7 +131,6 @@ Taking the policy you just created, you could create an identical policy that so
132
131
</TabItem>
133
132
</Tabs>
134
133
135
-
136
134
### Deny based on day of week, time of day
137
135
138
136
Lastly, we'll create a new policy that denies access to any user on Saturday, Sunday, or weekdays after 5PM.
@@ -199,4 +197,3 @@ In this way, you can chain together multiple policies to add richer access contr
199
197
Now that you've seen some advanced policies, you should learn about advanced routes.
200
198
201
199
Go to [**Advanced Routes**](/docs/courses/zero-fundamentals/advanced-routes).
Copy file name to clipboardexpand all lines: content/docs/courses/zero-fundamentals/advanced-routes.mdx
+15-15
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
1
---
2
+
# cSpell:ignore WORKDIR, workdir, nodeserver
3
+
2
4
id: advanced-routes
3
5
title: Advanced Routes
4
6
sidebar_label: 05. Advanced Routes
@@ -102,16 +104,15 @@ To add JWT claim headers in the Zero Console:
102
104
1. In **Editing Cluster Settings**, select **Headers**
103
105
1. In the **JWT Claim Headers** field, enter the values below:
104
106
105
-
| **KEY** | **VALUE** |
106
-
| :--- | :--- |
107
-
| `x-pomerium-claim-email` | `email` |
108
-
| `x-pomerium-claim-user` | `user` |
109
-
| `x-pomerium-claim-name` | `name` |
110
-
111
-
For example:
107
+
| **KEY** | **VALUE** |
108
+
| :----------------------- | :-------- |
109
+
| `x-pomerium-claim-email` | `email` |
110
+
| `x-pomerium-claim-user` | `user` |
111
+
| `x-pomerium-claim-name` | `name` |
112
112
113
-

113
+
For example:
114
114
115
+

115
116
116
117
After you save your changes, apply your changeset, and access your HTTPBin route, inspect the request. You'll see these additional, unsigned HTTP headers added to the response body:
1. In **Property Name**, enter `X-SET-REQUEST-HEADERS`
126
127
1. In **Property Value**, enter `X-TEST-VALUE`
127
128
128
-
Next, configure [**Remove Request Headers**](/docs/reference/routes/headers#remove-request-headers) to remove two of the JWT claim headers you set in the previous section.
129
+
Next, configure [**Remove Request Headers**](/docs/reference/routes/headers#remove-request-headers) to remove two of the JWT claim headers you set in the previous section.
129
130
130
131
1. In the **Remove Request Headers** field, enter `X-POMERIUM-CLAIM-NAME` and `X-POMERIUM-CLAIM-USER`.
131
132
132
-

133
+

133
134
134
135
Apply your changeset and test the request again. You'll notice that the request header was added to the request, and the specified JWT claim headers were removed:
135
136
@@ -159,8 +160,7 @@ TODO
159
160
160
161
### Direct Response
161
162
162
-
TODO
163
-
You can configure Pomerium to send a small, static HTTP response to the downstream client for a managed route.
163
+
TODO You can configure Pomerium to send a small, static HTTP response to the downstream client for a managed route.
@@ -82,7 +83,6 @@ You can view a policy formatted in YAML using the **PPL Editor** tab:
82
83
83
84
:::
84
85
85
-
86
86
**Example 2**: Allow access based on the domain criterion
87
87
88
88
Requiring an exact email address is one way to secure an app, but it won't let anyone else in without that specific email address. This obviously won't scale for an organization where multiple members may require access to the same service.
@@ -130,5 +130,3 @@ If you built your policy correctly, Pomerium should only grant you access if you
130
130
Next, you'll learn how to secure your upstream service by verifying the user's identity with a JWT. This adds another layer of security to your application.
131
131
132
132
Go to [**Single Sign-on**](/docs/courses/zero-fundamentals/single-sign-on).
Copy file name to clipboardexpand all lines: content/docs/courses/zero-fundamentals/build-routes.mdx
+14-15
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ In Pomerium, **Routing** makes it possible for the Proxy service to manage reque
32
32
33
33
To route requests and responses to the correct locations, the Proxy service requires two sets of routing instructions:
34
34
35
-
- The **From** URL. This URL defines the external, publically accessible URL of a proxied request. It tells the Proxy service to listen for requests from this location.
35
+
- The **From** URL. This URL defines the external, publicly accessible URL of a proxied request. It tells the Proxy service to listen for requests from this location.
36
36
- The **To** URL. This URL defines the destination of the proxied request, or where the Proxy service should direct the origin server's response. It can be an internal or external resource.
37
37
38
38
## How to build routes in Pomerium Zero
@@ -48,14 +48,14 @@ To learn how to build routes, you'll follow these steps:
48
48
The service you'll secure is [Grafana](https://grafana.com/), an open-source observability platform. In the same `docker-compose.yaml` file where you're running Pomerium Zero, add the Grafana configuration below:
49
49
50
50
```yaml
51
-
grafana:
52
-
image: grafana/grafana:latest
53
-
ports:
54
-
- 3000:3000
55
-
networks:
56
-
main: {}
57
-
volumes:
58
-
- ./grafana-storage:/var/lib/grafana
51
+
grafana:
52
+
image: grafana/grafana:latest
53
+
ports:
54
+
- 3000:3000
55
+
networks:
56
+
main: {}
57
+
volumes:
58
+
- ./grafana-storage:/var/lib/grafana
59
59
```
60
60
61
61
### Build a route
@@ -66,12 +66,13 @@ In the Zero Console:
66
66
67
67
1. In the **From** field, select **https://** from the protocol dropdown. In the next field, enter the external URL. It should follow this format:
68
68
69
-
`grafana.<CLUSTER_STARTER_DOMAIN>.pomerium.app`
69
+
`grafana.<CLUSTER_STARTER_DOMAIN>.pomerium.app`
70
+
70
71
1. In the **To** field, enter the destination URL: `http://grafana:3000`
71
72
72
73
1. In the **Policies** field, select **Any Authenticated User**.
73
74
74
-

75
+

75
76
76
77
Save your route and **apply the changeset**.
77
78
@@ -89,7 +90,6 @@ Great job! You successfully built a route in Pomerium Zero. Next, you'll learn h
89
90
90
91
Go to [Build Policies](/docs/courses/zero-fundamentals/build-policies).
91
92
92
-
93
93
#### Configuration file state
94
94
95
95
At this point, your Docker Compose file should look like this:
> See Grafana's [Configure JWT authentication](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/jwt/) docs for more information about these settings.
128
130
129
131
:::note
@@ -191,7 +193,6 @@ Great job! You successfully configured SSO in Pomerium. Next, you'll learn how t
191
193
192
194
Go to [**Build Advanced Policies**](/docs/courses/zero-fundamentals/advanced-policies).
193
195
194
-
195
196
#### Configuration file state
196
197
197
198
At this point, your Docker Compose file should look like this:
0 commit comments