-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement multi tenancy in Flow Framework (#980)
* Import SdkClient and inject it Signed-off-by: Daniel Widdis <widdis@gmail.com> # Conflicts: # build.gradle # Conflicts: # build.gradle * Pass sdkClient to IndicesHandler and EncryptorUtils classes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Extract tenant id from REST header into RestAction Signed-off-by: Daniel Widdis <widdis@gmail.com> * Pass tenant id to transport actions in template Signed-off-by: Daniel Widdis <widdis@gmail.com> * Validate tenant id existence in workflow transport actions Signed-off-by: Daniel Widdis <widdis@gmail.com> * Pass SdkClient and tenant id to util used for access control checks Signed-off-by: Daniel Widdis <widdis@gmail.com> # Conflicts: # src/main/java/org/opensearch/flowframework/transport/DeleteWorkflowTransportAction.java # src/main/java/org/opensearch/flowframework/transport/DeprovisionWorkflowTransportAction.java # src/main/java/org/opensearch/flowframework/transport/GetWorkflowStateTransportAction.java # src/main/java/org/opensearch/flowframework/transport/GetWorkflowTransportAction.java # src/main/java/org/opensearch/flowframework/transport/ProvisionWorkflowTransportAction.java # src/main/java/org/opensearch/flowframework/transport/ReprovisionWorkflowTransportAction.java # src/main/java/org/opensearch/flowframework/util/ParseUtils.java * Perform tenant id validation checks for workflow APIs Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate Update workflow get action to SdkCleint Signed-off-by: Daniel Widdis <widdis@gmail.com> * Pass tenantId to IndicesHandler and use in EncryptorUtils Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate EncryptorUtils getting master key from index Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor fetching master key to permit reuse Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor initializeMasterKey to use common code Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate indexing new key to config Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate template indexing to sdkClient Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate template deletion to sdkClient Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate get template to sdkClient Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate provision template to sdkClient Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate max workflow search to sdkClient Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add tenantId to GetWorkflowStateRequest Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate GetWorkflowStateRequest to multitenant client Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate getProvisioningProgress to avoid repetition Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate canDeleteWorkflowStateDoc to avoid repetition Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate initial state document creation to metadata client Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate state document deletion to metadata client Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add Tenant aware Rest Tests for Workflows Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix javadocs Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add publishToMavenLocal for more CI Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix some CI Signed-off-by: Daniel Widdis <widdis@gmail.com> * Enable tenant aware search Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor state index update method using multitenant client Signed-off-by: Daniel Widdis <widdis@gmail.com> * Get metadata client artifacts from Maven Snapshot Signed-off-by: Daniel Widdis <widdis@gmail.com> * Update tests for new update async code Signed-off-by: Daniel Widdis <widdis@gmail.com> * Switch SdkClient to use default generic thread executor Signed-off-by: Daniel Widdis <widdis@gmail.com> * Migrate last updates to sdkClient Signed-off-by: Daniel Widdis <widdis@gmail.com> * Revert (most) changes to unit tests based on async client changes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Pass tenant id when updating state during provisioning Signed-off-by: Daniel Widdis <widdis@gmail.com> * Integrate tenantId with synchronous provisioning Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix failing integ tests after rebase, code review updates Signed-off-by: Daniel Widdis <widdis@gmail.com> * Replace fakeTenantId placeholders with actual tenant id Signed-off-by: Daniel Widdis <widdis@gmail.com> * Use version catalog for commons-lang3 and httpcore dependencies Signed-off-by: Daniel Widdis <widdis@gmail.com> * Exclude transitive httpclient dependency from metadata and rest client Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix more test errors and tweak dependencies Signed-off-by: Daniel Widdis <widdis@gmail.com> * More code review comments and refactoring Signed-off-by: Daniel Widdis <widdis@gmail.com> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com>
- Loading branch information
Showing
84 changed files
with
3,377 additions
and
1,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.