Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 2.4.1
Describe the issue:
I am exploring migrating from OpenSearch 1.3.x to 2.4.1. We have a bash script that resets the password for some internal accounts. Our script calls the hash.sh utility (in the plugins/opensearch-security/tools sub-directory) to get a hash of the new password so we can pass it in on the API call.
The hash.sh script now emits a banner warning indicating that the tool will be deprecated in the next major OpenSearch release prior to returning the hashed password. Unfortunately, this change in output breaks our script (which was only expecting the hashed password as output).
While we can “fix” this, it was disappointing/surprising to have the utility’s output change without notice. I understand the desire/need to inform users of the deprecation and coming change but this change appears to have been made without any thought of its impact on existing code that uses the tool.
-
It appears the tool was updated to output the banner in Add depreciation notice to security tools by peternied · Pull Request #1756 · opensearch-project/security · GitHub.
-
And a issue to update the documentation was opened (but, evidently, not completed) in [FEATURE] Add deprecation notices for Security Plugin tools · Issue #503 · opensearch-project/documentation-website · GitHub
-
This change is not listed in the list of Breaking Changes in OpenSearch 2.x Breaking changes - OpenSearch documentation
Relevant Logs or Screenshots:
The current (OpenSearch 2.4.1) output
-bash-4.2$ kubectl -n logging exec v4m-search-0 -c opensearch -- /usr/share/opensearch/plugins/opensearch-security/tools/hash.sh -p mypassword
**************************************************************************
** This tool will be deprecated in the next major release of OpenSearch **
** https://github.com/opensearch-project/security/issues/1755 **
**************************************************************************
$2y$12$gaqL2Hm29jWjb8otxUMbbeftVg1JYELZiQb1ji6kaRGLs4MPF4zTu
The expected (previous) output:
-bash-4.2$ kubectl -n logging exec v4m-search-0 -c opensearch -- /usr/share/opensearch/plugins/opensearch-security/tools/hash.sh -p mypassword
$2y$12$gaqL2Hm29jWjb8otxUMbbeftVg1JYELZiQb1ji6kaRGLs4MPF4zTu