x-pack/solutions/security/plugins/security_solution_ess/README.md
The security_solution_ess plugin is an internal plugin for Kibana's Security Solution, designed to encapsulate ESS-specific logic.
This plugin is only enabled when the application is built for stateful deployments (ESS or on-prem), keeping the main security_solution plugin clean and agnostic of the offering model.
The term ESS used by this plugin is not strictly referring to Cloud deployments, it's used to refer to all stateful deployments (non-serverless), including on-prem instances.
The primary goal of the security_solution_ess plugin is to:
security_solution plugin.The security_solution_ess plugin depends on the main security_solution plugin, it can import code from it though the use of agnostic packages is preferred, and they interact through the plugin lifecycle contract.
This architecture allows the security_solution_ess plugin to:
security_solution plugin remains offering-agnostic by using APIs for ess-specific behavior only when necessary.security_solution): Exposes an API in its plugin lifecycle contract for components and configurations that depend on the offering.security_solution_ess): Utilizes the exposed API to inject or modify the application according to ess-specific content and logic.The following example demonstrates how the security_solution_ess plugin interacts with the main security_solution plugin via a contract API.
It exposes a setter to the contract API for usersUrl, which is an offering-specific value. The security_solution_ess plugin uses these APIs to inject the ess-specific URL into the main plugin.
The PluginContract class in the main Security Solution plugin simplifies the usage of contract APIs, storing the values and providing a getter to the application using the Kibana services context.
security_solution/public/plugin_contract.ts
export class PluginContract {
usersUrl: string;
public getStartContract() {
return {
setUsersUrl: (url: string) => {
this.usersUrl = url;
}
};
}
public getStartServices() {
return {
getUsersUrl: () => this.usersUrl; // available via useKibana().services.getUsersUrl()
};
}
}
security_solution_ess/public/plugin.ts
export class Plugin {
public start(core: CoreStart, deps: SecuritySolutionEssStartDeps) {
deps.securitySolution.setUsersUrl(deps.application.getUrlForApp('management', { path: 'security/users' }));
}
}
If you're looking to contribute to this plugin, please follow the standard contribution guidelines of the Security Solution plugin. Ensure that all changes are tested in a ESS environment.
This plugin is licensed under the Elastic License. See the LICENSE file for more details.