<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>openid &amp;mdash; milan</title>
    <link>https://text.tchncs.de/milan/tag:openid</link>
    <description>Milans personal little blogthingie. :)</description>
    <pubDate>Fri, 17 Apr 2026 08:05:51 +0000</pubDate>
    <item>
      <title>OpenTalk Multi-Tenancy</title>
      <link>https://text.tchncs.de/milan/opentalk-multi-tenancy</link>
      <description>&lt;![CDATA[As of v0.2.0 of the OpenTalk controller, multi-tenancy is supported and enabled by default. This feature is mostly interesting for larger organizations and will become optional as of v0.3.0.&#xA;&#xA;However, if you want or must use it (as per releasetag), it will require you to alter your Keycloak setup like follows, otherwise things will not work as expected.&#xA;&#xA;Configuring Keycloak&#xA;&#xA;Create a new Client scope in your OpenTalk realm with the following parameters:&#xA;1.1 Name: tenancy&#xA;1.2 Type: default&#xA;1.3 Protocol: openid-connect&#xA;1.4 Checkboxes: all teh boxes&#xA;Navigate to the tab Mappers&#xA;2.1 Click the new mapper button -  By configuration&#xA;2.2 Choose Hardcoded claim&#xA;Fill relevant fields of the new mapper&#xA;3.1 Name: tenantid&#xA;3.2 Token Claim Name: tenantid&#xA;3.3 Claim Value: OpenTalkDefaultTenant&#xA;3.4 save&#xA;Navigate to the Clients section of your realm and select your OtFrontend.&#xA;Click Add client scope and select the newly added tenancy scope as Default.&#xA;&#xA;The new ID should have been added by default in the backend. You can verify this with the k3k-controller tenants command: docker exec -it 123abcde /controller/k3k-controller tenants list.  &#xA;It should return something like:&#xA;&#xA; id                                   | oidcid&#xA;--------------------------------------+-----------------------&#xA; c9677f8c-1234-1234-1234-12348b5b4bfd | OpenTalkDefaultTenant&#xA;This command can also set a new id using set-oidc-id, but this would bring the users assigned tenandid out of sync if it already exists. Make sure that the id equals the result of select tenant_id from users; in the database k3k.&#xA;&#xA;small#opentalk #keycloak #openid/small&#xA;&#xA;Signature (thanks for reading):  &#xD;&#xA;Follow me on Mastdodon]]&gt;</description>
      <content:encoded><![CDATA[<p>As of v0.2.0 of the <a href="https://opentalk.eu" rel="nofollow">OpenTalk</a> controller, multi-tenancy is supported and enabled by default. This feature is mostly interesting for larger organizations and will become optional as of v0.3.0.</p>

<p>However, if you want or must use it (as per releasetag), it will require you to alter your Keycloak setup like follows, otherwise things will not work as expected.</p>

<h2 id="configuring-keycloak">Configuring Keycloak</h2>
<ol><li>Create a new <code>Client scope</code> in your OpenTalk realm with the following parameters:
1.1 <strong>Name:</strong> <code>tenancy</code>
1.2 <strong>Type:</strong> <code>default</code>
1.3 <strong>Protocol:</strong> <code>openid-connect</code>
1.4 <strong>Checkboxes:</strong> all teh boxes</li>
<li>Navigate to the tab <code>Mappers</code>
2.1 Click the <code>new mapper</code> button –&gt; <code>By configuration</code>
2.2 Choose <code>Hardcoded claim</code></li>
<li>Fill relevant fields of the new mapper
3.1 <strong>Name:</strong> <code>tenant_id</code>
3.2 <strong>Token Claim Name:</strong> <code>tenant_id</code>
3.3 <strong>Claim Value:</strong> <code>OpenTalkDefaultTenant</code>
3.4 save</li>
<li>Navigate to the <code>Clients</code> section of your realm and select your <code>OtFrontend</code>.</li>
<li>Click <code>Add client scope</code> and select the newly added <code>tenancy</code> scope as <code>Default</code>.</li></ol>

<p>The new ID should have been added by default in the backend. You can verify this with the <code>k3k-controller tenants</code> command: <code>docker exec -it 123abcde /controller/k3k-controller tenants list</code>.<br>
It should return something like:</p>

<pre><code> id                                   | oidc_id
--------------------------------------+-----------------------
 c9677f8c-1234-1234-1234-12348b5b4bfd | OpenTalkDefaultTenant
</code></pre>

<p>This command can also set a new id using <code>set-oidc-id</code>, but this would bring the users assigned <code>tenand_id</code> out of sync if it already exists. Make sure that the <code>id</code> equals the result of <code>select tenant_id from users;</code> in the database <code>k3k</code>.</p>

<p><small><a href="/milan/tag:opentalk" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">opentalk</span></a> <a href="/milan/tag:keycloak" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">keycloak</span></a> <a href="/milan/tag:openid" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">openid</span></a></small></p>

<p><strong>Signature (thanks for reading):</strong><br>
<a href="https://social.tchncs.de/@milan" rel="nofollow"><em>Follow me on Mastdodon</em></a></p>
]]></content:encoded>
      <guid>https://text.tchncs.de/milan/opentalk-multi-tenancy</guid>
      <pubDate>Wed, 05 Apr 2023 17:08:47 +0000</pubDate>
    </item>
  </channel>
</rss>