Copy scripts from tools to bin/ directory in assembly and make scripts agnostic to directory#6023
Open
cwperks wants to merge 7 commits intoopensearch-project:mainfrom
Open
Copy scripts from tools to bin/ directory in assembly and make scripts agnostic to directory#6023cwperks wants to merge 7 commits intoopensearch-project:mainfrom
cwperks wants to merge 7 commits intoopensearch-project:mainfrom
Conversation
…s agnostic to directory Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6023 +/- ##
==========================================
- Coverage 73.82% 73.82% -0.01%
==========================================
Files 439 440 +1
Lines 27122 27229 +107
Branches 4025 4044 +19
==========================================
+ Hits 20024 20101 +77
- Misses 5192 5218 +26
- Partials 1906 1910 +4
🚀 New features to boost your workflow:
|
Signed-off-by: Craig Perkins <cwperx@amazon.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR fixes the packaging of the OpenSearch Security tools scripts so they retain executable permissions after plugin installation.
Today, scripts under
<OPENSEARCH_HOME>/plugins/opensearch-security/toolscan lose their execute bit during plugin installation. As a result, cluster administrators must manually update file permissions before they can run them.i.e.
With the changes in this PR we are going to copy the tools into another directory called
bin/on assembly which OpenSearch core nows how to handle on plugin install to copy these to<OPENSEARCH_HOME>/bin/opensearch-security/and keep the file's permissions as they are (755).In order to do this, I also have to make the scripts agnostic to directory since they are now one level less deep so there's logic introduced to identify OPENSEARCH_HOME directory by looking for the lib directory and OpenSearch jar.
Yes this means there will be copies of each script (left intentionally until all places around the ecosystem are updated like Docker entrypoint).
Issues Resolved
Enhancement
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.