<div dir="ltr">Sorry, I just noticed that my example was wrong...<div><br></div><div>here is what I meant:</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">|- realm</div><div style="font-family:arial,sans-serif;font-size:13px">
|  |-users</div><div style="font-family:arial,sans-serif;font-size:13px">|  |  |-realm-level-user-1</div><div style="font-family:arial,sans-serif;font-size:13px">|  |  |-...</div><div style="font-family:arial,sans-serif;font-size:13px">
|  |-tenants</div><div style="font-family:arial,sans-serif;font-size:13px">|  |  |-tenant-1</div><div style="font-family:arial,sans-serif;font-size:13px">|  |  |  |-users</div><div style="font-family:arial,sans-serif;font-size:13px">
|  |  |  |  |-tenant-level-user-1</div><div style="font-family:arial,sans-serif;font-size:13px">|  |  |  |  |-...</div></div><div><br></div><div>However, nested realms would be an alternative I guess.</div><div><br></div>
<div>Cheers,</div><div>Nils</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 30, 2014 at 8:12 PM, Nils Preusker <span dir="ltr">&lt;<a href="mailto:n.preusker@gmail.com" target="_blank">n.preusker@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Bill,<div><br></div><div>I guess you are right, there isn&#39;t really a difference. It would just be important to be able to add realms at runtime. Are you suggesting to have nested realms (just replacing tenant with realm in my previous example)?</div>

<div><br></div><div>Does that make more sense?</div><div>Cheers,</div><div>Nils</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 30, 2014 at 6:05 PM, Bill Burke <span dir="ltr">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don&#39;t what the different between a tenant and a realm would be in your<br>
example.<br>
<div><br>
On 5/30/2014 5:28 AM, Nils Preusker wrote:<br>
&gt; Hi Bill,<br>
&gt;<br>
&gt; what I was thinking of was tenants as nested element within a realm.<br>
&gt;<br>
&gt; We&#39;d like to be able to add tenants at runtime. That&#39;s where I see a<br>
&gt; problem with multi-realm support, since realms are &quot;hardcoded&quot; in the<br>
&gt; keycloak.json. So if you add a realm in the admin-console, with<br>
&gt; multi-realm support you&#39;d still have to modify the deployed WAR by<br>
&gt; adding the new realm to the keycloak.json file.<br>
&gt;<br>
&gt; I was thinking of a structure like this:<br>
&gt;<br>
&gt; |- realm<br>
&gt; |  |-users<br>
&gt; |     |-realm-level-user-1<br>
&gt; |     |-...<br>
&gt; |-tenants<br>
&gt; |  |-tenant-1<br>
&gt; |  |  |-users<br>
&gt; |  |  |  |-tenant-level-user-1<br>
&gt; |  |  |  |-...<br>
&gt;<br>
&gt; Let me know what you think!<br>
&gt; Cheers,<br>
&gt; Nils<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, May 29, 2014 at 11:04 PM, Bill Burke &lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a><br>
</div><div><div>&gt; &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Somebody else was asking for this feature.  We may have to add it beta 2<br>
&gt;     even though I wanted to have a feature freeze.<br>
&gt;<br>
&gt;     How did you expect it to work?  One guy wanted to discover realm per<br>
&gt;     request via parsing the URL.  Another guy just wanted multi-realm<br>
&gt;     support for bearer-only services.<br>
&gt;<br>
&gt;<br>
&gt;     On 5/29/2014 4:54 PM, Nils Preusker wrote:<br>
&gt;      &gt; Hi,<br>
&gt;      &gt;<br>
&gt;      &gt; first of all, congrats on the beta 1 release!<br>
&gt;      &gt;<br>
&gt;      &gt; Here&#39;s my question: I have a WAR with a REST API that I&#39;m<br>
&gt;     securing with<br>
&gt;      &gt; Keycloak. Now I&#39;d like to add multitenancy support.<br>
&gt;      &gt;<br>
&gt;      &gt; If I understand the concept in keycloak correctly, I would<br>
&gt;     somehow have<br>
&gt;      &gt; to have several realms in the keycloak.json and the web.xml of<br>
&gt;     the war,<br>
&gt;      &gt; right? However there is just one realm-name attribute in the<br>
&gt;     web.xml and<br>
&gt;      &gt; the structure of keycloak.json also looks like it is intended for one<br>
&gt;      &gt; realm. Am I missing something?<br>
&gt;      &gt;<br>
&gt;      &gt; Cheers,<br>
&gt;      &gt; Nils<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt; _______________________________________________<br>
&gt;      &gt; keycloak-user mailing list<br>
</div></div>&gt;      &gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>&gt;<br>

<div>&gt;      &gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt;      &gt;<br>
&gt;<br>
&gt;     --<br>
&gt;     Bill Burke<br>
&gt;     JBoss, a division of Red Hat<br>
&gt;     <a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
&gt;     _______________________________________________<br>
&gt;     keycloak-user mailing list<br>
</div>&gt;     <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>&gt;<br>

&gt;     <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<div><div>&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt;<br>
<br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>