# Question about basic setup

**URL:** <https://forum.search-guard.com/t/question-about-basic-setup/53>\
**Category:** Search Guard\
**Created:** [June 23, 2015, 9:07pm UTC](https://forum.search-guard.com/t/question-about-basic-setup/53 "2015-06-23T21:07:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Miranda](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Nathan\_Miranda](https://forum.search-guard.com/u/Nathan_Miranda)\
**Post date:** [June 23, 2015, 9:07pm UTC](https://forum.search-guard.com/t/question-about-basic-setup/53/1 "2015-06-23T21:07:39Z")

</div>

I’ve used the sample config from the readme,

> **···**
>
> #####################################################
> 
> # Settings based authorization (define users and their roles directly here in the settings. Note: this is per node)
> 
> searchguard.authentication.authorization.settingsdb.roles.spock: [“kolinahr”,“starfleet”,“command”]
> 
> searchguard.authentication.authorization.settingsdb.roles.admin: [“root”]
> 
> searchguard.authentication.authorization.settingsdb.roles.michaeljackson: [“kingofpop”,“superstar”]
> 
> #####################################################
> 
> #############################################################################################
> 
> #Below here you configure what authenticated and authorized users are allowed to do (or not)#
> 
> #This maps to the acl defined in the searchguard configuration index #
> 
> #############################################################################################
> 
> # Configure the actionrequestfilter to allow or forbid action
> 
> searchguard.actionrequestfilter.names: [“readonly”]
> 
> searchguard.actionrequestfilter.readonly.allowed\_actions: [“indices:data/read/\*”, “_monitor_”]
> 
> searchguard.actionrequestfilter.readonly.forbidden\_actions: [“cluster:_", "indices:admin_”]
> 
> ``
> 
> and I’ve added the user roles in the sample acl under the searchguard index
> 
> curl -XPUT ‘[http://localhost:9200/searchguard/ac/ac?pretty](http://localhost:9200/searchguard/ac/ac?pretty)’ -d ’
> 
> {“acl”: [  
> {  
> “ **Comment** ”: “Default is to execute all filters”,  
> “filters\_bypass”: ,  
> “filters\_execute”: [“_“]  
> },  
> {  
> “ **Comment** ”: “Any authenticated user do anything on the ‘public’ index - no filter will be executed”,  
> “indices”: [“public”],  
> “filters\_bypass”: [”_”],  
> “filters\_execute”:   
> },  
> {  
> “ **Comment** ”: “This means any user with the role starfleet or command can do anything with the starfleetinfos index”,  
> “roles” : [“starfleet”, “command”],  
> “indices”: [“starfleetinfos”],  
> “filters\_bypass”: [“_“],  
> “filters\_execute”: []  
> },  
> {  
> “ **Comment** ”: “This means that every requestor (regardless of the requestors hostname and username) which has the root role can do anything”,  
> “roles”: [  
> “root”  
> ],  
> “filters\_bypass”: [”_”],  
> “filters\_execute”:   
> },  
> {  
> “ **Comment** ”: “This means that the user michaeljackson can do anything on index popstuff.”,  
> “users”: [“michaeljackson”],  
> “indices”: [“popstuff”],  
> “filters\_bypass”: [“\*”],  
> “filters\_execute”:   
> },  
> {  
> “ **Comment** ”: “This means that for the user spock on index popstuff only the actionrequestfilter.readonly will be executed, no other”,  
> “users”: [“spock”],  
> “indices”: [“popstuff”],  
> “filters\_bypass”: ,  
> “filters\_execute”: [“actionrequestfilter.readonly”]  
> }  
> ]}’
> 
> ``
> 
> I’ve also had to add  
> searchguard.check\_for\_root: false
> 
> ``
> 
> since I’m running on a Windows machine as an admin user. Now when I start up my nodes, it doesn’t seem like there’s any security in place - I can curl anything and update docs/indexes without any prompts for authentication, which is probably related to the fact that my elasticsearch.bat files keep reloading their status every second with
> 
> [com.floragunn.searchguard.service.SearchGuardConfigService] Security configuration reloaded
> 
> ``
> 
> Does anyone know what the problem might be? Thanks!

---

<div class="post-metadata">

**Author:** ![Nathan\_Miranda](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Nathan\_Miranda](https://forum.search-guard.com/u/Nathan_Miranda)\
**Post date:** [June 23, 2015, 9:19pm UTC](https://forum.search-guard.com/t/question-about-basic-setup/53/2 "2015-06-23T21:19:10Z")

</div>

It seems like there is an error here:

[2015-06-23 17:18:00,530][ERROR][com.floragunn.searchguard.service.SearchGuardCo

nfigService] [Optimize Node] Try to refresh security configuration but it failed

due to org.elasticsearch.action.NoShardAvailableActionException: [searchguard][

4] null

``

The NoShardAvailableException appears whenever I run the .bat file - even for the first time.

> **···**
>
> On Tuesday, June 23, 2015 at 5:07:39 PM UTC-4, Nathan Miranda wrote:
> 
> > I’ve used the sample config from the readme,
> 
> > #####################################################
> 
> > # Settings based authorization (define users and their roles directly here in the settings. Note: this is per node)
> 
> > searchguard.authentication.authorization.settingsdb.roles.spock: [“kolinahr”,“starfleet”,“command”]
> 
> > searchguard.authentication.authorization.settingsdb.roles.admin: [“root”]
> 
> > searchguard.authentication.authorization.settingsdb.roles.michaeljackson: [“kingofpop”,“superstar”]
> 
> > #####################################################
> 
> > 
> 
> > #############################################################################################
> 
> > #Below here you configure what authenticated and authorized users are allowed to do (or not)#
> 
> > #This maps to the acl defined in the searchguard configuration index #
> 
> > #############################################################################################
> 
> > 
> 
> > # Configure the actionrequestfilter to allow or forbid action
> 
> > searchguard.actionrequestfilter.names: [“readonly”]
> 
> > searchguard.actionrequestfilter.readonly.allowed\_actions: [“indices:data/read/\*”, “_monitor_”]
> 
> > searchguard.actionrequestfilter.readonly.forbidden\_actions: [“cluster:_", "indices:admin_”]
> 
> > ``
> 
> > 
> 
> > 
> 
> > and I’ve added the user roles in the sample acl under the searchguard index
> 
> > 
> 
> > curl -XPUT ‘[http://localhost:9200/searchguard/ac/ac?pretty](http://localhost:9200/searchguard/ac/ac?pretty)’ -d ’
> > 
> > {“acl”: [  
> > {  
> > “ **Comment** ”: “Default is to execute all filters”,  
> > “filters\_bypass”: ,  
> > “filters\_execute”: [“_“]  
> > },  
> > {  
> > “ **Comment** ”: “Any authenticated user do anything on the ‘public’ index - no filter will be executed”,  
> > “indices”: [“public”],  
> > “filters\_bypass”: [”_”],  
> > “filters\_execute”:   
> > },  
> > {  
> > “ **Comment** ”: “This means any user with the role starfleet or command can do anything with the starfleetinfos index”,  
> > “roles” : [“starfleet”, “command”],  
> > “indices”: [“starfleetinfos”],  
> > “filters\_bypass”: [“_“],  
> > “filters\_execute”: []  
> > },  
> > {  
> > “ **Comment** ”: “This means that every requestor (regardless of the requestors hostname and username) which has the root role can do anything”,  
> > “roles”: [  
> > “root”  
> > ],  
> > “filters\_bypass”: [”_”],  
> > “filters\_execute”:   
> > },  
> > {  
> > “ **Comment** ”: “This means that the user michaeljackson can do anything on index popstuff.”,  
> > “users”: [“michaeljackson”],  
> > “indices”: [“popstuff”],  
> > “filters\_bypass”: [“\*”],  
> > “filters\_execute”:   
> > },  
> > {  
> > “ **Comment** ”: “This means that for the user spock on index popstuff only the actionrequestfilter.readonly will be executed, no other”,  
> > “users”: [“spock”],  
> > “indices”: [“popstuff”],  
> > “filters\_bypass”: ,  
> > “filters\_execute”: [“actionrequestfilter.readonly”]  
> > }  
> > ]}’
> 
> > ``
> 
> > 
> 
> > 
> 
> > I’ve also had to add  
> > searchguard.check\_for\_root: false
> 
> > ``
> 
> > since I’m running on a Windows machine as an admin user. Now when I start up my nodes, it doesn’t seem like there’s any security in place - I can curl anything and update docs/indexes without any prompts for authentication, which is probably related to the fact that my elasticsearch.bat files keep reloading their status every second with
> 
> > 
> 
> > [com.floragunn.searchguard.service.SearchGuardConfigService] Security configuration reloaded
> 
> > ``
> 
> > 
> 
> > Does anyone know what the problem might be? Thanks!
> 
> >

---

<div class="post-metadata">

**Author:** ![searchguard\_google\_group](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/searchguard_google_group/32/462_2.png) [@searchguard\_google\_group](https://forum.search-guard.com/u/searchguard_google_group)\
**Post date:** [June 25, 2015, 2:15pm UTC](https://forum.search-guard.com/t/question-about-basic-setup/53/3 "2015-06-25T14:15:03Z")

</div>

does this problem still occur? cause in you other post it seems you SG up and running.

> **···**
>
> > Am 23.06.2015 um 23:19 schrieb Nathan Miranda \<nate845@gmail.com\>:
> > 
> > It seems like there is an error here:
> > 
> > [2015-06-23 17:18:00,530][ERROR][com.floragunn.searchguard.service.SearchGuardCo  
> > nfigService] [Optimize Node] Try to refresh security configuration but it failed  
> > due to org.elasticsearch.action.NoShardAvailableActionException: [searchguard][  
> > 4] null
> > 
> > The NoShardAvailableException appears whenever I run the .bat file - even for the first time.
> > 
> > On Tuesday, June 23, 2015 at 5:07:39 PM UTC-4, Nathan Miranda wrote:  
> > I've used the sample config from the readme,
> > 
> > #####################################################  
> > # Settings based authorization (define users and their roles directly here in the settings. Note: this is per node)  
> > searchguard.authentication.authorization.settingsdb.roles.spock: ["kolinahr","starfleet","command"]  
> > searchguard.authentication.authorization.settingsdb.roles.admin: ["root"]  
> > searchguard.authentication.authorization.settingsdb.roles.michaeljackson: ["kingofpop","superstar"]  
> > #####################################################
> > 
> > #############################################################################################  
> > #Below here you configure what authenticated and authorized users are allowed to do (or not)#  
> > #This maps to the acl defined in the searchguard configuration index #  
> > #############################################################################################
> > 
> > # Configure the actionrequestfilter to allow or forbid action  
> > searchguard.actionrequestfilter.names: ["readonly"]  
> > searchguard.actionrequestfilter.readonly.allowed\_actions: ["indices:data/read/\*", "\*monitor\*"]  
> > searchguard.actionrequestfilter.readonly.forbidden\_actions: ["cluster:\*", "indices:admin\*"]
> > 
> > and I've added the user roles in the sample acl under the searchguard index
> > 
> > curl -XPUT '[http://localhost:9200/searchguard/ac/ac?pretty&#39](http://localhost:9200/searchguard/ac/ac?pretty&#39); -d '
> > 
> > {"acl": [  
> > &nbsp;&nbsp;&nbsp;&nbsp;{  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\_\_Comment\_\_": "Default is to execute all filters",  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_bypass": ,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_execute": ["\*"]  
> > &nbsp;&nbsp;&nbsp;&nbsp;},  
> > &nbsp;&nbsp;&nbsp;&nbsp;{  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\_\_Comment\_\_": "Any authenticated user do anything on the 'public' index - no filter will be executed",  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"indices": ["public"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_bypass": ["\*"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_execute":   
> > &nbsp;&nbsp;&nbsp;&nbsp;},  
> > &nbsp;&nbsp;&nbsp;&nbsp;{  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\_\_Comment\_\_": "This means any user with the role starfleet or command can do anything with the starfleetinfos index",  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"roles" : ["starfleet", "command"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"indices": ["starfleetinfos"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_bypass": ["\*"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_execute":   
> > &nbsp;&nbsp;&nbsp;&nbsp;},  
> > &nbsp;&nbsp;&nbsp;&nbsp;{  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\_\_Comment\_\_": "This means that every requestor (regardless of the requestors hostname and username) which has the root role can do anything",  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"roles": [  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"root"  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_bypass": ["\*"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_execute":   
> > &nbsp;&nbsp;&nbsp;&nbsp;},  
> > &nbsp;&nbsp;&nbsp;&nbsp;{  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\_\_Comment\_\_": "This means that the user michaeljackson can do anything on index popstuff.",  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"users": ["michaeljackson"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"indices": ["popstuff"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_bypass": ["\*"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_execute":   
> > &nbsp;&nbsp;&nbsp;&nbsp;},  
> > &nbsp;&nbsp;&nbsp;&nbsp;{  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\_\_Comment\_\_": "This means that for the user spock on index popstuff only the actionrequestfilter.readonly will be executed, no other",  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"users": ["spock"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"indices": ["popstuff"],  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_bypass": ,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters\_execute": ["actionrequestfilter.readonly"]  
> > &nbsp;&nbsp;&nbsp;&nbsp;}  
> > &nbsp;&nbsp;&nbsp;&nbsp;  
> > &nbsp;&nbsp;]}'
> > 
> > I've also had to add  
> > searchguard.check\_for\_root: false
> > 
> > since I'm running on a Windows machine as an admin user. Now when I start up my nodes, it doesn't seem like there's any security in place - I can curl anything and update docs/indexes without any prompts for authentication, which is probably related to the fact that my elasticsearch.bat files keep reloading their status every second with
> > 
> > [com.floragunn.searchguard.service.SearchGuardConfigService] Security configuration reloaded
> > 
> > Does anyone know what the problem might be? Thanks!
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "Search Guard" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.  
> > To post to this group, send email to search-guard@googlegroups.com.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/search-guard/dc2dc8ee-8f33-4a10-a530-fe2a2926b452%40googlegroups.com\](https://groups.google.com/d/msgid/search-guard/dc2dc8ee-8f33-4a10-a530-fe2a2926b452%40googlegroups.com%5C).  
> > For more options, visit [https://groups.google.com/d/optout\](https://groups.google.com/d/optout%5C).
