fabric8io / openshift-elasticsearch-plugin

Apache License 2.0
27 stars 21 forks source link

impl single SG index #134

Closed jcantrill closed 6 years ago

jcantrill commented 6 years ago

This PR modifies ACL generation:

This is the 5.x release of #123

fusesource-ci commented 6 years ago

Tests failed.

jcantrill commented 6 years ago

cc @t0ffel

jcantrill commented 6 years ago

cc @portante

fusesource-ci commented 6 years ago

Tests failed.

jcantrill commented 6 years ago

In response to @richm

Can you explain the strategy to ensure only 1 shared searchguard index per cluster? 
How do you ensure that updates to the index are atomic?

The algorithm is based upon the recommendations of Elastic and uses optimistic concurrency and document versioning. We load, grab version, and attempt to update which will merge our changes into the existing document and then bump the version. If this fails, it backs off, reloads, and tries again. Additionally, every X seconds we expire entries which is a full document replace since 'update' is only additive; ES makes no effort to remove sections.

Basically, each node will make a single change and continue to try to submit that changes until it is accepted. @portante and I determined removing any notion of caching was acceptable given this is only handing requests with bearer tokens which should be minimal. Conceptually there probably is a case to be made for some sort of DOS if servicing requests if their are high rates using bearer tokens.

ewolinetz commented 6 years ago

@jcantrill how do we ensure that our pre-populated ACL definitions don't expire. Is it simply because they'll have a null expires field?

jcantrill commented 6 years ago

@ewolinetz yes: https://github.com/fabric8io/openshift-elasticsearch-plugin/pull/134/files#diff-31ab0e029350fabbb48cd9560bb451f4R138

fusesource-ci commented 6 years ago

Tests failed.

fusesource-ci commented 6 years ago

License check failed: run mvn -N license:format to update all licenses, commit, squash & force push please.

fusesource-ci commented 6 years ago

Tests failed.

jcantrill commented 6 years ago

@ewolinetz @richm based on [1] and manual testing of this code with 2 ES nodes, believe the initial blockers are resolved. Thoughts on merging?

[1] https://github.com/openshift/origin-aggregated-logging/pull/1177

ewolinetz commented 6 years ago

@jcantrill can we get the license check and the test to pass?

fusesource-ci commented 6 years ago

Tests failed.

jcantrill commented 6 years ago

@ewolinetz @richm @lukas-vlcek any concerns moving forward with merging this PR

jcantrill commented 6 years ago

(3) Implement Single Searchguard Index [epic-ois-es5]

jcantrill commented 6 years ago

[merge]

fusesource-ci commented 6 years ago

Merge failed.

jcantrill commented 6 years ago

[merge]