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
description: This guide covers how to add authentication and authorization to a hosted online instance of TiddlyWiki.
6
+
description: This guide shows you how to configure an authorization policy and SSO to control access to an online instance of Tiddlywiki with Pomerium.
You will use the Node.js application in this guide.
22
+
- As a single HTML page
23
+
- As a [Node.js application](https://www.npmjs.com/package/tiddlywiki)
25
24
26
-
## Authentication with Pomerium
25
+
In this guide, you will run Pomerium and your TiddlyWiki Node.js application in Docker containers.
27
26
28
-
TiddlyWiki allows you to authenticate users with the authenticated-user-header parameter of [listen command](https://tiddlywiki.com/static/ListenCommand.html). Pomerium provides the ability to login with well-known [identity providers](/docs/identity-providers#identity-provider-configuration) (IdP).
27
+
## How you will secure TiddlyWiki
29
28
30
-
Pomerium can forward specific user session data to upstream applications. In the case of this guide, Pomerium will forward the email associated with your IdP to TiddlyWiki.
29
+
Securing access to TiddlyWiki involves two steps:
31
30
32
-
## Set up your environment
31
+
- Configuring Pomerium to forward specific user session data in an unsigned header to TiddlyWiki
32
+
- Configuring TiddlyWiki to accept a special request header for trusted authentication
33
+
34
+
In this way, you can implement single sign-on (SSO) for your TiddlyWiki instance, which means an authorized user only needs to authenticate once to access the application.
35
+
36
+
To configure TiddlyWiki, you'll set its [ListenCommand](https://tiddlywiki.com/static/ListenCommand.html) to use the `authenticated-user-header` parameter. You'll configure Pomerium to forward the user's `email` claim in an unsigned header to TiddlyWiki.
37
+
38
+
### Before you start
33
39
34
40
<Tabs>
41
+
<TabItemlabel="Core"value="Core">
35
42
36
-
<TabItemvalue="Core"label="Core">
43
+
If you completed our [Quickstart guide](/docs/quickstart), you should have a working Pomerium project with the following YAML files:
- The [`jwt_claims_headers`](/docs/reference/jwt-claim-headers) setting will forward the user's email address in an unsigned, HTTP request header. The header follows the custom format specified in the file (in this case, `X-Pomerium-Claim-Email`).
79
+
- The [`pass_identity_headers`](/docs/reference/routes/pass-identity-headers-per-route) setting tells Pomerium to forward all identity headers to the upstream application
80
+
- The attached policy authorizes users with a matching email address to access TiddlyWiki. Pomerium will forward the address specified in the policy to TiddlyWiki as an unsigned identity header.
66
81
67
-
### Configure Docker-Compose
82
+
### Set up DockerCompose services
68
83
69
84
Add the following code in your `docker-compose.yaml` file:
6. Select **+** and repeat step 5, but enter **[email protected]** instead.
136
+
The Docker Compose example below contains the minimal configuration required to run TiddlyWiki. It does not include the configuration for Pomerium Enterprise.
137
+
138
+
For an example Pomerium Enterprise configuration using Docker Compose, see the [**Enterprise Quickstart**](/docs/deploy/enterprise/quickstart) guide.
139
+
140
+
:::
141
+
142
+
In your `docker-compose.yaml` file, add the TiddlyWiki configuration:

119
199
120
200
</TabItem>
121
-
122
201
</Tabs>
123
202
124
-
### Test your routes
203
+
## Test TiddlyWiki
204
+
205
+
In your browser, navigate to your TiddlyWiki instance. Pomerium will prompt you to authenticate against its hosted identity provider.
125
206
126
-
Navigate to your TiddlyWiki instance (e.g. `https://wiki.example.local`) and log in using the following usernames:
207
+
After successful authentication, Pomerium will redirect you to your TiddlyWiki instance:
0 commit comments