Skip to content

add username along with userid to telemetry #2009

@soorya-knox

Description

@soorya-knox

Feature Request

Add username along with user ID (UID) in KubeArmor alerts and telemetry to improve readability and operator experience.

Short Description
Currently, KubeArmor alerts and telemetry only display the numeric UID for processes. While this is technically correct, it is not human-friendly and slows down triage. Security engineers, operators, and auditors must manually resolve UIDs (via /etc/passwd, container inspection, or host lookups) to identify the actual user context.

This becomes even harder in containerized environments across different runtimes (containerd, CRI-O, Podman), where it's difficult to map UIDs to usernames. Lack of username visibility reduces efficiency during incident response and weakens auditing workflows.

Describe the solution you'd like

  • resolve username for hostlogs
  • resolve username for containerlogs

Extend the telemetry schema to include a username field in addition to UID.

{
  "timestamp": 1743579248,
  "updatedTime": "2025-04-02T07:34:08.658306Z",
  "hostName": "rootxrishabh",
  "hostPPid": 35429,
  "hostPid": 209850,
  "ppid": 0,
  "pid": 209850,
  "uid": 1000,
  "parentProcessName": "/snap/code/187/usr/share/code/code",
  "processName": "/usr/bin/git",
  "atags": null,
  "type": "HostLog",
  "source": "/snap/code/187/usr/share/code/code",
  "operation": "Process",
  "resource": "/usr/bin/git -c core.quotepath=false -c color.ui=false blame --root --incremental -- KubeArmor/feeder/feeder.go",
  "cwd": "/home/rootxrishabh/accuknox/KubeArmor/",
  "oid": 0,
  "data": "syscall=SYS_EXECVE",
  "result": "Passed",
  "username": "rootxrishabh"
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions