Skip to content

Include system annotations in audit event entries for access requests#40045

Merged
lxea merged 2 commits intomasterfrom
lxea/audit-log-annotations
Apr 2, 2024
Merged

Include system annotations in audit event entries for access requests#40045
lxea merged 2 commits intomasterfrom
lxea/audit-log-annotations

Conversation

@lxea
Copy link
Copy Markdown
Contributor

@lxea lxea commented Mar 29, 2024

Example access request with this change:

{
  "annotations": {
    "hello": [
      "hello"
    ]
  },
  "cluster_name": "localhost",
  "code": "T5000I",
  "ei": 0,
  "event": "access_request.create",
  "expires": "2024-03-31T01:18:59.523355715Z",
  "id": "018e8ba6-aac2-7edd-b97b-eba3ad0bb222",
  "max_duration": "2024-03-31T01:18:59.523355715Z",
  "roles": [
    "editor"
  ],
  "state": "PENDING",
  "time": "2024-03-29T19:18:59.552Z",
  "uid": "87c17476-6a64-4349-80c1-da618767723e",
  "user": "alex.mcgrath@goteleport.com",
  "user_kind": 1
}

Fix for #39747

changelog: include system annotations in audit event entries for access requests

Copy link
Copy Markdown
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

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

Looks good, minor comments.

Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Copy link
Copy Markdown
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

lgtm with Alan's comments but can we have test coverage here please?

@lxea lxea force-pushed the lxea/audit-log-annotations branch from ce47b2e to d6d165b Compare April 2, 2024 13:15
Comment thread lib/auth/auth_test.go Outdated
Comment thread lib/auth/auth_test.go Outdated
@lxea lxea force-pushed the lxea/audit-log-annotations branch from d6d165b to c6179d7 Compare April 2, 2024 13:59
@lxea lxea added this pull request to the merge queue Apr 2, 2024
Merged via the queue into master with commit e087afb Apr 2, 2024
@lxea lxea deleted the lxea/audit-log-annotations branch April 2, 2024 16:36
@public-teleport-github-review-bot
Copy link
Copy Markdown

@lxea See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Create PR
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants