I'm creating a small web application to make the lives of some ElasticSearch admins easier in ES 5.x. I'm familiar with Java but have never used cURL before.
The setup is a Thymeleaf website using Java and Maven.
In 5.x the roles can only be fetched from the console in kibana, which is executed with the curl statement curl -XGET "(url)/_xpack/security/role
, but with some username params.
I've done some research but I'm not sure if any of these solutions fit my criteria. The closest answer I found was https://stackoverflow.com/a/2587534/7137657 but the binding is in version 0.2 and with no real documentation or explanation.
The other solutions suggest using java.net.URL and java.net.URLConnection classes, but I don't see how to use those with a password and username, let alone use the kibana console once connected and return the JSON.
This is only be beginning of the process. They already have access to kibana. I want to use the JSON to let them edit the security groups in YAML after (will also be done in the web application).
Any insight is appreciated!