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

Errors with code 401 have been found in the demo environment #5871

Closed
rauldpm opened this issue Sep 8, 2023 · 1 comment
Closed

Errors with code 401 have been found in the demo environment #5871

rauldpm opened this issue Sep 8, 2023 · 1 comment
Labels
level/task Task issue qa/known Issues that are already known by the QA team type/bug Bug issue

Comments

@rauldpm
Copy link
Member

rauldpm commented Sep 8, 2023

Wazuh Rev Browser
406 46000 Brave/Firefox

Description

In the analysis of the issue wazuh/wazuh#18843 (comment), several 401 errors have been found in the browser console.

Error
wazuh.plugin.js:8 
 POST https://demo.wazuh.info/api/request 401 (Unauthorized)
dispatchXhrRequest	@	wazuh.plugin.js:8
xhr	@	wazuh.plugin.js:8
dispatchRequest	@	wazuh.plugin.js:8
request	@	wazuh.plugin.js:8
wrap	@	wazuh.plugin.js:1
_callee$	@	wazuh.plugin.js:1
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
asyncGeneratorStep	@	wazuh.plugin.js:1
_next	@	wazuh.plugin.js:1
(anonymous)	@	wazuh.plugin.js:1
(anonymous)	@	wazuh.plugin.js:1
request	@	wazuh.plugin.js:1
_callee$	@	wazuh.plugin.js:1
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
asyncGeneratorStep	@	wazuh.plugin.js:1
_next	@	wazuh.plugin.js:1
(anonymous)	@	wazuh.plugin.js:1
(anonymous)	@	wazuh.plugin.js:1
genericReq	@	wazuh.plugin.js:1
_callee2$	@	wazuh.plugin.js:1
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
asyncGeneratorStep	@	wazuh.plugin.js:1
_next	@	wazuh.plugin.js:1
(anonymous)	@	wazuh.plugin.js:1
(anonymous)	@	wazuh.plugin.js:1
apiReq	@	wazuh.plugin.js:1
_callee7$	@	wazuh.chunk.10.js:1
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
agents_preview_asyncGeneratorStep	@	wazuh.chunk.10.js:1
_next	@	wazuh.chunk.10.js:1
(anonymous)	@	wazuh.chunk.10.js:1
(anonymous)	@	wazuh.chunk.10.js:1
getWazuhVersion	@	wazuh.chunk.10.js:1
getWazuhVersion	@	wazuh.chunk.10.js:1
wrapped	@	wazuh.chunk.6.js:17
_callee3$	@	wazuh.chunk.10.js:1
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
register_agent_asyncGeneratorStep	@	wazuh.chunk.10.js:1
_next	@	wazuh.chunk.10.js:1
(anonymous)	@	wazuh.chunk.10.js:1
(anonymous)	@	wazuh.chunk.10.js:1
fetchData	@	wazuh.chunk.10.js:1
(anonymous)	@	wazuh.chunk.10.js:1
is	@	osd-ui-shared-deps.js:436
gc	@	osd-ui-shared-deps.js:436
t.unstable_runWithPriority	@	osd-ui-shared-deps.js:444
ji	@	osd-ui-shared-deps.js:436
bc	@	osd-ui-shared-deps.js:436
Qs	@	osd-ui-shared-deps.js:436
(anonymous)	@	osd-ui-shared-deps.js:436
t.unstable_runWithPriority	@	osd-ui-shared-deps.js:444
ji	@	osd-ui-shared-deps.js:436
Ui	@	osd-ui-shared-deps.js:436
Hi	@	osd-ui-shared-deps.js:436
tc	@	osd-ui-shared-deps.js:436
jc	@	osd-ui-shared-deps.js:436
t.render	@	osd-ui-shared-deps.js:436
(anonymous)	@	wazuh.chunk.6.js:17
$digest	@	osd-ui-shared-deps.js:428
(anonymous)	@	osd-ui-shared-deps.js:428
Jr.completeTask	@	osd-ui-shared-deps.js:428
(anonymous)	@	osd-ui-shared-deps.js:428
setTimeout (async)		
o.defer	@	osd-ui-shared-deps.js:428
$evalAsync	@	osd-ui-shared-deps.js:428
(anonymous)	@	osd-ui-shared-deps.js:428
p	@	osd-ui-shared-deps.js:428
e	@	osd-ui-shared-deps.js:428
o	@	osd-ui-shared-deps.js:428
Promise.then (async)		
e	@	osd-ui-shared-deps.js:428
d	@	osd-ui-shared-deps.js:428
M	@	osd-ui-shared-deps.js:428
(anonymous)	@	osd-ui-shared-deps.js:428
y	@	osd-ui-shared-deps.js:428
Nr.O.all	@	osd-ui-shared-deps.js:428
resolveLocals	@	wazuh.chunk.11.js:48
(anonymous)	@	osd-ui-shared-deps.js:428
(anonymous)	@	osd-ui-shared-deps.js:428
$digest	@	osd-ui-shared-deps.js:428
$apply	@	osd-ui-shared-deps.js:428
(anonymous)	@	osd-ui-shared-deps.js:428
invoke	@	osd-ui-shared-deps.js:428
i	@	osd-ui-shared-deps.js:428
Le	@	osd-ui-shared-deps.js:428
mountWazuhApp	@	wazuh.chunk.29.js:1
_callee$	@	wazuh.chunk.29.js:1
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
asyncGeneratorStep	@	wazuh.chunk.29.js:1
_next	@	wazuh.chunk.29.js:1
Promise.then (async)		
asyncGeneratorStep	@	wazuh.chunk.29.js:1
_next	@	wazuh.chunk.29.js:1
(anonymous)	@	wazuh.chunk.29.js:1
(anonymous)	@	wazuh.chunk.29.js:1
_renderApp	@	wazuh.chunk.29.js:1
renderApp	@	wazuh.chunk.29.js:1
_callee$	@	wazuh.plugin.js:25
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
asyncGeneratorStep	@	wazuh.plugin.js:25
_next	@	wazuh.plugin.js:25
Promise.then (async)		
asyncGeneratorStep	@	wazuh.plugin.js:25
_next	@	wazuh.plugin.js:25
Promise.then (async)		
asyncGeneratorStep	@	wazuh.plugin.js:25
_next	@	wazuh.plugin.js:25
Promise.then (async)		
asyncGeneratorStep	@	wazuh.plugin.js:25
_next	@	wazuh.plugin.js:25
(anonymous)	@	wazuh.plugin.js:25
(anonymous)	@	wazuh.plugin.js:25
mount	@	wazuh.plugin.js:25
_callee$	@	core.entry.js:15
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
application_service_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
_callee$	@	core.entry.js:15
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
mount	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
is	@	osd-ui-shared-deps.js:436
os	@	osd-ui-shared-deps.js:436
fc	@	osd-ui-shared-deps.js:436
t.unstable_runWithPriority	@	osd-ui-shared-deps.js:444
ji	@	osd-ui-shared-deps.js:436
dc	@	osd-ui-shared-deps.js:436
Qs	@	osd-ui-shared-deps.js:436
(anonymous)	@	osd-ui-shared-deps.js:436
t.unstable_runWithPriority	@	osd-ui-shared-deps.js:444
ji	@	osd-ui-shared-deps.js:436
Ui	@	osd-ui-shared-deps.js:436
Hi	@	osd-ui-shared-deps.js:436
tc	@	osd-ui-shared-deps.js:436
jc	@	osd-ui-shared-deps.js:436
t.render	@	osd-ui-shared-deps.js:436
start	@	core.entry.js:15
_callee2$	@	core.entry.js:15
tryCatch	@	customImportMapDashboards.plugin.js:13
invoke	@	customImportMapDashboards.plugin.js:13
(anonymous)	@	customImportMapDashboards.plugin.js:13
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
core_system_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
start	@	core.entry.js:15
_callee$	@	core.entry.js:15
u	@	osd-ui-shared-deps.js:382
(anonymous)	@	osd-ui-shared-deps.js:382
(anonymous)	@	osd-ui-shared-deps.js:382
osd_bootstrap_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
osd_bootstrap_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
Promise.then (async)		
osd_bootstrap_asyncGeneratorStep	@	core.entry.js:15
_next	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
(anonymous)	@	core.entry.js:15
_osdBootstrap__	@	core.entry.js:15
__osdBootstrap__	@	core.entry.js:15
(anonymous)	@	bootstrap.js:179
innerCb	@	bootstrap.js:108
load (async)		
loadScript	@	bootstrap.js:98
(anonymous)	@	bootstrap.js:117
load	@	bootstrap.js:104
window.onload	@	bootstrap.js:122
load (async)		
(anonymous)	@	bootstrap.js:48

