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

Hide/Block the Wazuh app depending on the selected Kibana space #1601

Closed
jesusgn90 opened this issue Jul 12, 2019 · 7 comments
Closed

Hide/Block the Wazuh app depending on the selected Kibana space #1601

jesusgn90 opened this issue Jul 12, 2019 · 7 comments
Assignees
Labels
request/operational Operational requests type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side

Comments

@jesusgn90
Copy link
Contributor

Describe the solution you'd like
Certain complex environments are using custom spaces from Kibana, users want to restrict/filter the usage of the Wazuh app depending on the user's active space.

Describe alternatives you've considered

  • Explore spaces feature, we might achieve it with no development.
  • If the first idea doesn't work, let's develop some code in the Wazuh app for blocking users depending on the active space. This will probably be the solution.

Since we don't know the effort for this task yet, we can't tell you which version will be the release for this feature, however, I think we can reach it for the next minor (3.10) where the app is compatible with custom spaces. Stay updated tracking this ticket.

@jesusgn90 jesusgn90 added frontend type/enhancement Enhancement issue request/operational Operational requests UI/UX Generic label for things related to the font-end side labels Jul 12, 2019
@jesusgn90 jesusgn90 added this to To do in Wazuh TBD via automation Jul 12, 2019
@jesusgn90 jesusgn90 added this to To do in Wazuh 3.11.0 via automation Jul 22, 2019
@jesusgn90 jesusgn90 removed this from To do in Wazuh TBD Jul 22, 2019
@jesusgn90
Copy link
Contributor Author

Here is a tiny follow up about this task:

After some researching and with a 3.10 app (which is compatible with custom spaces), we've concluded that we may want to add a new setting for the config.yml file.

This new setting would be an array of namespaces, that's said, it would look like the next block by default (allow all spaces):

#spaces.allowed: ['*']

Possible customizations would be:

spaces.allowed: ['*'] --> all spaces are allowed
spaces.allowed: [ ]   --> same as '*' ?
spaces.allowed: ['default', 'staging'] --> only 'default' and 'staging' spaces are allowed
spaces.allowed: ['staging', '*'] --> all spaces are allowed ?
spaces.allowed: [-1, null, 'foo'] --> invalid content, all spaces are allowed? just the 'default' space is allowed?

The easy way would be to make the app be still visible, but users wouldn't see anything inside the app if their spaces are not allowed, something similar to the index patterns lock we are doing with X-Pack.

Another way would be to fully hide the Wazuh app, but I'm not sure if this would be possible from the app itself (the app would hide the app...).

Regards

@jesusgn90
Copy link
Contributor Author

jesusgn90 commented Aug 13, 2019

Update

After more researching, we've found a cleaner and simpler way to achieve this task.

If we put the next block on the init plugin function:

    init(server, options) {
      // Kibana spaces locker
      const xpackMainPlugin = server.plugins.xpack_main;
      xpackMainPlugin.registerFeature({
        id: 'wazuh',
        name: 'Wazuh',
        app: ['wazuh','kibana','elasticsearch'],
        navLinkId: 'wazuh',
        privileges: {}
      });

      return initApp(server, options);
    }

Our plugin would be available on the plugins list for any custom space:

image

Allowing us to enable/disable the app as native plugins do:

image

There is a tiny issue (elastic/kibana#43184) in the plugins list about the icon because it's a third-party app, the EUI icons don't know about our icon:

image

Next thing to explore is about the plugin space-related privileges:

privileges: {}

It only affects once security is enabled, we need to test it before adding more feedback here.

We also need to make it work on OSS distributions.

@jesusgn90 jesusgn90 removed this from To do in Wazuh 3.11.0 Aug 14, 2019
@jesusgn90 jesusgn90 added this to To do in Wazuh 3.10.0 via automation Aug 14, 2019
@jesusgn90 jesusgn90 added this to the 33rd week sprint milestone Aug 14, 2019
@jesusgn90 jesusgn90 self-assigned this Aug 14, 2019
@jesusgn90 jesusgn90 moved this from To do to In progress in Wazuh 3.10.0 Aug 14, 2019
@jesusgn90 jesusgn90 moved this from In progress to Needs review in Wazuh 3.10.0 Aug 14, 2019
Wazuh 3.10.0 automation moved this from Needs review to Done Aug 16, 2019
@cr0wg4n
Copy link

cr0wg4n commented Oct 7, 2020

Hi! @jesusgn90, I try to remove Wazuh App in the kibana's features, but it doesn't appear to disable, I need Wazuh enabled and disabled by space, this behaviour is normal?, I'm using the wazuh/wazuh-kibana:3.13.2_7.9.1 image
image.
Thank you.

@jsanchez91
Copy link
Contributor

Kibana's last release has some changes and we lost this feature. We are currently working on adapting the plugin to Kibana's changes, we hope to have everything ready as soon as possible.

We will inform you with any updates

@cr0wg4n
Copy link

cr0wg4n commented Oct 8, 2020

Kibana's last release has some changes and we lost this feature. We are currently working on adapting the plugin to Kibana's changes, we hope to have everything ready as soon as possible.

We will inform you with any updates

I'm using wazuh/wazuh-kibana:3.13.1_7.8.0 image right now and the feature that I want is there, thank you so much

@cruggieri
Copy link

Hi, any news on this?
We have a lot of kibana spaces but we need to have one dedicated to wazuh.

Do you have any preview when this feature could be fixed?
Thanks

@frankeros
Copy link
Contributor

frankeros commented Apr 14, 2021

Hi @cruggieri
I´m afraid not.
But we'll try to improve a way to do this more simply.
I created this issue #3164 to carry on with the enhancement.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/operational Operational requests type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side
Projects
No open projects
Wazuh 3.10.0
  
Done
Development

No branches or pull requests

5 participants