# Sample custom plugin fails to recognize "custom" type during load

**URL:** <https://discuss.elastic.co/t/sample-custom-plugin-fails-to-recognize-custom-type-during-load/40660>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [February 1, 2016, 7:31pm UTC](https://discuss.elastic.co/t/sample-custom-plugin-fails-to-recognize-custom-type-during-load/40660 "2016-02-01T19:31:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrodrigo](https://avatars.discourse-cdn.com/v4/letter/v/59ef9b/32.png) [@vrodrigo](https://discuss.elastic.co/u/vrodrigo)\
**Post date:** [February 1, 2016, 7:31pm UTC](https://discuss.elastic.co/t/sample-custom-plugin-fails-to-recognize-custom-type-during-load/40660/1 "2016-02-01T19:31:20Z")

</div>

Hello,  
We are trying to implement shield to authenticate user access to elastic. Since the currently supported realms require user/pwd to be passed in the header and we dont have access to the logged in users pwd, we are going the route of using a custom plugin to authenticate the user given an access token.  
I have downloaded the custom plugin sample, compiled and installed on my local cluster. But when i start up elastic I get the following error  
Exception in thread "main" java.lang.IllegalArgumentException: unknown realm type [custom] set for realm [custom]

I currently have the following plugins - head, license, mapper-size, shield and another custom plugin for scan&scroll  
The plugin itself loaded successfully on start up.

Also do I need to include the shield jar in the plugin folder?

Any help is appreciated..

Thanks  
Vinod

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [February 1, 2016, 7:55pm UTC](https://discuss.elastic.co/t/sample-custom-plugin-fails-to-recognize-custom-type-during-load/40660/2 "2016-02-01T19:55:12Z")

</div>

Hi Vinod,

I apologize, it looks like we did not update the versions in the pom.xml to the latest released version(s). I just created a tag for 2.1.1, [GitHub - elastic/shield-custom-realm-example at v2.1.1](https://github.com/elastic/shield-custom-realm-example/tree/v2.1.1)

Can you check out that tag, build, and try installing it? One of the tests that runs with `mvn verify` is actually building the plugin zip, downloading the matching version of elasticsearch, shield, and licensing and then installing all of the plugins and running a test to validate the plugin works.

I did not have any issues with this test, so I believe that the plugin is working as expected. Let me know how working with the 2.1.1 tag goes.

> [@vrodrigo](#):
>
> Also do I need to include the shield jar in the plugin folder?

No you should not add the shield jar to the custom realm plugin folder.

-Jay

---

<div class="post-metadata">

**Author:** ![vrodrigo](https://avatars.discourse-cdn.com/v4/letter/v/59ef9b/32.png) [@vrodrigo](https://discuss.elastic.co/u/vrodrigo)\
**Post date:** [February 1, 2016, 11:19pm UTC](https://discuss.elastic.co/t/sample-custom-plugin-fails-to-recognize-custom-type-during-load/40660/3 "2016-02-01T23:19:36Z")

</div>

Hey Jay,  
Thanks for your reply, I did download the latest and I was able to get the custom plugin working. The Isolated property in the descriptor.properties table had true, which was why I had to add the shield jar to the folder. Once I set it to false, i was able to take it out and run successfully.

Vinod

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:47pm UTC](https://discuss.elastic.co/t/sample-custom-plugin-fails-to-recognize-custom-type-during-load/40660/4 "2017-07-06T13:47:02Z")

</div>


