diff --git a/src/main/java/org/opensearch/security/resource/ResourceSharingEntry.java b/src/main/java/org/opensearch/security/resource/ResourceSharingEntry.java index ad454547df..d7ecfac33c 100644 --- a/src/main/java/org/opensearch/security/resource/ResourceSharingEntry.java +++ b/src/main/java/org/opensearch/security/resource/ResourceSharingEntry.java @@ -17,8 +17,7 @@ import org.opensearch.core.xcontent.ToXContentFragment; import org.opensearch.core.xcontent.XContentBuilder; -import org.opensearch.security.spi.ResourceUser; -import org.opensearch.security.spi.ShareWith; +import org.opensearch.security.rest.resource.ShareWith; public class ResourceSharingEntry implements ToXContentFragment { private final String resourceIndex; diff --git a/src/main/java/org/opensearch/security/resource/ResourceSharingListener.java b/src/main/java/org/opensearch/security/resource/ResourceSharingListener.java index f8f46d7fb4..236efea7cb 100644 --- a/src/main/java/org/opensearch/security/resource/ResourceSharingListener.java +++ b/src/main/java/org/opensearch/security/resource/ResourceSharingListener.java @@ -30,8 +30,7 @@ import org.opensearch.core.xcontent.ToXContent; import org.opensearch.index.engine.Engine; import org.opensearch.index.shard.IndexingOperationListener; -import org.opensearch.security.spi.ResourceUser; -import org.opensearch.security.spi.ShareWith; +import org.opensearch.security.rest.resource.ShareWith; import org.opensearch.security.support.ConfigConstants; import org.opensearch.security.user.User; import org.opensearch.threadpool.ThreadPool; diff --git a/spi/src/main/java/org/opensearch/security/spi/ResourceUser.java b/src/main/java/org/opensearch/security/resource/ResourceUser.java similarity index 97% rename from spi/src/main/java/org/opensearch/security/spi/ResourceUser.java rename to src/main/java/org/opensearch/security/resource/ResourceUser.java index a1599c578d..1c135f6f01 100644 --- a/spi/src/main/java/org/opensearch/security/spi/ResourceUser.java +++ b/src/main/java/org/opensearch/security/resource/ResourceUser.java @@ -7,7 +7,7 @@ * compatible open source license. */ -package org.opensearch.security.spi; +package org.opensearch.security.resource; import java.io.IOException; import java.util.HashSet; diff --git a/src/main/java/org/opensearch/security/resource/SecurityResourceSharingService.java b/src/main/java/org/opensearch/security/resource/SecurityResourceSharingService.java index e75da07899..990360c0f9 100644 --- a/src/main/java/org/opensearch/security/resource/SecurityResourceSharingService.java +++ b/src/main/java/org/opensearch/security/resource/SecurityResourceSharingService.java @@ -30,10 +30,10 @@ import org.opensearch.index.query.QueryBuilders; import org.opensearch.search.SearchHit; import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.security.rest.resource.ShareWith; import org.opensearch.security.spi.Resource; import org.opensearch.security.spi.ResourceFactory; import org.opensearch.security.spi.ResourceSharingService; -import org.opensearch.security.spi.ShareWith; import org.opensearch.security.support.ConfigConstants; import org.opensearch.security.support.WildcardMatcher; import org.opensearch.security.user.User; diff --git a/spi/src/main/java/org/opensearch/security/spi/ShareWith.java b/src/main/java/org/opensearch/security/rest/resource/ShareWith.java similarity index 88% rename from spi/src/main/java/org/opensearch/security/spi/ShareWith.java rename to src/main/java/org/opensearch/security/rest/resource/ShareWith.java index dfb0ba0272..341fde9153 100644 --- a/spi/src/main/java/org/opensearch/security/spi/ShareWith.java +++ b/src/main/java/org/opensearch/security/rest/resource/ShareWith.java @@ -1,4 +1,12 @@ -package org.opensearch.security.spi; +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.security.rest.resource; import java.io.IOException; import java.util.List; diff --git a/src/main/java/org/opensearch/security/rest/resource/ShareWithRequest.java b/src/main/java/org/opensearch/security/rest/resource/ShareWithRequest.java index 6e64ef6997..e7404e8b9e 100644 --- a/src/main/java/org/opensearch/security/rest/resource/ShareWithRequest.java +++ b/src/main/java/org/opensearch/security/rest/resource/ShareWithRequest.java @@ -14,7 +14,6 @@ import org.opensearch.action.ActionRequestValidationException; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; -import org.opensearch.security.spi.ShareWith; /** * Request object for UpdateResourceSharing transport action diff --git a/src/main/java/org/opensearch/security/rest/resource/ShareWithRestAction.java b/src/main/java/org/opensearch/security/rest/resource/ShareWithRestAction.java index 556fa16ff5..d114b8a576 100644 --- a/src/main/java/org/opensearch/security/rest/resource/ShareWithRestAction.java +++ b/src/main/java/org/opensearch/security/rest/resource/ShareWithRestAction.java @@ -21,7 +21,6 @@ import org.opensearch.rest.RestRequest; import org.opensearch.rest.action.RestToXContentListener; import org.opensearch.security.spi.ResourceSharingExtension; -import org.opensearch.security.spi.ShareWith; import static org.opensearch.rest.RestRequest.Method.PUT; import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;