support plain text credentials#4782
support plain text credentials#4782zane-neo wants to merge 5 commits intoopensearch-project:mainfrom
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 8ce8f73.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍(Review updated until commit 8ce8f73)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 8ce8f73 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 04e5bbb
Suggestions up to commit 1ced2ed
Suggestions up to commit 66783d8
Suggestions up to commit 4c84012
Suggestions up to commit de4ce40
|
|
Persistent review updated to latest commit 5291e54 |
a45dd89 to
de4ce40
Compare
|
Persistent review updated to latest commit de4ce40 |
|
Persistent review updated to latest commit 1ced2ed |
fc0768e to
04e5bbb
Compare
|
Persistent review updated to latest commit 04e5bbb |
Signed-off-by: zane-neo <zaniu@amazon.com>
Signed-off-by: zane-neo <zaniu@amazon.com>
Signed-off-by: zane-neo <zaniu@amazon.com>
Signed-off-by: zane-neo <zaniu@amazon.com>
Signed-off-by: zane-neo <zaniu@amazon.com>
04e5bbb to
8ce8f73
Compare
|
Persistent review updated to latest commit 8ce8f73 |
Description
Currently, ml-commons requires all connector credentials to be encrypted using EncryptorImpl with AWS Encryption SDK. This creates challenges in certain use cases where encryption is unnecessary, redundant, or problematic. This issue proposes adding support for optionally storing credentials in plaintext, controlled by a cluster-level setting (plugins.ml_commons.allow_plaintext_credentials, default: false) to ensure security by default.
Related Issues
#4704
Testing
Below is an example request body for different testing cases:
Allow plain text credentials not enabled
Keep the cluster setting:
plugins.ml_commons.allow_plaintext_credentialsunchanged and try to create a connector withencryptedto false like below:The result should like below:
Remove the key
encryptedor change the key's value to true can get successful response.Allow plain text credentials enabled
Use plain text credentials with request body like below:
Response like below:
If you have permission to check the raw documents you will see:
Use encrypted credentials with request body like below:
Response like below:
If you have permission to read raw documents you will see:
Allow plain text credentials changed to disabled
If allow plain text credentials are set to enabled and registered with several connectors with plain text credentials and the setting are changed back to disabled after that, then the plain text credentials should still work.
Predict model
Response:
Update connector when allow plain text credentials are set to false
Update Failed
Response:
Update succeed
Response:
Check List
--signoff.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.