<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcGIS Server 10.2.1 Custom Identity Store completely broken in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-2-1-custom-identity-store/m-p/753452#M28595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok esri, this is really odd, since 10.1 my custom identity store written in Java was working fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's really simple, only a connector to our custom users/roles that are store in sql server with a custom schema.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then comes 10.2.1, and now it's impossible to set a new security store, the admin interface just give me: '500 Servlet execution threw an exception'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nothing more, it's impossible to find out what the real problem is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fun story: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another fun fact, the guide at: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//01540000058z000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//01540000058z000000&lt;/A&gt;&lt;SPAN&gt; says that you have to implement 2 interfaces, UserStore and RoleStore, easy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done 2 separated classes one implements UserStore and the other implements RoleStore...but at ESRI someone hates me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After you have copied the jar on the arcgis server, the admin interface thrown me another error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;com.foo.bar.MyUserStore does not implement UserStore&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What? Turns out that the problem is...inside the arcgis-admin.jar&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, because after a quick decompile I have found that, IdentityStoreFactory is used to load the UserStore, and inside this factory:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public static synchronized UserStore getUserStore(IdentityStoreConfig userStoreConfig, boolean initialize) throws Exception {&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Someone had just copied and pasted from the wrong method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
switch (0.a[localObject1.ordinal()])
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; case 1: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String str1 = userStoreConfig.getClassName();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (str1 == null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception(AgsadminLogCode.MISSING_CLASS_ATTR_IN_USER_STORE.message());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object localObject4 = Class.forName(str1).newInstance();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!(localObject4 instanceof RoleStore)) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception(AgsadminLogCode.USERSTORE_ITF_NOT_IMPL.params(new Object[] { str1 }).message());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localObject3 = (UserStore)localObject4;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shouldn't be UserStore instanceof UserStore instead of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if (!(localObject4 instanceof RoleStore)) {&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The example that comes with the arcgis server works...because there's only one class that implements these 2 interfaces.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:58:40 GMT</pubDate>
    <dc:creator>LucaSimone</dc:creator>
    <dc:date>2021-12-12T07:58:40Z</dc:date>
    <item>
      <title>ArcGIS Server 10.2.1 Custom Identity Store completely broken</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-2-1-custom-identity-store/m-p/753452#M28595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok esri, this is really odd, since 10.1 my custom identity store written in Java was working fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's really simple, only a connector to our custom users/roles that are store in sql server with a custom schema.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then comes 10.2.1, and now it's impossible to set a new security store, the admin interface just give me: '500 Servlet execution threw an exception'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nothing more, it's impossible to find out what the real problem is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fun story: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another fun fact, the guide at: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//01540000058z000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//01540000058z000000&lt;/A&gt;&lt;SPAN&gt; says that you have to implement 2 interfaces, UserStore and RoleStore, easy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done 2 separated classes one implements UserStore and the other implements RoleStore...but at ESRI someone hates me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After you have copied the jar on the arcgis server, the admin interface thrown me another error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;com.foo.bar.MyUserStore does not implement UserStore&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What? Turns out that the problem is...inside the arcgis-admin.jar&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, because after a quick decompile I have found that, IdentityStoreFactory is used to load the UserStore, and inside this factory:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public static synchronized UserStore getUserStore(IdentityStoreConfig userStoreConfig, boolean initialize) throws Exception {&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Someone had just copied and pasted from the wrong method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
switch (0.a[localObject1.ordinal()])
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; case 1: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String str1 = userStoreConfig.getClassName();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (str1 == null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception(AgsadminLogCode.MISSING_CLASS_ATTR_IN_USER_STORE.message());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object localObject4 = Class.forName(str1).newInstance();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!(localObject4 instanceof RoleStore)) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception(AgsadminLogCode.USERSTORE_ITF_NOT_IMPL.params(new Object[] { str1 }).message());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localObject3 = (UserStore)localObject4;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shouldn't be UserStore instanceof UserStore instead of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if (!(localObject4 instanceof RoleStore)) {&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The example that comes with the arcgis server works...because there's only one class that implements these 2 interfaces.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-2-1-custom-identity-store/m-p/753452#M28595</guid>
      <dc:creator>LucaSimone</dc:creator>
      <dc:date>2021-12-12T07:58:40Z</dc:date>
    </item>
  </channel>
</rss>

