Skip to content

Implement entity_id. Issue #155 #171

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Implement entity_id. Issue #155 #171

wants to merge 1 commit into from

Conversation

haesbaert
Copy link
Collaborator

@haesbaert haesbaert commented May 14, 2025

This implements the 12 byte entity id as defined in https://www.elastic.co/docs/reference/ecs/ecs-process#field-process-entity-id

We can't depend on dynamic linking of md or openssl, so include a standlone MIT licensed sha256 implementation from https://github.com/ilvn/SHA256, they claim to be formally verified, so that's something.

We now also have to link against resolv so we can get the base64 functions, that's ok, beats already links against it.

This is a WIP as I want to make sure we compute the very same entity_id as gosysinfo and friends.

@haesbaert
Copy link
Collaborator Author

I think I can use a weak symbol from md or openssl, it seems they both provide strong symbols, so by including ours as a weak symbol it should work as a fallback.
Also, no b64_ntop in musl, so have to provide one.

This implements the 12 byte entity id as defined in
https://www.elastic.co/docs/reference/ecs/ecs-process#field-process-entity-id

We can't depend on dynamic linking of md or openssl, so include a standlone MIT
licensed sha256 implementation from https://github.com/ilvn/SHA256, they claim
to be formally verified, so that's something.

We now also have to link against resolv so we can get the base64 functions,
that's ok, beats already links against it.

This is a WIP as I want to make sure we compute the very same entity_id as
gosysinfo and friends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant