diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java index 21ec26908d7a6..b3e8491468da9 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java @@ -363,12 +363,16 @@ private static void reportStats(ActionListener> listener, Li } public void onSecurityIndexStateChange(SecurityIndexManager.State previousState, SecurityIndexManager.State currentState) { - // TODO figure out correct cache behavior here -- does anything need to happen? if (isMoveFromRedToNonRed(previousState, currentState) || isIndexDeleted(previousState, currentState) || Objects.equals(previousState.indexUUID, currentState.indexUUID) == false || previousState.isIndexUpToDate != currentState.isIndexUpToDate) { refreshRealms(ActionListener.noop(), null); + // TODO is this what we want? + if (cache != null) { + // re-load cache, yikes... + getMappings(ActionListener.noop()); + } } }