Skip to content

[Entity Store v2] Add CRUD API#252052

Merged
kubasobon merged 81 commits intomainfrom
entity-store-v2-crud
Feb 24, 2026
Merged

[Entity Store v2] Add CRUD API#252052
kubasobon merged 81 commits intomainfrom
entity-store-v2-crud

Conversation

@kubasobon
Copy link
Copy Markdown
Member

@kubasobon kubasobon commented Feb 6, 2026

Closes #245018

TODO:

  • Add the 3 API routes
  • Add Entity Manager to handle the operations
  • Rebase onto single index code
  • Update Entity schema with missing fields We decided Entity v2 schema changes will get their own PR
  • Support bulk async
  • Update with Unique ID generation
  • Add Scout tests
  • Update documentation Separate PR

@kubasobon kubasobon self-assigned this Feb 6, 2026
@kubasobon kubasobon added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Entity Store (Next) labels Feb 6, 2026
@kubasobon kubasobon force-pushed the entity-store-v2-crud branch from d9aa08d to a95d6e7 Compare February 6, 2026 10:55
@kubasobon
Copy link
Copy Markdown
Member Author

Ready for your re-reviews, gentlemen. @romulets PTAL #252052 (comment) 🙂

Copy link
Copy Markdown
Contributor

@uri-weisman uri-weisman left a comment

Choose a reason for hiding this comment

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

Great job! 🍾

Comment thread x-pack/solutions/security/plugins/entity_store/server/domain/crud_client/utils.ts Outdated
Copy link
Copy Markdown
Contributor

@chennn1990 chennn1990 left a comment

Choose a reason for hiding this comment

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

minor comments

Comment thread x-pack/solutions/security/plugins/entity_store/server/domain/asset_manager.ts Outdated
Comment thread x-pack/solutions/security/plugins/entity_store/server/domain/crud_client/utils.ts Outdated
Comment thread x-pack/solutions/security/plugins/entity_store/server/domain/crud_client/index.ts Outdated
});
}

public async deleteEntity(id: string): Promise<void> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we spoke in slack, we need to align ID behaviour between upsert and delete, should this take the hashed or unhashed ID?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

DELETE endpoint now requires an object containing EUID in request body to remove entities. Example: { entityId: 'generic:this-is-my-id' }


const readyDoc = validateAndTransformDoc(entityType, this.namespace, doc, force);

const { result } = await this.esClient.update({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

chef kiss

Copy link
Copy Markdown
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

🚀 great work

export function hashEuid(id: string): string {
// EUID generation uses MD5. It is not a security-related feature.
// eslint-disable-next-line @kbn/eslint/no_unsafe_hash
return createHash('md5').update(id).digest('hex');

Check warning

Code scanning / CodeQL

Using weak hashing algorithm Medium

weak hashing algorithms
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #10 / discover responsive sidebar should not render buttons in data view picker when in viewer mode
  • [job] [logs] Jest Tests #5 / EndpointScriptEditForm Editing should show file required validation error when fake file picker is removed (and no file is uploaded)
  • [job] [logs] FTR Configs #42 / Serverless Observability - Deployment-agnostic Synthetics API integration tests SyntheticsAPITests CleanUpExtraPackagePolicies it cleans up the extra package policy

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
entityStore 0 1 +1

Total ESLint disabled count

id before after diff
entityStore 0 1 +1

History

cc @kubasobon

@kubasobon kubasobon merged commit edf00b0 into main Feb 24, 2026
17 checks passed
@kubasobon kubasobon deleted the entity-store-v2-crud branch February 24, 2026 11:46
mbondyra added a commit to rgodfrey-elastic/kibana that referenced this pull request Feb 24, 2026
…ps-config-rebase

* commit 'f135f030951237c5e9b0251931441aee3121b31d': (163 commits)
  [CPS] Support data view requests and do not sanitize project_routing in data plugin/resolve indices  (elastic#253654)
  [One Workflow] Execute workflow from historical (elastic#253396)
  [streams][background tasks] gracefully handle non existing stream (elastic#254683)
  [Lens API] Waffle/Mosaic get green as a default color (elastic#254304)
  [Security Solution] Remove prebuilt rules customization callout on Rule Management page (elastic#254386)
  [Workflows] support passing attachments to run_agent step (elastic#251291)
  [One Discover][Logs UX] Update OpenTelemetry Semantic Conventions (elastic#254367)
  [kbn-es] Add --docker flag to yarn es snapshot (elastic#254306)
  [Workplace AI] Remove Data Source Config (elastic#254521)
  [Entity Store v2] Add CRUD API (elastic#252052)
  [CI] Increase type checking machine (elastic#254676)
  [main] Sync bundled packages with Package Storage (elastic#254232)
  Skip flaky test elastic#254625 (elastic#254662)
  Upgrade `@elastic/elasticsearch` to 9.3.1 (elastic#253660)
  [One Workflow] Migrate http step to new connector (elastic#249004)
  [Entity Store] Store EUID Scripts (elastic#254515)
  [APM] Fix Otel missing fields undefined errors (elastic#254271)
  [Console] Add support for documentation links on Serverless (elastic#254489)
  Create edit ILM flow (elastic#253393)
  [Agent Builder] Mid term: minimal recommended model set elastic#12875 (elastic#254560)
  ...
nreese pushed a commit to nreese/kibana that referenced this pull request Feb 25, 2026
Closes elastic#245018

## TODO:
- [x] Add the 3 API routes
- [x] Add Entity Manager to handle the operations
- [x] Rebase onto single index code
- [ ] ~~Update Entity schema with missing fields~~ We decided Entity v2
schema changes will get their own PR
- [x] Support bulk async
- [x] Update with Unique ID generation
- [x] Add Scout tests
- [ ] ~~Update documentation~~ Separate PR

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 11, 2026
Closes elastic#245018

## TODO:
- [x] Add the 3 API routes
- [x] Add Entity Manager to handle the operations
- [x] Rebase onto single index code
- [ ] ~~Update Entity schema with missing fields~~ We decided Entity v2
schema changes will get their own PR
- [x] Support bulk async
- [x] Update with Unique ID generation
- [x] Add Scout tests
- [ ] ~~Update documentation~~ Separate PR

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Entity Store (Next) release_note:skip Skip the PR/issue when compiling release notes v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Entity Store] Adapt CRUD API for ESQL arch

9 participants