Skip to content
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

Include access request metadata in app.session.start events #48663

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

rudream
Copy link
Contributor

@rudream rudream commented Nov 8, 2024

Purpose

This PR resolves #46622

This PR fixes an issue where access request metadata was not included in app.session.start events when an app was launched while assuming an access request.

Before

{
  "app_name": "pgadmin",
  "app_public_addr": "localhost",
  "app_uri": "http://localhost:5050/",
  "cluster_name": "im-a-nodename",
  "code": "T2007I",
  "ei": 0,
  "event": "app.session.start",
  "namespace": "default",
  "public_addr": "localhost",
  "server_id": "59f4906c-d997-4b77-b5cb-0b29346f6469",
  "server_version": "17.0.0-dev",
  "sid": "a501122ed99288081450acd661cbf801e7bd4b3a86244a615898020ffc300056",
  "time": "2024-11-08T09:05:55.206Z",
  "uid": "09b89978-b76c-460d-9e2c-bb2d85b893d4",
  "user": "alice",
  "user_kind": 1
}

After

{
  "access_requests": [
    "01930b05-6315-7c48-944d-33eb23b33400"
  ],
  "app_name": "pgadmin",
  "app_public_addr": "localhost",
  "app_uri": "http://localhost:5050/",
  "cluster_name": "im-a-nodename",
  "code": "T2007I",
  "ei": 0,
  "event": "app.session.start",
  "namespace": "default",
  "public_addr": "localhost",
  "server_id": "59f4906c-d997-4b77-b5cb-0b29346f6469",
  "server_version": "17.0.0-dev",
  "sid": "29288f72a81f763bbd2e64c7babab39dcf4318e8e1a86054ae625b9584c5d28e",
  "time": "2024-11-08T09:10:29.787Z",
  "uid": "037644e2-f658-4a86-ad89-65267d23e380",
  "user": "alice",
  "user_kind": 1
}

changelog: Fix missing access request metadata in app.session.start audit events

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-48663.d3pp5qlev8mo18.amplifyapp.com

lib/auth/sessions.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bl-nero bl-nero left a comment

Choose a reason for hiding this comment

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

Taking Yassine's argument that a proper test would require enormous amount of setup code for little value added, I'm approving this PR.

@rudream rudream force-pushed the yassine/app-session-access-request-metadata branch from 5c5353d to 3e6ca81 Compare November 12, 2024 11:49
@rudream rudream added this pull request to the merge queue Nov 12, 2024
Merged via the queue into master with commit 7baff68 Nov 12, 2024
40 checks passed
@rudream rudream deleted the yassine/app-session-access-request-metadata branch November 12, 2024 12:24
@public-teleport-github-review-bot

@rudream See the table below for backport results.

Branch Result
branch/v16 Create PR
branch/v17 Create PR

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

Successfully merging this pull request may close these issues.

app.session.start events no longer include access requests
3 participants