-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES X-Pack Security: Bootstraping graylog as unprivileged user fails. Operation as unprivileged user is fine. #6212
Comments
@jpengenheiro I am very interested in how your configuration now looks like... Whenever I enable x-pack I always end up in your first scenario (fails to create templates and indices, which is actually auto created by ES). To reduce the problem as much as possible I have disabled almost all x-pack features. When I disable it entirely, there are no problems ( I only have Http ssl is still disabled At the time of writing I was using: And to avoid the To me this issue seems similar, but I can also create a new one if needed. |
After some poking around I got to the point that I would initialize the So the workaround I found to be working:
Followed by a initialization of the first alias:
|
according to this community posting it is working with Elasticsearch 6.7.x |
This workaround is great! Thanks for sharing until a fix is out. |
@jdekoning I have since moved on to other projects and so I probably won't be pursuing this issue anymore, still if you require any information from me please feel free to ask Your troubleshooting appears to confirm what I already suspected, the problem arises when graylog attempts to create the templates and first index, I remember I could not see any templates being created if I bootstrapped the cluster with an unpriviliged user. Yours is a better workaround since it does not require knowledge of the elasticsearch's super user's credentials. |
@jdekoning Thank you for the workaround. |
At least part of this issue can be attribute to the behaviour change I described in issue elasticsearch/56027. The gist of it is that when x-pack security is enabled /_all/_alias returns a 404, while returning a 200 with an empty JSON object with x-pack disabled. This throws a wrench into the lookup for the deflectors. Sidenote: /_alias, which is functionally the same I believe, returns a 200 in both cases. |
Same issue here. |
Same here and therefore adding my observations: We're currently setting up Graylog 3.3.8 with ES 6.8.12. We also need to make use of Elasticsearch Authentication with different users for Graylog and other applications writing directly to Elasticsearch. According to @jdekoning's solution, I experienced 2 possible workarounds (in our environment) to proceed without errors: A) Bootstrap Graylog with
B) Manually create 5 objects via Elasticsearch API, then initially starting Graylog.
For the second workaround, I initially tried to only set up the index template and the graylog_0 index (as @jdekoning did) but I still got errors in the graylog-server.log. So these are the 5 Requests I had to send in this order:
Fun Fact: There was no need to add the aliases
The Elasticsearch user graylog is receiving these permissions by role:
My xpack settings in elasticsearch.yml:
My Graylog server.conf:
|
Recently I've observed what I consider to be unexpected behaviour while bootstraping graylog as an unprivileged user.
Here is a link to the troubleshooting I already made:
Expected Behavior
Graylog should create the correct templates, indices and aliases with a user that can only access indices with a cretain prefix, this would allow for easy setup of multitenant ES clusters with several graylog clients.
Current Behavior
while bootstraping as an unprivileged user:
graylog-internal
templatedeflector
ex:graylogdev_default_deflector
.while bootstraping as privileged
elastic
user:graylog-internal
templategraylogdev_default_0
.after bootstraping I can switch to an unprivileged user:
graylogdev_new_0
.Possible Solution
It would be nice to know exactly what are the strictly required privileges to have graylog using an ES cluster as an unprivileged user.
Steps to Reproduce (for bugs)
The troubleshooting I already made:
https://community.graylog.org/t/unusual-behaviour-while-using-elasticsearch-non-super-user/11355/1
Context
This is preventing the design of a multitenant ES cluster solution, where every user would not be able to access any index not explicitely allow by an administrator.
This was encountered when attempting to implement authentication and authorization for the ES cluster by creating a user with restricted index use permissions.
Environment
The text was updated successfully, but these errors were encountered: