-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[RemoteStore]: Add support for repository with Server side encryption enabled and client side encryption as well based on a flag. #19630
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
Open
pranikum
wants to merge
10
commits into
opensearch-project:main
Choose a base branch
from
pranikum:sse-blobstore-changes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
891477a
Add changes for ServerSideEncryption support for RemoteStore
pranikum 8ffbee9
Use IndexSttings param instead of boolean
pranikum aefe2ba
Add Bloblevel support for serversideencryption.
pranikum 8439c4e
Fix sse enabled property name. Also snapshot restore
pranikum 01b6ca2
Fix public methods
pranikum 7b1273c
Add ChangeLog file
pranikum 0cb3731
Add test cases
pranikum 37a0950
Fix spotless and forbiddenAPI issues
pranikum 3560a0a
Add comments
pranikum cca7474
Address comments
pranikum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -950,6 +950,8 @@ private void setRetentionLeaseMillis(final TimeValue retentionLease) { | |
*/ | ||
private final boolean isCompositeIndex; | ||
|
||
private boolean isServerSideEncryptionEnabled; | ||
|
||
/** | ||
* Denotes whether search via star tree index is enabled for this index | ||
*/ | ||
|
@@ -1035,7 +1037,7 @@ public IndexSettings(final IndexMetadata indexMetadata, final Settings nodeSetti | |
numberOfShards = settings.getAsInt(IndexMetadata.SETTING_NUMBER_OF_SHARDS, null); | ||
replicationType = IndexMetadata.INDEX_REPLICATION_TYPE_SETTING.get(settings); | ||
isRemoteStoreEnabled = settings.getAsBoolean(IndexMetadata.SETTING_REMOTE_STORE_ENABLED, false); | ||
|
||
isServerSideEncryptionEnabled = settings.getAsBoolean(IndexMetadata.SETTING_REMOTE_STORE_SSE_ENABLED, false); | ||
isWarmIndex = settings.getAsBoolean(IndexModule.IS_WARM_INDEX_SETTING.getKey(), false); | ||
|
||
remoteStoreTranslogRepository = settings.get(IndexMetadata.SETTING_REMOTE_TRANSLOG_STORE_REPOSITORY); | ||
|
@@ -1243,6 +1245,12 @@ public IndexSettings(final IndexMetadata indexMetadata, final Settings nodeSetti | |
); | ||
scopedSettings.addSettingsUpdateConsumer(ALLOW_DERIVED_FIELDS, this::setAllowDerivedField); | ||
scopedSettings.addSettingsUpdateConsumer(IndexMetadata.INDEX_REMOTE_STORE_ENABLED_SETTING, this::setRemoteStoreEnabled); | ||
|
||
scopedSettings.addSettingsUpdateConsumer( | ||
IndexMetadata.INDEX_REMOTE_STORE_SSE_ENABLED_SETTING, | ||
this::setServerSideEncryptionEnabled | ||
); | ||
|
||
|
||
scopedSettings.addSettingsUpdateConsumer( | ||
IndexMetadata.INDEX_REMOTE_SEGMENT_STORE_REPOSITORY_SETTING, | ||
this::setRemoteStoreRepository | ||
|
@@ -1431,6 +1439,13 @@ public boolean isRemoteStoreEnabled() { | |
return isRemoteStoreEnabled; | ||
} | ||
|
||
/** | ||
* Returns if remote store SSE is enabled for this index. | ||
*/ | ||
public boolean isServerSideEncryptionEnabled() { | ||
return isServerSideEncryptionEnabled; | ||
} | ||
|
||
public boolean isAssignedOnRemoteNode() { | ||
return assignedOnRemoteNode; | ||
} | ||
|
@@ -2141,6 +2156,10 @@ public void setRemoteStoreEnabled(boolean isRemoteStoreEnabled) { | |
this.isRemoteStoreEnabled = isRemoteStoreEnabled; | ||
} | ||
|
||
public void setServerSideEncryptionEnabled(boolean sseEnabled) { | ||
this.isServerSideEncryptionEnabled = sseEnabled; | ||
} | ||
|
||
public void setRemoteStoreRepository(String remoteStoreRepository) { | ||
this.remoteStoreRepository = remoteStoreRepository; | ||
} | ||
|
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we can add a method in
RemoteStoreNodeService
about the same . RemoteStoreNodeService can use repository data and infer from it based on repository type.