sgadmin api

17 views
Skip to first unread message

Sundeep

unread,
Dec 17, 2018, 8:39:16 PM12/17/18
to Search Guard Community Forum
When asking questions, please provide the following information:

* Search Guard and Elasticsearch version
* Installed and used enterprise modules, if any
* JVM version and operating system version
* Search Guard configuration files
* Elasticsearch log messages on debug level
* Other installed Elasticsearch or Kibana plugins, if any

Search Guard: 6.2.3-23
Elastic: 6.2.3
Java: 1.8.0

Hi there,

We want to deploy search guard without the need to run sgadmin and wanted to see if someone can help me out here? 

-Is there a API endpoint which replicates running sgadmin command line to load/reload configuration? 
-Is it possible to load the configuration from disk on startup without the use of sgadmin? 


Thanks
Sundeep

 

SG

unread,
Dec 18, 2018, 6:45:29 AM12/18/18
to search...@googlegroups.com
Yes, there is the REST API (commercial feature), see https://docs.search-guard.com/latest/rest-api-access-control

And yes, you can also load the config from disk on startup (searchguard.allow_default_init_sgindex: true),
see https://docs.search-guard.com/latest/demo-installer-generated-artefacts#allow-demo-certificates-and-auto-initialization
> --
> You received this message because you are subscribed to the Google Groups "Search Guard Community Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to search-guard...@googlegroups.com.
> To post to this group, send email to search...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/6f4011c5-0424-4b1f-b66e-82f3f3f1e4f9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sundeep

unread,
Dec 18, 2018, 4:00:06 PM12/18/18
to Search Guard Community Forum
Thanks for the response, does "searchguard.allow_default_init_sgindex: true" work for the case of reloading or just one time initialization ? 

During "searchguard.allow_default_init_sgindex"  how can I specify a different directory to load the config from, looks like it picks from `<Elasticsearch directory>/plugins/search-guard-6/sgconfig ` 
wanted to know if there is a way to change it, like some ENV variable.
 
Thanks

Sundeep

unread,
Dec 18, 2018, 4:29:49 PM12/18/18
to Search Guard Community Forum
Looks like "allow_default_init_sgindex" works if the index does not exist and it does not work for the reload. Is there a way to achieve this on elasticsearch startup without using sgadmin command.  

SG

unread,
Dec 19, 2018, 1:48:58 AM12/19/18
to search...@googlegroups.com
allow_default_init_sgindex works only on startup and if no searchguard index exists. For security reasons a reload on startup/filechange or loading from another directory is not supported.
You need to script this or implement it on your own.
> To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/c5330066-17c3-4201-bab3-e043d6ce7788%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages