Skip to content

Commit 65f4474

Browse files
committed
Readme: Added Kanidm and PKCE
1 parent 23b89ae commit 65f4474

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ This README file contains the following main sections:
2121
+ [Github](#github)
2222
+ [Google](#google)
2323
+ [Joomla](#joomla)
24+
+ [Kanidm](#kanidm)
2425
+ [Keycloak](#keycloak)
2526
+ [Nextcloud](#nextcloud)
2627
+ [PocketID](#pocketid)
2728
+ [Spotify](#spotify)
2829
+ [WordPress](#wordpress)
30+
+ [PKCE (Proof Key for Code Exchange)](#pkce-proof-key-for-code-exchange)
2931
+ [Trouble Shooting](#trouble-shooting)
3032
+ [Concept](#concept)
3133
+ [Definitons](#definitions)
@@ -80,6 +82,7 @@ Currently, the following authorization providers are supported:
8082
+ **Github**
8183
+ **Google**
8284
+ **Joomla** (with a specific authorization provider extension installed in Joomla)
85+
+ **Kanidm**
8386
+ **Keycloak**
8487
+ **Nextcloud**
8588
+ **PocketID** (can be configured with the Generic provider)
@@ -259,6 +262,27 @@ Joomla_signInButtonLabel='xxx'
259262
+ **Joomla_urlAuthorize**='JOOMLA_BASE_URL/index.php' (JOOMLA_BASE_URL from your Joomla installation, e.g. 'https://mysite.net/joomla')
260263
+ **Joomla_signInButtonLabel**='...' (the label, which shall be shown for the sign in button etc.)
261264

265+
### Kanidm
266+
+ For a description about the Kanidm configuration, refer to the chapter about OAuth2 configuration in the [Kanidm Administration Manual](https://kanidm.github.io/kanidm/stable/integrations/oauth2.html)
267+
+ Configure your client in Kanidm
268+
+ Open your webtrees config.ini.php file and add the following lines (copy/paste to the end):
269+
```PHP
270+
Kanidm_clientId='xxx'
271+
Kanidm_clientSecret='xxx'
272+
Kanidm_urlAuthorize='https://KANIDM_SERVER_URL/ui/oauth2'
273+
Kanidm_urlAccessToken='https://KANIDM_SERVER_URL/oauth2/token'
274+
Kanidm_urlResourceOwnerDetails='https://KANIDM_SERVER_URL/oauth2/openid/KANIDM_CLIENT_ID/userinfo'
275+
Kanidm_signInButtonLabel='xxx'
276+
Kanidm_pkceMethod='S256'
277+
```
278+
+ Insert the configuration details from your Kanidm installation into the newly included configuration lines of your config.ini.php file:
279+
+ **Kanidm_clientId**='...' (the "client id" used in Kanidm)
280+
+ **Kanidm_clientSecret**='...' (value for "Client Secret" shown in Kanidm)
281+
+ **Kanidm_urlAuthorize**='...' (KANIDM_SERVER_URL: Insert the URL of your Kanidm server)
282+
+ **Kanidm_urlAccessToken**='...' (KANIDM_SERVER_URL: Insert the URL of your Kanidm server)
283+
+ **Kanidm_urlResourceOwnerDetails**='...' (KANIDM_SERVER_URL: Insert the URL of your Kanidm server. KANIDM_CLIENT_ID: Insert your Kanidm client id)
284+
+ **Kanidm_signInButtonLabel**='...' (the label, which shall be shown for the sign in button etc.)
285+
262286
### Keycloak
263287
+ Log into your Keycloak administration backend and select or create a realm
264288
+ Create a new client with "Client" / "Create client"
@@ -286,7 +310,7 @@ Keycloak_signInButtonLabel='xxx'
286310
+ **Keycloak_signInButtonLabel**='...' (the label, which shall be shown for the sign in button etc.)
287311

288312
### Nextcloud
289-
+ Open the chapter about OAuth2 configuration in the [Nextcloud Administration Manual](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/oauth2.html#add-an-oauth2-application)
313+
+ For a description about the Nextcloud configuration, open the chapter about OAuth2 configuration in the [Nextcloud Administration Manual](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/oauth2.html#add-an-oauth2-application)
290314
+ Configure a new OAuth2 client app in Nextcloud like described in chapter "Add an OAuth2 Application"
291315
+ Open your webtrees config.ini.php file and add the following lines (copy/paste to the end):
292316
```PHP
@@ -363,6 +387,14 @@ If using Apache and the OAuth 2 authorization fails, check the following setting
363387
```PHP
364388
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
365389
```
390+
## PKCE (Proof Key for Code Exchange)
391+
The Generic and Kanidm authorization providers support to use PKCE.
392+
393+
In order to activate PKCE for the **Generic provider**, the following configuration needs to be added to the config.ini.php file in webtrees:
394+
```PHP
395+
Generic_pkceMethod='S256'
396+
```
397+
In Kanidm, PKCE is activated by default. Therefore, the PKCE configuration is included in the [Kanidm chapter](#kanidm).
366398

367399
## Trouble Shooting
368400
Although OAuth 2 is a standard protocol and is used on lots of websites, the authorization process is very sensitive to certain server configurations. The list below provides some hints for trouble shooting:

0 commit comments

Comments
 (0)