Skip to content

[BUG] hash.sh script should not return deprecation message in output #2485

@defesteban

Description

@defesteban

What is the bug?
hash.sh script should return only password, but now it returns

**************************************************************************
** This tool will be deprecated in the next major release of OpenSearch **
** https://github.com/opensearch-project/security/issues/1755           **
**************************************************************************
$2y$12$qqrlE8ZCdZOg4AwU5vjKO.MYFR4iGovWXsrY5LHlmxTgU3UJq7COG

as a result of password hash. Could you please separate streams for output and deprecation message?

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Run in OpenSearch pod:
    password=$("${OPENSEARCH_HOME}/plugins/opensearch-security/tools/hash.sh" -p "basic") 
    
  2. Check what is inside password variable:
    echo "$password"
    
  3. Now result is as follows:
    **************************************************************************
    ** This tool will be deprecated in the next major release of OpenSearch **
    ** https://github.com/opensearch-project/security/issues/1755           **
    **************************************************************************
    $2y$12$qqrlE8ZCdZOg4AwU5vjKO.MYFR4iGovWXsrY5LHlmxTgU3UJq7COG
    

What is the expected behavior?
hash.sh script should return only password.

What is your host/environment?

  • Version: 2.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueThese are recommended starting points for newcomers looking to make their first contributions.help wantedCommunity contributions are especially encouraged for these issues.triagedIssues labeled as 'Triaged' have been reviewed and are deemed actionable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions