Skip to content

Commit

Permalink
[4.0-7.10] Removed kibana alert for security (#2806)
Browse files Browse the repository at this point in the history
* Removed kibana alert for security

* Added validation for security_oss

* Rename plugin dependency to securityOss

* Added securityOss as required plugin
  • Loading branch information
frankeros authored Jan 26, 2021
1 parent dd9df25 commit 74a11c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"charts",
"savedObjects",
"kibanaReact",
"kibanaUtils"
"kibanaUtils",
"securityOss"
],
"optionalPlugins": ["security", "opendistroSecurityKibana", "searchguard", "spaces"],
"server": true,
Expand Down
6 changes: 6 additions & 0 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
}

public async start(core: CoreStart, plugins: AppPluginStartDependencies): Promise<WazuhStart> {
// hide security alert
if(plugins.securityOss) {
plugins.securityOss.insecureCluster.hideAlert(true);
}

// we need to register the application service at setup, but to render it
// there are some start dependencies necessary, for this reason
// initializeInnerAngular + initializeServices are assigned at start and used
Expand All @@ -84,6 +89,7 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
this.innerAngularInitialized = true;
};


setCore(core);
setPlugins(plugins);
setHttp(core.http);
Expand Down
4 changes: 3 additions & 1 deletion public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import { DiscoverStart } from '../../../src/plugins/discover/public';
import { VisualizationsSetup, VisualizationsStart } from '../../../src/plugins/visualizations/public';
import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../src/plugins/data/public';
import { NavigationPublicPluginStart } from '../../../src/plugins/navigation/public';
import { UiActionsSetup } from 'src/plugins/ui_actions/public';
import { UiActionsSetup } from '../../../src/plugins/ui_actions/public';
import { SecurityOssPluginStart } from '../../../src/plugins/security_oss/public/';

export interface AppPluginStartDependencies {
navigation: NavigationPublicPluginStart;
data: DataPublicPluginStart;
visualizations: VisualizationsStart;
discover: DiscoverStart;
charts: ChartsPluginStart
securityOss: SecurityOssPluginStart
}
export interface AppDependencies {
core: CoreStart;
Expand Down

0 comments on commit 74a11c3

Please sign in to comment.