Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add workspace agent connect and app open audit types#16493

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedFeb 7, 2025
edited
Loading

This commit adds new audit resource types for workspace agents and
workspace apps, as well as connect/disconnect and open/close actions.

The idea is that we will log new audit events for connecting to the
agent via SSH/editor.

Likewise, we will log openings ofcoder_apps.

This change also introduces support for filtering byrequest_id.

Updates#15139

@mafredrimafredriforce-pushed themafredri/feat-add-audit-types-for-connect-open-agent-app branch 2 times, most recently from63cac18 to8128b7eCompareFebruary 7, 2025 14:39
Copy link
Member

@EmyrkEmyrk left a comment
edited
Loading

Choose a reason for hiding this comment

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

This approach will work, however the downside is you cannot easily relate it to a workspace.

You can do a search query such asresource_id:57893b46-9763-498a-b22b-f208d7d719bc in the audit logs to see the workspace audit logs.

If we setResourceID to return the workspace ID for these resources, then this would show up there. I do understand though that these resources are unique from each other... 🤔

My only comment is I wonder if we can relate it to the workspace somehow.

Edit: I had an idea a long time ago to "link" audit log entries:#5419

This approach might just be the way we do it without any linking.

@mafredri
Copy link
MemberAuthor

mafredri commentedFeb 10, 2025
edited
Loading

@Emyrk thanks for raising the issue of associating the resource with a workspace, that's definitely something we want.

While it sounds useful, It's not clear to me how we'd apply#5419 in the context of this feature.

My guess is that being able to show the following information is more valuable than linking to the exact resource that was accessed:

  • Steven connected to<workspace> via<editor>
  • Steven opened<app> in<workspace>

So it sounds to me like we should just use the workspace ID (or is it workspace build ID?), although I'm not sure how we should reference the app. Do we just use additional fields in this case to add the context? (I.e. the connection type like editor/ssh or app slug)

@Emyrk
Copy link
Member

While it sounds useful, It's not clear to me how we'd apply#5419 in the context of this feature.

I agree it's not directly applicable. In short, I think there is some value in having "linked" audit entries, or possibly more complex audit entries to cover cases like this.

My guess is that being able to show the following information is more valuable than linking to the exact resource that was accessed:

  • Steven connected to<workspace> via<editor>
  • Steven opened<app> in<workspace>

So it sounds to me like we should just use the workspace ID (or is it workspace build ID?), although I'm not sure how we should reference the app. Do we just use additional fields in this case to add the context? (I.e. the connection type like editor/ssh or app slug)

Usingworkspace_id would link all appropriate logs to the workspace. You have a good point thatworkspace_build would be more accurate, and then where do we place the uuid for the app/etc?

I was thinking from a product UX, it makes the most sense to put in the workspace uuid.


The solution might be too much for this PR. It might be worth having some other effort to link things together, or add more uuids, or do w/e is required to allow "Workspace Audit Logs" be a view we support.

@mafredrimafredriforce-pushed themafredri/feat-add-audit-types-for-connect-open-agent-app branch 2 times, most recently fromde017dc to640a0c3CompareFebruary 11, 2025 12:10
Copy link
MemberAuthor

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

@Emyrk if we are happy with the approach of:

I think this PR is ready for a proper review. Promoting from draft.

Emyrk reacted with thumbs up emoji
@mafredrimafredri marked this pull request as ready for reviewFebruary 11, 2025 13:15
@mafredrimafredri requested a review fromEmyrkFebruary 11, 2025 13:15
@mafredrimafredriforce-pushed themafredri/feat-add-audit-types-for-connect-open-agent-app branch fromdebcf9c to58f1d2aCompareFebruary 12, 2025 14:22
This commit adds new audit resource types for workspace agents andworkspace apps, as well as connect and open actions.The idea is that we will log new audit events for connecting to theagent via editor or SSH.Likewise, we will log openings of `coder_app`s.Updates#15139
@mafredrimafredriforce-pushed themafredri/feat-add-audit-types-for-connect-open-agent-app branch froma9b4adf to88f22b7CompareFebruary 12, 2025 15:04
@mafredrimafredriforce-pushed themafredri/feat-add-audit-types-for-connect-open-agent-app branch from88f22b7 to469e2cdCompareFebruary 12, 2025 18:28
@mafredri
Copy link
MemberAuthor

@Emyrk are there still any changes you would like to see in this PR? If not I think it’s ready for a final round.

Emyrk reacted with heart emoji

@mafredrimafredri requested a review fromEmyrkFebruary 12, 2025 21:18
@mafredrimafredrienabled auto-merge (squash)February 17, 2025 12:55
@mafredrimafredri merged commitb5329ae intomainFeb 17, 2025
35 of 37 checks passed
@mafredrimafredri deleted the mafredri/feat-add-audit-types-for-connect-open-agent-app branchFebruary 17, 2025 13:02
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 17, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mafredri@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp