Update version for signing scrolls after backport
This commit updates the version in security that we use to check a version that needs a signed scroll id. After backporting we can talk to 5.5 without signing. Relates elastic/x-pack-elasticsearch#1416 Original commit: elastic/x-pack-elasticsearch@8653fce1e5
This commit is contained in:
parent
e5ee80c292
commit
48c34ec8ac
|
@ -206,9 +206,9 @@ public class SecurityActionFilter extends AbstractComponent implements ActionFil
|
||||||
// have been upgraded to a version that does not sign scroll ids and instead relies improved scroll
|
// have been upgraded to a version that does not sign scroll ids and instead relies improved scroll
|
||||||
// authorization. It is important to note that older versions do not actually sign if the system key
|
// authorization. It is important to note that older versions do not actually sign if the system key
|
||||||
// does not exist so we need to take that into account as well.
|
// does not exist so we need to take that into account as well.
|
||||||
// TODO update to 5.5 on backport and remove any signing from master!
|
// TODO Remove any signing from master!
|
||||||
final ClusterState state = clusterService.state();
|
final ClusterState state = clusterService.state();
|
||||||
final boolean signingRequired = state.nodes().getMinNodeVersion().before(Version.V_6_0_0_alpha2) &&
|
final boolean signingRequired = state.nodes().getMinNodeVersion().before(Version.V_5_5_0) &&
|
||||||
cryptoService.isSystemKeyPresent();
|
cryptoService.isSystemKeyPresent();
|
||||||
if (request instanceof SearchScrollRequest) {
|
if (request instanceof SearchScrollRequest) {
|
||||||
SearchScrollRequest scrollRequest = (SearchScrollRequest) request;
|
SearchScrollRequest scrollRequest = (SearchScrollRequest) request;
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class SecurityActionFilterTests extends ESTestCase {
|
||||||
.add(new DiscoveryNode("id1",
|
.add(new DiscoveryNode("id1",
|
||||||
new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)), Version.CURRENT))
|
new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)), Version.CURRENT))
|
||||||
.add(new DiscoveryNode("id2",
|
.add(new DiscoveryNode("id2",
|
||||||
new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)), Version.V_5_5_0))
|
new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)), Version.V_5_4_0))
|
||||||
.build();
|
.build();
|
||||||
when(state.nodes()).thenReturn(nodes);
|
when(state.nodes()).thenReturn(nodes);
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ public class SecurityActionFilterTests extends ESTestCase {
|
||||||
.add(new DiscoveryNode("id1", new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)),
|
.add(new DiscoveryNode("id1", new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)),
|
||||||
Version.V_6_0_0_alpha2))
|
Version.V_6_0_0_alpha2))
|
||||||
.add(new DiscoveryNode("id2", new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)),
|
.add(new DiscoveryNode("id2", new TransportAddress(TransportAddress.META_ADDRESS, randomIntBetween(49000, 65500)),
|
||||||
Version.V_6_0_0_alpha2))
|
Version.V_5_5_0))
|
||||||
.build();
|
.build();
|
||||||
when(clusterService.state().nodes()).thenReturn(nodes);
|
when(clusterService.state().nodes()).thenReturn(nodes);
|
||||||
SearchScrollRequest request = new SearchScrollRequest("unsigned");
|
SearchScrollRequest request = new SearchScrollRequest("unsigned");
|
||||||
|
|
Loading…
Reference in New Issue