-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]Introduces Resource Sharing and Access Control #16030
Changes from 60 commits
909a85b
66a849c
08cdcb3
d7169e4
58ae851
fd00243
ef8a0b7
e98cb61
96f09b0
c86dfc9
7c6ec2a
c04762e
f95a67f
8b8fffd
7e7cd0a
e1a1b62
23fcfba
fba48ab
9cb8d0e
848234e
eaf0c6e
6a6e6f7
566913a
b4f876f
9baac32
0eb47ac
e313071
bd91162
2327258
774a4a1
37cacf0
4107407
274c64f
014be82
3143796
04a02cb
e468f91
3a0b4b1
0056807
0548fc2
193112b
cbbefa6
d7d1f25
a44b06a
b58308e
b25a9a7
eb43578
bcd0f2b
686f037
0bf9fd1
4a073f1
34f160c
1df8e11
eee5ce1
77c56be
bb584bb
448307b
d9f5262
1aff350
f90b165
5e6b8ff
ce9d5ec
7a868cb
f1d3011
00ba7a7
6fb5055
3dfc16e
532d13a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
DarshitChanpura marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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.accesscontrol.resources; | ||
|
||
import org.opensearch.accesscontrol.resources.testplugins.TestRACPlugin; | ||
import org.opensearch.accesscontrol.resources.testplugins.TestResourcePlugin; | ||
import org.opensearch.plugins.Plugin; | ||
import org.opensearch.plugins.ResourceAccessControlPlugin; | ||
import org.opensearch.test.OpenSearchIntegTestCase; | ||
import org.hamcrest.MatcherAssert; | ||
import org.hamcrest.Matchers; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
public class NonDefaultResourceAccessControlPluginIT extends OpenSearchIntegTestCase { | ||
@Override | ||
protected Collection<Class<? extends Plugin>> nodePlugins() { | ||
return List.of(TestResourcePlugin.class, TestRACPlugin.class); | ||
} | ||
|
||
public void testSampleResourcePluginCallsTestRACPluginToManageResourceAccess() { | ||
ResourceAccessControlPlugin racPlugin = TestResourcePlugin.GuiceHolder.getResourceService().getResourceAccessControlPlugin(); | ||
MatcherAssert.assertThat(racPlugin.getClass(), Matchers.is(TestRACPlugin.class)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed to parse and convert the Resource object. utilized here: https://github.com/opensearch-project/OpenSearch/pull/16030/files#diff-82f07db5b808e9745f61ee164de884b3c842a37526c6e7763c47285795eea426R118
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this dependency be added to the
:server
module where the parsing logic exists instead of here? Why change the dependencies of this library if no code in this library needs the dependency?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I had added it here thinking this project is being imported by multiple places and already has a jackson dependency it might be useful. I have move it to server/build.gradle in my latest commit: 532d13a