-
Notifications
You must be signed in to change notification settings - Fork 10
Add elasticsearch_role and elasticsearch_user module #308
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
Conversation
Example usage for the elasticsearch_user module: With that module you can create, update and delete access users inside elasticsearch.
|
@widhalmt since that modules where requested from your side, could you please have a look at it? Maybe test them also. |
I have local testing environments and I will put this change through a few tests. I'm the wrong person to review the code of the module (yet) but I can do integration tests and check everything around the module. |
Genuine question: why would we need a module which calls upon a role? I have never seen this before, is this commonly done? |
Inspiration for the two modules comes from here, for example. With them you can easily create, update and delete them. Sure, you could do this in your Kibana. But we have some known customers which do this all within the collection (or want to) The whole thing has turned into a discussion of principles, as the idea of creating an internal Elastic user within the Logstash role is somewhat at odds with the idea of separating roles. However, this will be addressed later and assumed as a requirement. |
OH NOW I GET IT I misunderstood "role" as ansible-role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks amazing, but it has to be tested now, and I don't know how to withdraw approval :D
I have already implemented a workflow to test the modules. @lcndsmr I guess you can remove the change request now. I have requested Thomas for review. As long as he dont approve it, it should be finde. Auto-merging is also not enabled for this PR. @widhalmt would you please give us a last "okay it works"? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a few minor issues and had one extra question. Those aside: THANK YOU.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the initial code. And the reaction to my picky requests. Approved.
First draft for a elasticsearch_role module. With that module you can create, update and delete access roles inside elasticsearch. Uses the elasticsearch API. Example Usage: ``` - name: Create role netways.elasticstack.elasticsearch_role: name: new-role cluster: - manage_own_api_key - delegate_pki indicies: - names: - foobar321 - barfoo123 privileges: - read - write state: present host: https://localhost:9200 auth_user: elastic auth_pass: changeMe123! verify_certs: false ca_certs: /etc/elasticsearch/certs/http_ca.crt ```
First draft for a elasticsearch_role module.
With that module you can create, update and delete access roles inside elasticsearch.
Uses the elasticsearch API.
Example Usage: