Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2246d91
Introduces resource sharing and access control SPI
DarshitChanpura Mar 17, 2025
c8245dc
Introduces a resource sharing client and completes resource access co…
DarshitChanpura Mar 17, 2025
7631bd0
Updates client to handle security disabled scenario
DarshitChanpura Mar 18, 2025
84b2a21
Updates build.gradle files and jarhell references
DarshitChanpura Mar 19, 2025
3d9c9c1
Disables jar for common
DarshitChanpura Mar 19, 2025
f167091
Removes common package and refactors classes
DarshitChanpura Mar 19, 2025
89d3a63
Conforms to SPI file name changes and removes spi package
DarshitChanpura Mar 20, 2025
643e44f
Updates plugin dev doc
DarshitChanpura Mar 20, 2025
52f4ac5
Fixes CI
DarshitChanpura Mar 20, 2025
e05ae8a
Updates exception types in client and root project
DarshitChanpura Mar 21, 2025
c0c9f9b
Addresses PR comments
DarshitChanpura Mar 21, 2025
0cac90d
Refactors client to address action-groups and updates core implementa…
DarshitChanpura Mar 26, 2025
95ff332
Merge remote-tracking branch 'upstream/feature/resource-permissions' …
DarshitChanpura Mar 26, 2025
b349a5c
Fixes build.gradle
DarshitChanpura Mar 26, 2025
31b0d0b
Fixes build-artifacts workflow
DarshitChanpura Mar 26, 2025
400a360
Addresses changes around recipient type registry removal
DarshitChanpura Mar 26, 2025
906908a
Makes ResourceIndexListener non-singleton, refactors a method and cha…
DarshitChanpura Mar 26, 2025
5ecac3a
Splits singular resource rest action to individual actions
DarshitChanpura Mar 27, 2025
f943168
Removes singleton pattern from ResourcePluginInfo
DarshitChanpura Mar 28, 2025
124f438
Restricts the client method arguments to ActionGroupRecipients type
DarshitChanpura Mar 30, 2025
754e87b
Adds ResourcePluginInfo as injectable component
DarshitChanpura Mar 31, 2025
7aa1b1d
Requires version to be passed when instantiating client
DarshitChanpura Mar 31, 2025
b383417
Updates client readme doc
DarshitChanpura Mar 31, 2025
0737060
[Resource Access Control] [Part1] Introduces SPI for resource access …
DarshitChanpura Apr 1, 2025
2760e3e
Merge branch 'feature/resource-permissions' into resource-sharing-client
DarshitChanpura Apr 1, 2025
7b8b28b
Fix DefaultObjectMapper imports and TestRestClient instantiations
DarshitChanpura Apr 1, 2025
162463a
Disables SPI jar to allow assemble task to succeed
DarshitChanpura Apr 1, 2025
f0f0255
Merge branch 'feature/resource-permissions' into resource-sharing-client
DarshitChanpura Apr 1, 2025
990b651
Corrects steps indentation for CI workflow file
DarshitChanpura Apr 1, 2025
877eacb
Fixes CI workflow
DarshitChanpura Apr 2, 2025
0a48e9b
Moves client package classes to SPI and removes client package
DarshitChanpura Apr 2, 2025
20f901d
Fixes checkstyle violations and updates readmes
DarshitChanpura Apr 2, 2025
0bce481
Fixes spotless
DarshitChanpura Apr 2, 2025
7c6ebe3
Fixes checkStyle
DarshitChanpura Apr 2, 2025
c3bb0ab
Updates SPI to allow registering multiple types of resources
DarshitChanpura Apr 7, 2025
32762b2
Updates SPI readme
DarshitChanpura Apr 7, 2025
fd0e950
Updates dev readme
DarshitChanpura Apr 7, 2025
6c4d87c
Removes REST apis and disables feature by default
DarshitChanpura Apr 8, 2025
64b25c7
Merge branch 'feature/resource-permissions' into resource-sharing-no-…
DarshitChanpura Apr 8, 2025
7d7ff1f
Adds a check to index resource-sharing on primary only and updates doc
DarshitChanpura Apr 8, 2025
6217120
Exposes feature-flag via SPI
DarshitChanpura Apr 8, 2025
930e763
Merge remote-tracking branch 'upstream/feature/resource-permissions' …
DarshitChanpura Apr 14, 2025
ca09fdd
Removes unnecessary version check
DarshitChanpura Apr 14, 2025
f4b4e9a
Merge remote-tracking branch 'upstream/feature/resource-permissions' …
DarshitChanpura Apr 14, 2025
9b35ad4
Populates resource-sharing-extensions list and renames getName in Sha…
DarshitChanpura Apr 14, 2025
a6af3b3
Addresses a small bugfix
DarshitChanpura Apr 15, 2025
94aef4d
Addresses PR comments
DarshitChanpura Apr 15, 2025
46527f2
Changes SPI scope to compileOnly by removing ShareableResource and pa…
DarshitChanpura Apr 16, 2025
1d1752a
Returns true by default if no resource-sharing entry is found
DarshitChanpura Apr 16, 2025
d365764
Updates documentation
DarshitChanpura Apr 16, 2025
8917166
Changes from 4 query calls to 1 when fetching accessible resourceIds
DarshitChanpura Apr 17, 2025
fe699bc
Refactors and removes unused methods
DarshitChanpura Apr 17, 2025
1f06b40
Removes unneeded abstraction when creating rs index
DarshitChanpura Apr 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
332 changes: 141 additions & 191 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

