Skip to content

[v16] auditlog: introduce USER_KIND_SYSTEM for system roles#56178

Merged
tigrato merged 1 commit intobranch/v16from
tigrato/add-system-userstate-v16
Jun 27, 2025
Merged

[v16] auditlog: introduce USER_KIND_SYSTEM for system roles#56178
tigrato merged 1 commit intobranch/v16from
tigrato/add-system-userstate-v16

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jun 27, 2025

Backport of #56160 to branch/v16

* auditlog: introduce `USER_KIND_SYSTEM` for system roles

Teleport allows that system roles perform certain actions like creating,
updating or deleting users, roles and access lists when performed by the
Okta integration or creating, updating and deleting apps, kube, dbs
when performed by the discovery service.

When #35881 was
implemented, it only contemplated two states: bot or human. If the
identity wasn't a bot, it was automatically tagged as a human.

This behavior is fine if we only emited audit logs for actions
performed by bots or users, but that's not the case. We also emit for
certain system actions.

When reading the audit log, one can see that the audit log is marked as
user although the username has the format: `<uuid>.<teleportClusterName>`.

This PR attempts to introduce a third user kind - system - that should
identity when the action was performed by a system component. This is a
requirement so that Identity Security can distinguish user actions and
system actions.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato added the no-changelog Indicates that a PR does not require a changelog entry label Jun 27, 2025
@github-actions github-actions Bot requested review from Tener and rosstimothy June 27, 2025 15:08
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from Tener June 27, 2025 18:34
@tigrato tigrato enabled auto-merge June 27, 2025 18:35
@tigrato tigrato added this pull request to the merge queue Jun 27, 2025
Merged via the queue into branch/v16 with commit f4f1402 Jun 27, 2025
46 of 47 checks passed
@tigrato tigrato deleted the tigrato/add-system-userstate-v16 branch June 27, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants