Skip to content

include expiration in audit log lock event#26421

Merged
stevenGravy merged 9 commits intomasterfrom
stevenGravy/lockauditlog
Dec 18, 2023
Merged

include expiration in audit log lock event#26421
stevenGravy merged 9 commits intomasterfrom
stevenGravy/lockauditlog

Conversation

@stevenGravy
Copy link
Copy Markdown
Contributor

@stevenGravy stevenGravy commented May 17, 2023

If a expiration was set it wasn't included in the audit log for lock create events. Currenlty it's always

"expires": "0001-01-01T00:00:00Z",

Now it will set the expires as in this case when it's 2m away. 0001-01-01T00:00:00Z will show for never expires.

{
  "cluster_name": "teleport.example.com",
  "code": "TLK00I",
  "ei": 0,
  "event": "lock.created",
  "expires": "2023-05-17T02:18:35.44638Z",
  "name": "56642c1f-441b-46ae-ab4c-de4872c891f2",
  "target": {
    "role": "auditor"
  },
  "time": "2023-05-17T02:16:35.451Z",
  "uid": "5343ca78-4984-49de-932c-a2a665d93cc6",
  "updated_by": "steven",
  "user": "steven"
}

Updated test to include a time comparison.

changelog: Lock expiration time included in Audit Log Lock Create events

@stevenGravy stevenGravy enabled auto-merge May 17, 2023 03:30
Comment thread lib/auth/access.go
Comment thread lib/auth/access_test.go
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

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

minor suggestion

Comment thread lib/auth/access.go Outdated
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from jimbishopp December 18, 2023 22:16
@stevenGravy stevenGravy added this pull request to the merge queue Dec 18, 2023
Merged via the queue into master with commit 6ba9914 Dec 18, 2023
@stevenGravy stevenGravy deleted the stevenGravy/lockauditlog branch December 18, 2023 23:06
@public-teleport-github-review-bot
Copy link
Copy Markdown

@stevenGravy See the table below for backport results.

Branch Result
branch/v12 Failed
branch/v13 Failed
branch/v14 Failed

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.

3 participants