<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I've created JIRA
<a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/KEYCLOAK-1789">https://issues.jboss.org/browse/KEYCLOAK-1789</a> and have a fix,
which will be available for 1.5.0 version. As a workaround, you
can add ids to the realms in JSON file. In that case, it will
import both realms. Like this:<br>
<br>
<p class="MsoNormal"><span style="color:#1F497D">[ {<br>
"id" : "Test1",</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> "realm" :
"Test1",</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> -----</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">}, {<br>
"id": "Test2",</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> "realm" :
"Test2",</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> -----</span><o:p></o:p></p>
<span style="color:#1F497D">}]</span><br>
<br>
Marek<br>
<br>
On 01/09/15 10:23, Nangunoori, Srinivas wrote:<br>
</div>
<blockquote
cite="mid:8FD052C8E2EC9B40B07B148AF2E1E77A39EDFFA9@G9W0758.americas.hpqcorp.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \,serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Quick Update:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I just updated
with latest master (Today’s code base). Still I am seeing
the same issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Srini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Nangunoori, Srinivas
<br>
<b>Sent:</b> Tuesday, September 01, 2015 1:33 PM<br>
<b>To:</b> 'Marek Posolda';
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<b>Subject:</b> RE: [keycloak-user] Query regarding
import multiple realms through single json file<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for the
quick reply.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I am using
1.5.0 with August 7<sup>th</sup> code base.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Please find
attached json file which I am using for import realms.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Srini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Marek Posolda [<a
moz-do-not-send="true"
href="mailto:mposolda@redhat.com"><a class="moz-txt-link-freetext" href="mailto:mposolda@redhat.com">mailto:mposolda@redhat.com</a></a>]
<br>
<b>Sent:</b> Tuesday, September 01, 2015 1:19 PM<br>
<b>To:</b> Nangunoori, Srinivas; <a
moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org"><a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a></a><br>
<b>Subject:</b> Re: [keycloak-user] Query regarding
import multiple realms through single json file<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Could you send me the JSON with your rep?
I will try in my environment. Btv. which keycloak version
are you using?<br>
<br>
Thanks,<br>
Marek<br>
<br>
On 01/09/15 09:37, Nangunoori, Srinivas wrote:<span
style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">There are no
errors in server logs,
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">07:32:58,073
INFO
[org.keycloak.exportimport.singlefile.SingleFileImportProvider]
(ServerService Thread Pool -- 62) Full importing from file
/opt/jboss/keycloak/paas.json</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">07:33:01,517
INFO [org.keycloak.exportimport.util.ImportUtils]
(ServerService Thread Pool -- 62) Realm 'Test2' imported</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">07:33:01,531
INFO [org.keycloak.exportimport.ExportImportManager]
(ServerService Thread Pool -- 62) Import finished
successfully</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Test2 is last
realm entry in my paas.json file. Here Test1 was not
imported.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">JSON has
following entries.,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">[ {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> "realm" :
"Test1",</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> -----</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">}, {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> "realm" :
"Test2",</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> -----</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">}]</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">-Srini</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Marek Posolda [<a
moz-do-not-send="true"
href="mailto:mposolda@redhat.com"><a class="moz-txt-link-freetext" href="mailto:mposolda@redhat.com">mailto:mposolda@redhat.com</a></a>]
<br>
<b>Sent:</b> Monday, August 31, 2015 8:30 PM<br>
<b>To:</b> Nangunoori, Srinivas; <a
moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org"><a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a></a><br>
<b>Subject:</b> Re: [keycloak-user] Query regarding
import multiple realms through single json file</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">Is there something in server log when
you start the server? Especially look at logged lines from
"ExportImportManager" and "ImportUtils" categories.<br>
<br>
Could you also try to use absolute path for the file (just
for sure?). You used "paas.json", but later you mentioned
"pass.json", but I believe this is just typo in email
rather than bad file path?<br>
<br>
Marek<br>
<br>
On 31/08/15 15:16, Nangunoori, Srinivas wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Experts,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am trying to import multiple relams
info through single json file using following command,
here pass.json has multiple realm info. But, only last
realm is getting imported in keycloak<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:13.5pt;font-family:"Courier
New"">bin/standalone.sh -c standalone-ha.xml
-b=<server name> -bmanagement=<server name>
-Djboss.node.name=<server name>
-Dkeycloak.migration.action=import
-Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=paas.json</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:13.5pt;font-family:"Courier
New""> </span><o:p></o:p></p>
<p class="MsoNormal">Here pass.json has multiple realm info.
But, only last realm is getting imported in keycloak.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">JSON has info.,<o:p></o:p></p>
<p class="MsoNormal">[<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> "realm" : "Test1",<o:p></o:p></p>
<p class="MsoNormal"> -----<o:p></o:p></p>
<p class="MsoNormal">},<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> "realm" : "Test2",<o:p></o:p></p>
<p class="MsoNormal"> -----<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">]<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">In this case, always “Test2” is getting
imported not the “Test1”.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Srini<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt;font-family:"Times New
Roman ,serif",serif"><br>
<br>
<br>
</span><o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>keycloak-user mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New Roman
,serif",serif"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>