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

Fixing error that shows we're using X-Pack when we have Basic #3692

Conversation

CPAlejandro
Copy link
Contributor

@CPAlejandro CPAlejandro commented Nov 24, 2021

SHOULD_TEST=FALSE
Hi guys,

We are fixing a bad behaviour that's shows to Wazuh app like we are using X-Pack when we have Basic Security.

To test it:

Test with X-Pack, Basic and ODFE and be sure that the app is receiving properly which security plugin you are using.

Close this comment

@CPAlejandro CPAlejandro self-assigned this Nov 24, 2021
@CPAlejandro CPAlejandro added the type/bug Bug issue label Nov 24, 2021
@@ -1060,7 +1060,7 @@ export class WazuhApiCtrl {

const disabledRoles = ( await getConfiguration() )['disabled_roles'] || [];
const logoSidebar = ( await getConfiguration() )['customization.logo.sidebar'] || 'icon_blue.png';
const wazuhSecurity = SecurityObj(context.wazuh.plugins);
const wazuhSecurity = await SecurityObj(context.wazuh.plugins, context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: use the context.wazuh.security instead of create another security object.

@sortiz1191 sortiz1191 self-requested a review November 24, 2021 09:48
Comment on lines 24 to 32
try {
const responseCurl = await context.core.elasticsearch.client.asInternalUser.transport.request(
params
);
} catch (error) {
return !!opendistroSecurityKibana
? new OpendistroFactory(opendistroSecurityKibana)
: new DefaultFactory();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: The request to check if X-Pack is enabled should be done only if security plugin is installed.

CPAlejandro and others added 3 commits November 24, 2021 11:08
…-X-Pack' of github.com:wazuh/wazuh-kibana-app into fix/Fixing-error-with-Basic-that-shows-like-we're-using-X-Pack
Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review:

Code Review: LGTM

@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 3.97% ( 1443 / 36355 )
Branches 1.6% ( 453 / 28400 )
Functions 2.91% ( 259 / 8889 )
Lines 4.02% ( 1398 / 34743 )

Copy link
Contributor

@sortiz1191 sortiz1191 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: 🟢
Testing: 🟢 (For Basic & ODFE)

@eze9252 eze9252 added the 4.3 label Nov 30, 2021
@MauGaP MauGaP changed the base branch from 4.3-7.10 to 4.3-7.10---RC1 November 30, 2021 13:54
@MauGaP MauGaP merged commit ed099e5 into 4.3-7.10---RC1 Nov 30, 2021
@MauGaP MauGaP deleted the fix/Fixing-error-with-Basic-that-shows-like-we're-using-X-Pack branch November 30, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants