|
@@ -26,10 +26,7 @@ import org.elasticsearch.action.support.ContextPreservingActionListener;
|
|
|
import org.elasticsearch.client.Client;
|
|
|
import org.elasticsearch.common.Nullable;
|
|
|
import org.elasticsearch.common.bytes.BytesReference;
|
|
|
-import org.elasticsearch.common.settings.Setting;
|
|
|
-import org.elasticsearch.common.settings.Setting.Property;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
|
-import org.elasticsearch.common.unit.TimeValue;
|
|
|
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
|
|
import org.elasticsearch.common.xcontent.ToXContent;
|
|
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
@@ -69,7 +66,6 @@ import static org.elasticsearch.search.SearchService.DEFAULT_KEEPALIVE_SETTING;
|
|
|
import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN;
|
|
|
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
|
|
import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin;
|
|
|
-import static org.elasticsearch.xpack.core.security.SecurityField.setting;
|
|
|
import static org.elasticsearch.xpack.core.security.authz.RoleDescriptor.ROLE_TYPE;
|
|
|
import static org.elasticsearch.xpack.security.support.SecurityIndexManager.SECURITY_INDEX_NAME;
|
|
|
|
|
@@ -83,11 +79,6 @@ import static org.elasticsearch.xpack.security.support.SecurityIndexManager.SECU
|
|
|
*/
|
|
|
public class NativeRolesStore implements BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>> {
|
|
|
|
|
|
- // these are no longer used, but leave them around for users upgrading
|
|
|
- private static final Setting<Integer> CACHE_SIZE_SETTING =
|
|
|
- Setting.intSetting(setting("authz.store.roles.index.cache.max_size"), 10000, Property.NodeScope, Property.Deprecated);
|
|
|
- private static final Setting<TimeValue> CACHE_TTL_SETTING = Setting.timeSetting(setting("authz.store.roles.index.cache.ttl"),
|
|
|
- TimeValue.timeValueMinutes(20), Property.NodeScope, Property.Deprecated);
|
|
|
private static final Logger logger = LogManager.getLogger(NativeRolesStore.class);
|
|
|
|
|
|
private final Settings settings;
|
|
@@ -413,11 +404,6 @@ public class NativeRolesStore implements BiConsumer<Set<String>, ActionListener<
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void addSettings(List<Setting<?>> settings) {
|
|
|
- settings.add(CACHE_SIZE_SETTING);
|
|
|
- settings.add(CACHE_TTL_SETTING);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Gets the document's id field for the given role name.
|
|
|
*/
|