x-pack/solutions/security/plugins/entity_store/README.md
Central place for Entities management and logs extraction.
The Entity Store plugin exposes an Entity Maintainers Framework so that other plugins can register recurring tasks that run in the context of the entity store. Registration is part of the plugin setup contract: consumers call registerEntityMaintainer during their plugin’s setup phase and supply a configuration object.
From the setup contract:
interface EntityStoreSetupContract {
registerEntityMaintainer: RegisterEntityMaintainer;
}
RegisterEntityMaintainer accepts a RegisterEntityMaintainerConfig:
interface RegisterEntityMaintainerConfig {
id: string;
description?: string;
interval: string;
initialState: EntityMaintainerState;
run: EntityMaintainerTaskMethod;
setup?: EntityMaintainerTaskMethod;
}
5m, 1h).setup or run has executed.run. Useful for one-time initialization.The framework schedules all registered maintainers when the Entity Store is installed for a given space.
The framework is namespace aware: each Kibana space gets its own task instance per maintainer (e.g. one task per id per namespace). Registration is global, scheduling is per namespace at install time.
Both methods must return the state object they manage so the framework can store it and expose it in the context for the next iteration.
Both run and setup receive a single context argument with:
namespace, runs (execution count), lastSuccessTimestamp, lastErrorTimestamp.run (or by setup on the first run, or initialState before any execution).Consumers implement their maintenance logic in run (and optionally in setup) using this context and return the updated state so the framework can keep it for the next run.