|
26 | 26 | import org.elasticsearch.client.Client;
|
27 | 27 | import org.elasticsearch.common.Nullable;
|
28 | 28 | import org.elasticsearch.common.bytes.BytesReference;
|
29 |
| -import org.elasticsearch.common.settings.Setting; |
30 |
| -import org.elasticsearch.common.settings.Setting.Property; |
31 | 29 | import org.elasticsearch.common.settings.Settings;
|
32 |
| -import org.elasticsearch.common.unit.TimeValue; |
33 | 30 | import org.elasticsearch.common.util.concurrent.ThreadContext;
|
34 | 31 | import org.elasticsearch.common.xcontent.ToXContent;
|
35 | 32 | import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
69 | 66 | import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN;
|
70 | 67 | import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
71 | 68 | import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin;
|
72 |
| -import static org.elasticsearch.xpack.core.security.SecurityField.setting; |
73 | 69 | import static org.elasticsearch.xpack.core.security.authz.RoleDescriptor.ROLE_TYPE;
|
74 | 70 | import static org.elasticsearch.xpack.security.support.SecurityIndexManager.SECURITY_INDEX_NAME;
|
75 | 71 |
|
|
83 | 79 | */
|
84 | 80 | public class NativeRolesStore implements BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>> {
|
85 | 81 |
|
86 |
| - // these are no longer used, but leave them around for users upgrading |
87 |
| - private static final Setting<Integer> CACHE_SIZE_SETTING = |
88 |
| - Setting.intSetting(setting("authz.store.roles.index.cache.max_size"), 10000, Property.NodeScope, Property.Deprecated); |
89 |
| - private static final Setting<TimeValue> CACHE_TTL_SETTING = Setting.timeSetting(setting("authz.store.roles.index.cache.ttl"), |
90 |
| - TimeValue.timeValueMinutes(20), Property.NodeScope, Property.Deprecated); |
91 | 82 | private static final Logger logger = LogManager.getLogger(NativeRolesStore.class);
|
92 | 83 |
|
93 | 84 | private final Settings settings;
|
@@ -413,11 +404,6 @@ static RoleDescriptor transformRole(String id, BytesReference sourceBytes, Logge
|
413 | 404 | }
|
414 | 405 | }
|
415 | 406 |
|
416 |
| - public static void addSettings(List<Setting<?>> settings) { |
417 |
| - settings.add(CACHE_SIZE_SETTING); |
418 |
| - settings.add(CACHE_TTL_SETTING); |
419 |
| - } |
420 |
| - |
421 | 407 | /**
|
422 | 408 | * Gets the document's id field for the given role name.
|
423 | 409 | */
|
|
0 commit comments