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
<p>The most straight-forward of the two to implement is <aclass="reference internal" href="#basic-auth">Basic Auth</a>.</p>
@@ -101,8 +102,8 @@
101
102
</div>
102
103
<divclass="section" id="oauth2-authentication">
103
104
<spanid="oauth2"></span><h2>OAuth2 Authentication<aclass="headerlink" href="#oauth2-authentication" title="Permalink to this headline">¶</a></h2>
104
-
<p>OAuth authentication is provided by <aclass="reference external" href="https://developers.google.com/accounts/docs/OpenIDConnect">Google</a><aclass="reference external" href="http://openid.net/connect/">OpenID Connect</a>, <aclass="reference external" href="https://developer.github.com/v3/oauth/">GitHub</a> or
105
-
<aclass="reference external" href="http://doc.gitlab.com/ce/integration/oauth_provider.html">GitLab</a><aclass="reference external" href="http://tools.ietf.org/html/draft-ietf-oauth-v2-22">OAuth 2.0</a> and configuration is more involved than the Basic
105
+
<p>OAuth authentication is provided by <aclass="reference external" href="https://developers.google.com/accounts/docs/OpenIDConnect">Google</a><aclass="reference external" href="http://openid.net/connect/">OpenID Connect</a>, <aclass="reference external" href="https://developer.github.com/v3/oauth/">GitHub</a>,
106
+
<aclass="reference external" href="http://doc.gitlab.com/ce/integration/oauth_provider.html">GitLab</a><aclass="reference external" href="http://tools.ietf.org/html/draft-ietf-oauth-v2-22">OAuth 2.0</a>or <aclass="reference external" href="https://www.keycloak.org/documentation.html">Keycloak</a><aclass="reference external" href="http://tools.ietf.org/html/draft-ietf-oauth-v2-22">OAuth 2.0</a>and configuration is more involved than the Basic
106
107
Auth setup.</p>
107
108
<divclass="admonition note">
108
109
<pclass="first admonition-title">Note</p>
@@ -112,7 +113,7 @@
112
113
alerts.</p>
113
114
</div>
114
115
<pid="google-oauth2">To use OAuth2 set the <codeclass="docutils literal"><spanclass="pre">provider</span></code> configuration setting in the Web UI
115
-
<codeclass="file docutils literal"><spanclass="pre">config.js</span></code> file to one of <codeclass="docutils literal"><spanclass="pre">google</span></code>, <codeclass="docutils literal"><spanclass="pre">github</span></code>or <codeclass="docutils literal"><spanclass="pre">gitlab</span></code>:</p>
116
+
<codeclass="file docutils literal"><spanclass="pre">config.js</span></code> file to one of <codeclass="docutils literal"><spanclass="pre">google</span></code>, <codeclass="docutils literal"><spanclass="pre">github</span></code>, <codeclass="docutils literal"><spanclass="pre">gitlab</span></code>or <codeclass="docutils literal"><spanclass="pre">keycloak</span></code>:</p>
<p>Take note of the realm, resource and secret. Then configuration settings for <codeclass="docutils literal"><spanclass="pre">alerta</span></code> server are as follows (replacing
279
+
the values shown below with the values generated by Keycloak):</p>
<pid="allowed-keycloak-roles">To restrict access to users who are associated with a particular <ahref="#id8"><spanclass="problematic" id="id9">`Keycloak role`_</span></a> use:</p>
<pclass="last"><codeclass="docutils literal"><spanclass="pre">ALLOWED_KEYCLOAK_ROLES</span></code> can be an asterisk (<codeclass="docutils literal"><spanclass="pre">*</span></code>) to force
293
+
login but <em>not</em> restrict who can login.</p>
294
+
</div>
295
+
</div>
243
296
<divclass="section" id="cross-origin">
244
297
<spanid="id5"></span><h3>Cross-Origin<aclass="headerlink" href="#cross-origin" title="Permalink to this headline">¶</a></h3>
245
298
<p>If the Alerta API is not being served from the same domain as the Alerta
@@ -283,7 +336,7 @@ <h3>GitLab OAuth2<a class="headerlink" href="#gitlab-oauth2" title="Permalink to
283
336
</div>
284
337
<divclass="section" id="user-authorisation">
285
338
<spanid="user-auth"></span><h2>User Authorisation<aclass="headerlink" href="#user-authorisation" title="Permalink to this headline">¶</a></h2>
286
-
<p>Google, GitHub and GitLab OAuth are used for user authentication, not
339
+
<p>Google, GitHub, GitLab OAuth, Keycloak OAuth are used for user authentication, not
287
340
user authorisation. Authentication proves that you are who you say you
288
341
are. Authorization says that you are allowed to access what you have
289
342
requested.</p>
@@ -293,10 +346,12 @@ <h3>GitLab OAuth2<a class="headerlink" href="#gitlab-oauth2" title="Permalink to
293
346
belong to a <aclass="reference internal" href="#allowed-github-orgs"><spanclass="std std-ref">particular GitHub organisation</span></a>
294
347
by setting <codeclass="docutils literal"><spanclass="pre">ALLOWED_GITHUB_ORGS</span></code> when using GitHub OAuth, or who
295
348
belong to a <aclass="reference internal" href="#allowed-gitlab-groups"><spanclass="std std-ref">particular GitLab group</span></a>
296
-
by setting <codeclass="docutils literal"><spanclass="pre">ALLOWED_GITLAB_GROUPS</span></code> when using GitLab OAuth2.</p>
349
+
by setting <codeclass="docutils literal"><spanclass="pre">ALLOWED_GITLAB_GROUPS</span></code> when using GitLab OAuth2.
350
+
belong to a <aclass="reference internal" href="#allowed-keycloak-roles"><spanclass="std std-ref">particular Keycloak role</span></a>
351
+
by setting <codeclass="docutils literal"><spanclass="pre">ALLOWED_KEYCLOAK_ROLES</span></code> when using Keycloak OAuth2</p>
297
352
<p>For those situations where it is not possible to group users in this
298
353
way it is possible to selectively allow access on a per-user basis. How
299
-
this is done depends on whether you are using Google, GitHubor GitLab
354
+
this is done depends on whether you are using Google, GitHub, GitLab or Keycloak
0 commit comments