mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 03:57:06 -04:00
Fixed Image Sources in saml-keycloak guide
Signed-off-by: Leo Maroni <git@em0lar.de>
This commit is contained in:
parent
ae8bb96cc6
commit
35ec617007
1 changed files with 11 additions and 11 deletions
|
@ -10,17 +10,17 @@
|
||||||
|
|
||||||
### Create a new client
|
### Create a new client
|
||||||
1. Select "Client" in left sidebar
|
1. Select "Client" in left sidebar
|
||||||

|

|
||||||
2. Click on the "Create" button
|
2. Click on the "Create" button
|
||||||
3. Set a Client ID and specify this in `saml.issuer` property of the CodiMD configuration or `CMD_SAML_ISSUER` environment variable
|
3. Set a Client ID and specify this in `saml.issuer` property of the CodiMD configuration or `CMD_SAML_ISSUER` environment variable
|
||||||
4. Select `SAML` as Client Protocol
|
4. Select `SAML` as Client Protocol
|
||||||
5. Set Client SAML Endpoint to `https://codimd.example.com/auth/saml` (replace `https://codimd.example.com` with the base URL of your CodiMD installation)
|
5. Set Client SAML Endpoint to `https://codimd.example.com/auth/saml` (replace `https://codimd.example.com` with the base URL of your CodiMD installation)
|
||||||

|

|
||||||
6. Leave "Client Signature Required" enabled
|
6. Leave "Client Signature Required" enabled
|
||||||
7. Set Root URL to `https://codimd.example.com` (replace it here also with the base URL of your CodiMD installation)
|
7. Set Root URL to `https://codimd.example.com` (replace it here also with the base URL of your CodiMD installation)
|
||||||
8. Set Valid Redirect URIs to `https://codimd.example.com/auth/saml/callback` (you should also define all other domains of your CodiMD installtion with the suffix `/auth/saml/callback`)
|
8. Set Valid Redirect URIs to `https://codimd.example.com/auth/saml/callback` (you should also define all other domains of your CodiMD installtion with the suffix `/auth/saml/callback`)
|
||||||
9. Set Base URL to `/`
|
9. Set Base URL to `/`
|
||||||

|

|
||||||
10. _(optional)_ You can set which Name ID Format should be used
|
10. _(optional)_ You can set which Name ID Format should be used
|
||||||
|
|
||||||
## Configure CodiMD
|
## Configure CodiMD
|
||||||
|
@ -58,11 +58,11 @@ openssl req -new -x509 -key priv.pem -out cert.pem
|
||||||
2. Select "Client" in left sidebar
|
2. Select "Client" in left sidebar
|
||||||
3. Go to your CodiMD-Client
|
3. Go to your CodiMD-Client
|
||||||
4. Select the "SAML Keys" tab
|
4. Select the "SAML Keys" tab
|
||||||

|

|
||||||
5. Click on "Import"
|
5. Click on "Import"
|
||||||
6. Select `Certificate PEM` as "Archive Format"
|
6. Select `Certificate PEM` as "Archive Format"
|
||||||
7. Now upload the generated cert.pem (in this case named `cert.pem`)
|
7. Now upload the generated cert.pem (in this case named `cert.pem`)
|
||||||

|

|
||||||
8. Click on "Import"
|
8. Click on "Import"
|
||||||
9. Move or copy this key (in this case named `key.pem`) and save it to the file specified in `saml.clientCert` property of the CodiMD configuration or in the enviroment-variable `CMD_SAML_CLIENTCERT`
|
9. Move or copy this key (in this case named `key.pem`) and save it to the file specified in `saml.clientCert` property of the CodiMD configuration or in the enviroment-variable `CMD_SAML_CLIENTCERT`
|
||||||
|
|
||||||
|
@ -73,11 +73,11 @@ Instead if generating you own certificate, you can also use the one generated by
|
||||||
1. Select "Client" in left sidebar
|
1. Select "Client" in left sidebar
|
||||||
2. Go to your CodiMD-Client
|
2. Go to your CodiMD-Client
|
||||||
3. Select the "SAML Keys" tab
|
3. Select the "SAML Keys" tab
|
||||||

|

|
||||||
|
|
||||||
5. Now click on "Export"
|
5. Now click on "Export"
|
||||||
6. Here you can select the output format, choose `PKCS12`. You also have to set a password. Choose your own.
|
6. Here you can select the output format, choose `PKCS12`. You also have to set a password. Choose your own.
|
||||||

|

|
||||||
6. Click on "Download" and save the file somewhere on you computer
|
6. Click on "Download" and save the file somewhere on you computer
|
||||||
7. You now have to extract the private Key. You can do this with the following command. WHen asked, enter your password.
|
7. You now have to extract the private Key. You can do this with the following command. WHen asked, enter your password.
|
||||||
```shell
|
```shell
|
||||||
|
@ -89,15 +89,15 @@ openssl pkcs12 -in keystore.p12 -out key.pem -nocerts -nodes
|
||||||
Instead of using the username as the owner-key in the CodiMD database, you can also use a persistent identifier. This allows to change the username, without them loosing access to their notes.
|
Instead of using the username as the owner-key in the CodiMD database, you can also use a persistent identifier. This allows to change the username, without them loosing access to their notes.
|
||||||
|
|
||||||
1. Go to the CodiMD-Client in keycloak. Now enable the option "Force Name ID Format" and select "persistent" as the "Name ID Format".
|
1. Go to the CodiMD-Client in keycloak. Now enable the option "Force Name ID Format" and select "persistent" as the "Name ID Format".
|
||||||

|

|
||||||
2. For codimd to be able to use the username and email configured in keycloak, you have to create the following SAML protocol mappers:
|
2. For codimd to be able to use the username and email configured in keycloak, you have to create the following SAML protocol mappers:
|
||||||
2.1. Create a mapper with the type `User Property`. Set the Name, Property and SAML Attribute Name to `username`. Now you can specify a friendly name (for example `Username`)
|
2.1. Create a mapper with the type `User Property`. Set the Name, Property and SAML Attribute Name to `username`. Now you can specify a friendly name (for example `Username`)
|
||||||

|

|
||||||
2.2 Create a mapper with the type `User Property`. Set the Name, Property and SAML Attribute Name to `email`. Now you can specify a friendly name (for example `E-Mail`)
|
2.2 Create a mapper with the type `User Property`. Set the Name, Property and SAML Attribute Name to `email`. Now you can specify a friendly name (for example `E-Mail`)
|
||||||

|

|
||||||
|
|
||||||
The configured mappers should look like this:
|
The configured mappers should look like this:
|
||||||

|

|
||||||
|
|
||||||
3. You now have to add the following block to the saml-definition inside your `config.json`:
|
3. You now have to add the following block to the saml-definition inside your `config.json`:
|
||||||
```json
|
```json
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue