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: docs/reference/server/auth/keycloak/index.rst
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,8 @@ Basic configuration
83
83
84
84
85
85
OAuth2 Gateway Provider
86
-
-----------
86
+
-----------------------
87
+
87
88
In case of using an OAuth2 Gateway, all API requests will come with an Authorization: Bearer header. For this scenario, Syncmaster provides an alternative authentication provider called OAuth2GatewayProvider. This provider works as follows:
88
89
89
90
- It extracts the access token from the Authorization header.
@@ -103,4 +104,4 @@ OAuth2GatewayProvider uses the same configuration models as KeycloakAuthProvider
Copy file name to clipboardExpand all lines: docs/reference/server/auth/keycloak/local_installation.rst
+33-3Lines changed: 33 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ Set URI to redirect from Keycloak login page for exchanging the code for an acce
85
85
86
86
auth:
87
87
keycloak:
88
-
#set here SyncMaster hostname/domain
88
+
#Set here URL of SyncMaster UI page handling callback redirects
89
89
redirect_uri: http://localhost:3000/auth/callback
90
90
# ...
91
91
@@ -108,6 +108,29 @@ Now go to **Credentials** tab and generate a client secret:
108
108
109
109
Now you can use create users in this realm, check `Keycloak documentation <https://www.keycloak.org/docs/latest/server_admin/#assembly-managing-users_server_administration_guide>`_ on how to manage users creation.
110
110
111
+
Enable session middleware
112
+
~~~~~~~~~~~~~~~~~~~~~~~~~
113
+
114
+
Enable :ref:`server-configuration-session <SesionMiddleware>`, and generate random string to use as secret key for cookie encryption.
115
+
116
+
.. code-block:: yaml
117
+
:caption: config.yml
118
+
119
+
server:
120
+
session:
121
+
enabled: true
122
+
secret_key: secret_key_for_session_cookie
123
+
124
+
Replace login page with Keycloak redirect button
125
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126
+
127
+
.. code-block:: yaml
128
+
:caption: config.yml
129
+
130
+
ui:
131
+
# required by KeycloakAuthProvider
132
+
auth_provider: keycloakAuth
133
+
111
134
Final configuration
112
135
~~~~~~~~~~~~~~~~~~~
113
136
@@ -121,15 +144,22 @@ After this you can use ``KeycloakAuthProvider`` in your application:
121
144
keycloak:
122
145
# Keycloak URL accessible from both SyncMaster server and from browser
123
146
server_url: http://keycloak:8080
124
-
#set here SyncMaster hostname/domain
147
+
#Set here URL of SyncMaster UI page handling callback redirects
0 commit comments