The following line has also been observed in the Wazuh dashboard service that may be related

Sep 07 19:47:48 ip-10-0-0-232.us-west-1.compute.internal opensearch-dashboards[20957]: {"type":"response","@timestamp":"2023-09-07T19:47:48Z","tags":[],"pid":20957,"method":"get","statusCode":401,"req":{"url":"/favicon.ico","method":"get","headers":{"host":"10.0.0.232:5601","connection":"close","user-agent":"Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)","accept-encoding":"gzip"},"remoteAddress":"10.0.0.232","userAgent":"Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)"},"res":{"statusCode":401,"responseTime":3,"contentLength":9},"message":"GET /favicon.ico 401 3ms - 9.0B"}

Preconditions

  1. --

Steps to reproduce

  1. Navigate to Alerting
  2. Go back to Main
  • It has also been found in Wazuh -> Modules -> Ubuntu -> Amazon AWS and Wazuh -> Management -> Rules (change from env2 to env1)

Expected Result

  1. There should be no 401 error (No abnormal behavior observed in the interface)

Current Result

  1. There should be no 401 error
@rauldpm rauldpm added type/bug Bug issue level/task Task issue labels Sep 8, 2023
@rauldpm rauldpm changed the title Found 401 errors accessing sections of the Wazuh app Errors with code 401 have been found in the demo environment Sep 8, 2023
@AlexRuiz7
Copy link
Member

A single 401 is expected as the UI needs to log in into the new environment (Wazuh API). When a 401 is received, the UI attempts the login and then continues.

@gdiazlo gdiazlo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2023
@davidjiglesias davidjiglesias added the qa/known Issues that are already known by the QA team label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue qa/known Issues that are already known by the QA team type/bug Bug issue
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants