Skip to content
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

[BUG] Invalid username or password #55

Closed
liamhess opened this issue Nov 23, 2023 · 10 comments
Closed

[BUG] Invalid username or password #55

liamhess opened this issue Nov 23, 2023 · 10 comments
Labels
bug Something isn't working v1.1.0

Comments

@liamhess
Copy link

What is the bug?

I can not authenticate, no matter what I do it returns an error.

How can one reproduce the bug?

Create dashboard and try to export report with cli

What is the expected behavior?

I should be authenticated

What is your host/environment?

MacOS, OpenSearch 2.10.0 in Docker. I cloned the repo so it should be the latest version of the cli.

Do you have any screenshots?

image
@liamhess liamhess added bug Something isn't working untriaged labels Nov 23, 2023
@mimugmail
Copy link

Same here:

root@siem-master:~# /root/node_modules/.bin/opensearch-reporting-cli -u https://10.24.80.101:4443/goto/23768a6a46b414c006ced25acb3b9102 -a basic -c user:pw -e smtp -s sender -r receiver -f png --subject Report
✔ Fetched argument values
⠋ Connecting to url https://10.24.80.101:4443/goto/23768a6a46b414c006ced25acb3b9102(node:1477071) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
✖ Invalid username or password
✖ Downloading report failed. TypeError: exit is not a function

Debian 12.2
npm 9.2.0

I'm using Wazuh, maybe this is of interest?

@JumpyWizard404
Copy link

JumpyWizard404 commented Jan 10, 2024

same issue just on Debian 11
npm 10.2.5

also using the wazuh version of Opensearch
Further information: Wazuh is built on Opensearch 2.8
This Was also tested on the following
Debian 12
npm 10.2.5
Pure Opensearch 2.11
On the setup above (Pure opensearch 2.11 no wazuh) the reporting CLI works fine

NodeJS on both was setup as v21.5.0

@JumpyWizard404
Copy link

Same here:

root@siem-master:~# /root/node_modules/.bin/opensearch-reporting-cli -u https://10.24.80.101:4443/goto/23768a6a46b414c006ced25acb3b9102 -a basic -c user:pw -e smtp -s sender -r receiver -f png --subject Report
✔ Fetched argument values
⠋ Connecting to url https://10.24.80.101:4443/goto/23768a6a46b414c006ced25acb3b9102(node:1477071) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
✖ Invalid username or password
✖ Downloading report failed. TypeError: exit is not a function

Debian 12.2 npm 9.2.0

I'm using Wazuh, maybe this is of interest?

Did you ever find a solution for this one? I tested it on a pure opensearch 2.11 on Debian12 and have downloaded reports fine

@mimugmail
Copy link

Not yet, I'm quite sure it's the "uiSettings.overrides.defaultRoute: /app/wazuh" .. I'll raise an issue at wazuh

@JumpyWizard404
Copy link

Not yet, I'm quite sure it's the "uiSettings.overrides.defaultRoute: /app/wazuh" .. I'll raise an issue at wazuh

ive tried working around that and commented out that line the only thing that does is it doesnt auto forward you to the wazuh plugin page but allows you to open the classic opensearch homepage, but even with that out of the way it was still bugged.

@piotrb710
Copy link

try to generate the full path for the report.

@rupal-bq
Copy link
Contributor

This might be due to tenant selection. Fix is merged in #65

@JumpyWizard404
Copy link

JumpyWizard404 commented Mar 20, 2024

Hi rupal tested just now

also using the Wazuh version of Opensearch
Further information: Wazuh is built on Opensearch 2.8
This Was also tested on the following
Debian 11
npm 10.2.5
Pure Opensearch 2.11
On the setup above (Opensearch 2.8 + wazuh)

NodeJS on both was setup as v21.11.0

this is the command i used

/root/node_modules/.bin/opensearch-reporting-cli --url https://server_name:443/app/dashboards#/view/ce76b220-6803-11ee-8d25-7b18287bc2bf --format pdf --auth basic --credentials admin:password

i also tried

/root/node_modules/.bin/opensearch-reporting-cli --url https://server_name:443/app/dashboards#/view/ce76b220-6803-11ee-8d25-7b18287bc2bf --format pdf --auth basic --credentials admin:"password"

and

/root/node_modules/.bin/opensearch-reporting-cli --url https://server_name:443/app/dashboards#/view/ce76b220-6803-11ee-8d25-7b18287bc2bf --format pdf --auth basic --credentials admin:"password" --tenant global
/root/node_modules/.bin/opensearch-reporting-cli --url https://server_name:443/app/dashboards#/view/ce76b220-6803-11ee-8d25-7b18287bc2bf --format pdf --auth basic --credentials admin:password --tenant global
i have also tried the shorturl version

/root/node_modules/.bin/opensearch-reporting-cli --url https://server_name:443//app/dashboards?security_tenant=global#/view/ce76b220-6803-11ee-8d25-7b18287bc2bf--format pdf --auth basic --credentials admin:password --tenant global
but the message

(Use node --trace-warnings ... to show where the warning was created)
✖ Invalid username or password
✖ Downloading report failed. TypeError: exit is not a function

is there a way to maybe run this in debug mode to get more output information?

@rupal-bq
Copy link
Contributor

Hi @JumpyWizard404, the fix is merged but it isn't part of v1.0.0. We'll release patch v1.1.0 for the bug fixes.

@rupal-bq
Copy link
Contributor

Closing this as it's resolved in v1.1.0. Please create issue if you are still getting any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.1.0
Projects
None yet
Development

No branches or pull requests

5 participants