459 changes: 459 additions & 0 deletions RESOURCE_ACCESS_CONTROL_FOR_PLUGINS.md

Large diffs are not rendered by default.

25 changes: 15 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,6 @@ publishing {
}
}

repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://artifacts.opensearch.org/snapshots/lucene/" }
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases" }
}

tasks.test.finalizedBy(jacocoTestReport) // report is always generated after tests run

Expand Down Expand Up @@ -503,6 +495,15 @@ configurations {
}

allprojects {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://artifacts.opensearch.org/snapshots/lucene/" }
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases" }
}

configurations {
integrationTestImplementation.extendsFrom implementation
compile.extendsFrom compileOnly
Expand Down Expand Up @@ -557,7 +558,8 @@ allprojects {
integrationTestImplementation 'org.slf4j:slf4j-api:2.0.12'
integrationTestImplementation 'com.selectivem.collections:special-collections-complete:1.4.0'
integrationTestImplementation "org.opensearch.plugin:lang-painless:${opensearch_version}"
integrationTestImplementation project(path:":opensearch-resource-sharing-spi", configuration: 'shadow')
integrationTestImplementation group: 'org.opensearch', name:'opensearch-security-spi', version:"${opensearch_build}"

}
}

Expand All @@ -581,6 +583,9 @@ sourceSets {

//add new task that runs integration tests
task integrationTest(type: Test) {
filter {
excludeTestsMatching 'org.opensearch.sample.*ResourcePlugin*'
}
doFirst {
// Only run resources tests on resource-test CI environments or locally
if (System.getenv('CI_ENVIRONMENT') != 'resource-test' && System.getenv('CI_ENVIRONMENT') != null) {
Expand Down Expand Up @@ -636,7 +641,7 @@ configurations.all {
}

dependencies {
implementation project(path:":opensearch-resource-sharing-spi", configuration: 'shadow')
implementation project(path: ":opensearch-security-spi", configuration: 'shadow')
implementation "org.opensearch.plugin:transport-netty4-client:${opensearch_version}"
implementation "org.opensearch.client:opensearch-rest-high-level-client:${opensearch_version}"
implementation "org.apache.httpcomponents.client5:httpclient5-cache:${versions.httpclient5}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ mkdir -p $OUTPUT/plugins
cp ${distributions}/*.zip ./$OUTPUT/plugins

# Publish jars
./gradlew :opensearch-resource-sharing-spi:publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
./gradlew :opensearch-security-spi:publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
./gradlew publishAllPublicationsToStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER

./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
rootProject.name = 'opensearch-security'

include "spi"
project(":spi").name = "opensearch-resource-sharing-spi"
project(":spi").name = "opensearch-security-spi"
Loading
Loading