Skip to content

Commit 7f85017

Browse files
committed
Remove deprecated route and endpoint
Removed: - `/_opendistro` route - `/_opendistro/kibanainfo` endpoint Signed-off-by: Andrey Pleskach <[email protected]>
1 parent cac7743 commit 7f85017

File tree

59 files changed

+198
-436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+198
-436
lines changed

config/opensearch.yml.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins.security.nodes_dn:
1818

1919
# The nodes_dn_dynamic_config_enabled settings is geared towards cross_cluster usecases where there is a need to
2020
# manage the whitelisted nodes_dn without having to restart the nodes everytime a new cross_cluster remote is configured
21-
# Setting nodes_dn_dynamic_config_enabled to true enables **super-admin callable** /_opendistro/_security/api/nodesdn APIs
21+
# Setting nodes_dn_dynamic_config_enabled to true enables **super-admin callable** /_security/api/nodesdn APIs
2222
# which provide means to update/retrieve nodesdn dynamically.
2323
#
2424
# NOTE: The overall whitelisted nodes_dn evaluated comes from both the plugins.security.nodes_dn and the ones stored

src/integrationTest/java/org/opensearch/security/TlsTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class TlsTests {
5353

5454
public static final String SUPPORTED_CIPHER_SUIT = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
5555
public static final String NOT_SUPPORTED_CIPHER_SUITE = "TLS_RSA_WITH_AES_128_CBC_SHA";
56-
public static final String AUTH_INFO_ENDPOINT = "/_opendistro/_security/authinfo?pretty";
56+
public static final String AUTH_INFO_ENDPOINT = "/_plugins/_security/authinfo?pretty";
5757

5858
@ClassRule
5959
public static final LocalCluster cluster = new LocalCluster.Builder().clusterManager(ClusterManager.THREE_CLUSTER_MANAGERS)

src/integrationTest/java/org/opensearch/security/api/AbstractApiIntegrationTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import static org.hamcrest.Matchers.equalToIgnoringCase;
5656
import static org.hamcrest.Matchers.notNullValue;
5757
import static org.opensearch.security.CrossClusterSearchTests.PLUGINS_SECURITY_RESTAPI_ROLES_ENABLED;
58-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
5958
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
6059
import static org.opensearch.security.dlic.rest.api.RestApiAdminPrivilegesEvaluator.CERTS_INFO_ACTION;
6160
import static org.opensearch.security.dlic.rest.api.RestApiAdminPrivilegesEvaluator.ENDPOINTS_WITH_PERMISSIONS;
@@ -270,7 +269,7 @@ protected void withUser(
270269
}
271270

272271
protected String apiPathPrefix() {
273-
return randomFrom(List.of(LEGACY_OPENDISTRO_PREFIX, PLUGINS_PREFIX));
272+
return PLUGINS_PREFIX;
274273
}
275274

276275
protected String securityPath(String... path) {

src/integrationTest/java/org/opensearch/security/api/DashboardsInfoTest.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
1111

1212
package org.opensearch.security.api;
1313

14-
import java.util.List;
15-
1614
import org.junit.Test;
1715

1816
import org.opensearch.test.framework.TestSecurityConfig;
1917
import org.opensearch.test.framework.TestSecurityConfig.Role;
2018

2119
import static org.hamcrest.MatcherAssert.assertThat;
2220
import static org.hamcrest.Matchers.equalTo;
23-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
2421
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
2522
import static org.opensearch.security.rest.DashboardsInfoAction.DEFAULT_PASSWORD_MESSAGE;
2623
import static org.opensearch.security.rest.DashboardsInfoAction.DEFAULT_PASSWORD_REGEX;
@@ -36,7 +33,7 @@ public class DashboardsInfoTest extends AbstractApiIntegrationTest {
3633
}
3734

3835
private String apiPath() {
39-
return randomFrom(List.of(PLUGINS_PREFIX + "/dashboardsinfo", LEGACY_OPENDISTRO_PREFIX + "/kibanainfo"));
36+
return PLUGINS_PREFIX + "/dashboardsinfo";
4037
}
4138

4239
@Test

src/integrationTest/java/org/opensearch/security/api/DashboardsInfoWithSettingsTest.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
package org.opensearch.security.api;
1313

14-
import java.util.List;
1514
import java.util.Map;
1615

1716
import org.junit.Test;
@@ -22,7 +21,6 @@
2221

2322
import static org.hamcrest.MatcherAssert.assertThat;
2423
import static org.hamcrest.Matchers.equalTo;
25-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
2624
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
2725

2826
public class DashboardsInfoWithSettingsTest extends AbstractApiIntegrationTest {
@@ -49,7 +47,7 @@ protected Map<String, Object> getClusterSettings() {
4947
}
5048

5149
private String apiPath() {
52-
return randomFrom(List.of(PLUGINS_PREFIX + "/dashboardsinfo", LEGACY_OPENDISTRO_PREFIX + "/kibanainfo"));
50+
return PLUGINS_PREFIX + "/dashboardsinfo";
5351
}
5452

5553
@Test

src/integrationTest/java/org/opensearch/security/http/CommonProxyAuthenticationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
abstract class CommonProxyAuthenticationTests {
3232

33-
protected static final String RESOURCE_AUTH_INFO = "_opendistro/_security/authinfo";
33+
protected static final String RESOURCE_AUTH_INFO = "_plugins/_security/authinfo";
3434
protected static final TestSecurityConfig.User USER_ADMIN = new TestSecurityConfig.User("admin").roles(ALL_ACCESS);
3535

3636
protected static final String ATTRIBUTE_DEPARTMENT = "department";

src/integrationTest/java/org/opensearch/security/http/JwtAuthenticationWithUrlParamTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void shouldAuthenticateWithJwtTokenInUrl_positive() {
112112
Map<String, String> expectedParams = Map.of("token", "REDACTED", "verbose", "true");
113113

114114
auditLogsRule.assertExactlyOne(
115-
userAuthenticated(ADMIN_USER).withRestRequest(GET, "/_opendistro/_security/authinfo").withRestParams(expectedParams)
115+
userAuthenticated(ADMIN_USER).withRestRequest(GET, "/_plugins/_security/authinfo").withRestParams(expectedParams)
116116
);
117117
}
118118
}

src/integrationTest/java/org/opensearch/test/framework/cluster/TestRestClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public HttpResponse getWithoutLeadingSlash(String path, Header... headers) {
117117
}
118118

119119
public HttpResponse getAuthInfo(Header... headers) {
120-
return executeRequest(new HttpGet(getHttpServerUri() + "/_opendistro/_security/authinfo?pretty"), headers);
120+
return executeRequest(new HttpGet(getHttpServerUri() + "/_plugins/_security/authinfo?pretty"), headers);
121121
}
122122

123123
public HttpResponse securityHealth(Header... headers) {
@@ -127,7 +127,7 @@ public HttpResponse securityHealth(Header... headers) {
127127
public HttpResponse getAuthInfo(Map<String, String> urlParams, Header... headers) {
128128
String urlParamsString = "?"
129129
+ urlParams.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining("&"));
130-
return executeRequest(new HttpGet(getHttpServerUri() + "/_opendistro/_security/authinfo" + urlParamsString), headers);
130+
return executeRequest(new HttpGet(getHttpServerUri() + "/_plugins/_security/authinfo" + urlParamsString), headers);
131131
}
132132

133133
public void confirmCorrectCredentials(String expectedUserName) {

src/main/java/com/amazon/dlic/auth/http/saml/AuthTokenProcessorHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private AuthTokenProcessorAction.Response handleImpl(
139139
String acsEndpoint,
140140
Saml2Settings saml2Settings,
141141
String requestPath // the parameter will be removed in the future as soon as we will read of legacy paths aka
142-
// /_opendistro/_security/...
142+
// /_security/...
143143
) {
144144
if (token_log.isDebugEnabled()) {
145145
try {

src/main/java/com/amazon/dlic/auth/http/saml/HTTPSamlAuthenticator.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
import org.w3c.dom.Element;
7474
import org.xml.sax.SAXException;
7575

76-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
7776
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
7877

7978
public class HTTPSamlAuthenticator implements HTTPAuthenticator, Destroyable {
@@ -85,7 +84,7 @@ public class HTTPSamlAuthenticator implements HTTPAuthenticator, Destroyable {
8584

8685
public static final String API_AUTHTOKEN_SUFFIX = "api/authtoken";
8786
private static final String AUTHINFO_SUFFIX = "authinfo";
88-
private static final String REGEX_PATH_PREFIX = "/(" + LEGACY_OPENDISTRO_PREFIX + "|" + PLUGINS_PREFIX + ")/" + "(.*)";
87+
private static final String REGEX_PATH_PREFIX = "/(" + PLUGINS_PREFIX + ")/" + "(.*)";
8988
private static final Pattern PATTERN_PATH_PREFIX = Pattern.compile(REGEX_PATH_PREFIX);
9089

9190
private static boolean openSamlInitialized = false;

src/main/java/com/amazon/dlic/auth/http/saml/Saml2SettingsProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ private SingleLogoutService findSingleLogoutService(IDPSSODescriptor idpSsoDescr
221221
private String buildAssertionConsumerEndpoint(String dashboardsRoot) {
222222

223223
if (dashboardsRoot.endsWith("/")) {
224-
return dashboardsRoot + "_opendistro/_security/saml/acs";
224+
return dashboardsRoot + "_plugins/_security/saml/acs";
225225
} else {
226-
return dashboardsRoot + "/_opendistro/_security/saml/acs";
226+
return dashboardsRoot + "_plugins/_security/saml/acs";
227227
}
228228
}
229229

src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ public final class OpenSearchSecurityPlugin extends OpenSearchSecuritySSLPlugin
246246
private static final Logger actionTrace = LogManager.getLogger("opendistro_security_action_trace");
247247
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(OpenSearchSecurityPlugin.class);
248248

249-
public static final String LEGACY_OPENDISTRO_PREFIX = "_opendistro/_security";
250249
public static final String PLUGINS_PREFIX = "_plugins/_security";
251250

252251
private boolean sslCertReloadEnabled;

src/main/java/org/opensearch/security/auditlog/impl/AuditMessage.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
import org.joda.time.format.DateTimeFormat;
5757
import org.joda.time.format.DateTimeFormatter;
5858

59-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
6059
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
6160

6261
public final class AuditMessage {
@@ -68,9 +67,7 @@ public final class AuditMessage {
6867
private static final String SENSITIVE_KEY = "password";
6968
private static final String SENSITIVE_REPLACEMENT_VALUE = "__SENSITIVE__";
7069

71-
private static final Pattern SENSITIVE_PATHS = Pattern.compile(
72-
"/(" + LEGACY_OPENDISTRO_PREFIX + "|" + PLUGINS_PREFIX + ")/api/(account.*|internalusers.*|user.*)"
73-
);
70+
private static final Pattern SENSITIVE_PATHS = Pattern.compile("/(" + PLUGINS_PREFIX + ")/api/(account.*|internalusers.*|user.*)");
7471

7572
@VisibleForTesting
7673
public static final String BCRYPT_REGEX = "\\$2[ayb]\\$.{56}";

src/main/java/org/opensearch/security/dlic/rest/api/AccountApiAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
/**
4949
* Rest API action to fetch or update account details of the signed-in user.
50-
* Currently this action serves GET and PUT request for /_opendistro/_security/api/account endpoint
50+
* Currently this action serves GET and PUT request for /_security/api/account endpoint
5151
*/
5252
public class AccountApiAction extends AbstractApiAction {
5353

src/main/java/org/opensearch/security/dlic/rest/api/AuditApiAction.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/**
4747
* Rest handler for fetching and updating audit configuration.
4848
* Supported REST endpoints
49-
* GET _opendistro/_security/api/audit/
49+
* GET _security/api/audit/
5050
* {
5151
* "config" : {
5252
* "audit" : {
@@ -83,7 +83,7 @@
8383
* }
8484
* }
8585
*
86-
* PUT _opendistro/_security/api/audit/config
86+
* PUT _security/api/audit/config
8787
* {
8888
* "audit":{
8989
* "enable_rest":true,
@@ -116,7 +116,7 @@
116116
* }
117117
* }
118118
*
119-
* PATCH _opendistro/_security/api/audit
119+
* PATCH _security/api/audit
120120
* [{"op": "replace", "path": "/config/audit/enable_rest", "value": "true"}]
121121
* [{"op": "replace", "path": "/config/compliance/internal_config", "value": "true"}]
122122
*/

src/main/java/org/opensearch/security/dlic/rest/api/WhitelistApiAction.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@
3636
* SuperAdmin certificate for the default superuser is stored as a kirk.pem file in config folder of OpenSearch
3737
* <p>
3838
* Example calling the PUT API as SuperAdmin using curl (if http basic auth is on):
39-
* curl -v --cacert path_to_config/root-ca.pem --cert path_to_config/kirk.pem --key path_to_config/kirk-key.pem -XPUT https://localhost:9200/_opendistro/_security/api/whitelist -H "Content-Type: application/json" -d’
39+
* curl -v --cacert path_to_config/root-ca.pem --cert path_to_config/kirk.pem --key path_to_config/kirk-key.pem -XPUT https://localhost:9200/_security/api/whitelist -H "Content-Type: application/json" -d’
4040
* {
4141
* "enabled" : false,
42-
* "requests" : {"/_cat/nodes": ["GET"], "/_opendistro/_security/api/whitelist": ["GET"]}
42+
* "requests" : {"/_cat/nodes": ["GET"], "/_security/api/whitelist": ["GET"]}
4343
* }
4444
*
4545
* Example using the PATCH API to change the requests as SuperAdmin:
46-
* curl -v --cacert path_to_config/root-ca.pem --cert path_to_config/kirk.pem --key path_to_config/kirk-key.pem -XPATCH https://localhost:9200/_opendistro/_security/api/whitelist -H "Content-Type: application/json" -d’
46+
* curl -v --cacert path_to_config/root-ca.pem --cert path_to_config/kirk.pem --key path_to_config/kirk-key.pem -XPATCH https://localhost:9200/_security/api/whitelist -H "Content-Type: application/json" -d’
4747
* {
4848
* "op":"replace",
4949
* "path":"/config/requests",
50-
* "value": {"/_cat/nodes": ["GET"], "/_opendistro/_security/api/whitelist": ["GET"]}
50+
* "value": {"/_cat/nodes": ["GET"], "/_security/api/whitelist": ["GET"]}
5151
* }
5252
*
5353
* To update enabled, use the "add" operation instead of the "replace" operation, since boolean variables are not recognized as valid paths when they are false.
5454
* eg:
55-
* curl -v --cacert path_to_config/root-ca.pem --cert path_to_config/kirk.pem --key path_to_config/kirk-key.pem -XPATCH https://localhost:9200/_opendistro/_security/api/whitelist -H "Content-Type: application/json" -d’
55+
* curl -v --cacert path_to_config/root-ca.pem --cert path_to_config/kirk.pem --key path_to_config/kirk-key.pem -XPATCH https://localhost:9200/_security/api/whitelist -H "Content-Type: application/json" -d’
5656
* {
5757
* "op":"add",
5858
* "path":"/config/enabled",

src/main/java/org/opensearch/security/dlic/rest/support/Utils.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,14 @@
5151
import org.opensearch.security.user.User;
5252

5353
import static org.opensearch.core.xcontent.DeprecationHandler.THROW_UNSUPPORTED_OPERATION;
54-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
5554
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
5655

5756
public class Utils {
5857

5958
public final static String PLUGIN_ROUTE_PREFIX = "/" + PLUGINS_PREFIX;
6059

61-
public final static String LEGACY_PLUGIN_ROUTE_PREFIX = "/" + LEGACY_OPENDISTRO_PREFIX;
62-
6360
public final static String PLUGIN_API_ROUTE_PREFIX = PLUGIN_ROUTE_PREFIX + "/api";
6461

65-
public final static String LEGACY_PLUGIN_API_ROUTE_PREFIX = LEGACY_PLUGIN_ROUTE_PREFIX + "/api";
66-
6762
private static final ObjectMapper internalMapper = new ObjectMapper();
6863

6964
public static Map<String, Object> convertJsonToxToStructuredMap(ToXContent jsonContent) {
@@ -204,7 +199,7 @@ public static Set<String> generateFieldResourcePaths(final Set<String> fields, f
204199
*Total number of routes is expanded as twice as the number of routes passed in
205200
*/
206201
public static List<Route> addRoutesPrefix(List<Route> routes) {
207-
return addRoutesPrefix(routes, LEGACY_PLUGIN_API_ROUTE_PREFIX, PLUGIN_API_ROUTE_PREFIX);
202+
return addRoutesPrefix(routes, PLUGIN_API_ROUTE_PREFIX);
208203
}
209204

210205
/**
@@ -235,7 +230,7 @@ public static List<Route> addRoutesPrefix(List<Route> routes, final String... pr
235230
*Total number of routes is expanded as twice as the number of routes passed in
236231
*/
237232
public static List<DeprecatedRoute> addDeprecatedRoutesPrefix(List<DeprecatedRoute> deprecatedRoutes) {
238-
return addDeprecatedRoutesPrefix(deprecatedRoutes, LEGACY_PLUGIN_API_ROUTE_PREFIX, PLUGIN_API_ROUTE_PREFIX);
233+
return addDeprecatedRoutesPrefix(deprecatedRoutes, PLUGIN_API_ROUTE_PREFIX);
239234
}
240235

241236
/**

src/main/java/org/opensearch/security/filter/SecurityRestFilter.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070

7171
import org.greenrobot.eventbus.Subscribe;
7272

73-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
7473
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
7574

7675
public class SecurityRestFilter {
@@ -91,7 +90,7 @@ public class SecurityRestFilter {
9190
public static final String HEALTH_SUFFIX = "health";
9291
public static final String WHO_AM_I_SUFFIX = "whoami";
9392

94-
public static final String REGEX_PATH_PREFIX = "/(" + LEGACY_OPENDISTRO_PREFIX + "|" + PLUGINS_PREFIX + ")/" + "(.*)";
93+
public static final String REGEX_PATH_PREFIX = "/(" + PLUGINS_PREFIX + ")/" + "(.*)";
9594
public static final Pattern PATTERN_PATH_PREFIX = Pattern.compile(REGEX_PATH_PREFIX);
9695

9796
public SecurityRestFilter(
@@ -202,7 +201,7 @@ public void handleRequest(RestRequest request, RestChannel channel, NodeClient c
202201
* If allowlisting is enabled, then Non-SuperAdmin is allowed to access only those APIs that are allowlisted in {@link #requests}
203202
* For example: if allowlisting is enabled and requests = ["/_cat/nodes"], then SuperAdmin can access all APIs, but non SuperAdmin
204203
* can only access "/_cat/nodes"
205-
* Further note: Some APIs are only accessible by SuperAdmin, regardless of allowlisting. For example: /_opendistro/_security/api/whitelist is only accessible by SuperAdmin.
204+
* Further note: Some APIs are only accessible by SuperAdmin, regardless of allowlisting. For example: /_security/api/whitelist is only accessible by SuperAdmin.
206205
* See {@link AllowlistApiAction} for the implementation of this API.
207206
* SuperAdmin is identified by credentials, which can be passed in the curl request.
208207
*/

src/main/java/org/opensearch/security/http/OnBehalfOfAuthenticator.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@
4646
import io.jsonwebtoken.JwtParserBuilder;
4747
import io.jsonwebtoken.security.WeakKeyException;
4848

49-
import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
5049
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
5150
import static org.opensearch.security.util.AuthTokenUtils.isAccessToRestrictedEndpoints;
5251

5352
public class OnBehalfOfAuthenticator implements HTTPAuthenticator {
5453

5554
private static final int MINIMUM_SIGNING_KEY_BIT_LENGTH = 512;
56-
private static final String REGEX_PATH_PREFIX = "/(" + LEGACY_OPENDISTRO_PREFIX + "|" + PLUGINS_PREFIX + ")/" + "(.*)";
55+
private static final String REGEX_PATH_PREFIX = "/(" + PLUGINS_PREFIX + ")/" + "(.*)";
5756
private static final Pattern PATTERN_PATH_PREFIX = Pattern.compile(REGEX_PATH_PREFIX);
5857

5958
protected final Logger log = LogManager.getLogger(this.getClass());

src/main/java/org/opensearch/security/rest/DashboardsInfoAction.java

-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050

5151
import static org.opensearch.rest.RestRequest.Method.GET;
5252
import static org.opensearch.rest.RestRequest.Method.POST;
53-
import static org.opensearch.security.dlic.rest.support.Utils.LEGACY_PLUGIN_ROUTE_PREFIX;
5453
import static org.opensearch.security.dlic.rest.support.Utils.PLUGIN_ROUTE_PREFIX;
5554
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
5655

@@ -60,9 +59,6 @@ public class DashboardsInfoAction extends BaseRestHandler {
6059
.addAll(
6160
addRoutesPrefix(ImmutableList.of(new Route(GET, "/dashboardsinfo"), new Route(POST, "/dashboardsinfo")), PLUGIN_ROUTE_PREFIX)
6261
)
63-
.addAll(
64-
addRoutesPrefix(ImmutableList.of(new Route(GET, "/kibanainfo"), new Route(POST, "/kibanainfo")), LEGACY_PLUGIN_ROUTE_PREFIX)
65-
)
6662
.build();
6763

6864
private final Logger log = LogManager.getLogger(this.getClass());

src/main/java/org/opensearch/security/rest/SecurityHealthAction.java

-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@
4444

4545
import static org.opensearch.rest.RestRequest.Method.GET;
4646
import static org.opensearch.rest.RestRequest.Method.POST;
47-
import static org.opensearch.security.dlic.rest.support.Utils.LEGACY_PLUGIN_ROUTE_PREFIX;
4847
import static org.opensearch.security.dlic.rest.support.Utils.PLUGIN_ROUTE_PREFIX;
4948
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
5049

5150
public class SecurityHealthAction extends BaseRestHandler {
5251
private static final List<Route> routes = addRoutesPrefix(
5352
ImmutableList.of(new Route(GET, "/health"), new Route(POST, "/health")),
54-
LEGACY_PLUGIN_ROUTE_PREFIX,
5553
PLUGIN_ROUTE_PREFIX
5654
);
5755

src/main/java/org/opensearch/security/rest/SecurityInfoAction.java

-2
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,12 @@
5757

5858
import static org.opensearch.rest.RestRequest.Method.GET;
5959
import static org.opensearch.rest.RestRequest.Method.POST;
60-
import static org.opensearch.security.dlic.rest.support.Utils.LEGACY_PLUGIN_ROUTE_PREFIX;
6160
import static org.opensearch.security.dlic.rest.support.Utils.PLUGIN_ROUTE_PREFIX;
6261
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
6362

6463
public class SecurityInfoAction extends BaseRestHandler {
6564
private static final List<Route> routes = addRoutesPrefix(
6665
ImmutableList.of(new Route(GET, "/authinfo"), new Route(POST, "/authinfo")),
67-
LEGACY_PLUGIN_ROUTE_PREFIX,
6866
PLUGIN_ROUTE_PREFIX
6967
);
7068

src/main/java/org/opensearch/security/rest/TenantInfoAction.java

-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@
6161

6262
import static org.opensearch.rest.RestRequest.Method.GET;
6363
import static org.opensearch.rest.RestRequest.Method.POST;
64-
import static org.opensearch.security.dlic.rest.support.Utils.LEGACY_PLUGIN_ROUTE_PREFIX;
6564
import static org.opensearch.security.dlic.rest.support.Utils.PLUGIN_ROUTE_PREFIX;
6665
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
6766

6867
public class TenantInfoAction extends BaseRestHandler {
6968
private static final List<Route> routes = addRoutesPrefix(
7069
ImmutableList.of(new Route(GET, "/tenantinfo"), new Route(POST, "/tenantinfo")),
71-
LEGACY_PLUGIN_ROUTE_PREFIX,
7270
PLUGIN_ROUTE_PREFIX
7371
);
7472

0 commit comments

Comments
 (0)