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

Add client id to tag instance model and block cross-client tag instance deletion #40

Open
marksparkza opened this issue Jan 8, 2025 · 0 comments

Comments

@marksparkza
Copy link
Member

API tag instance deletion checks that the authorized user id is the same as the user id on the tag instance to be deleted, failing with a 403 if they are different. This prevents users from deleting tag instances created by other users. But if the tag instance was created by a machine client (client credentials grant), it can be deleted by a different machine client, since tag instance user id is null, as is the auth user id.

The originating client id should be stored on a tag instance, which would enable the API to prevent a machine client from deleting a tag instance that it didn't create. Note that this only applies to non-user tag instances; we shouldn't prevent a user from deleting their own tag instances if creating and deleting via different clients.

This would also be useful informationally - to show the origin of a tag instance created by a machine client in a UI.

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

No branches or pull requests

1 participant