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

Cannot specifically identify which key to delete with the deleteSshKey mutation #2384

Open
cdchris12 opened this issue Dec 7, 2020 · 0 comments
Labels
1-api-auth API & Authentication subsystem
Milestone

Comments

@cdchris12
Copy link
Contributor

Describe the bug

The deleteSshKey mutation only allows for selecting an SSH key based upon the key's name, which is not a globally unique key in the database. As a result, it is not possible to specify exactly which key Lagoon should delete with this query.

To Reproduce

Steps to reproduce the behavior:

  1. Add two different keys to the API with the same name
  2. Check the ssh_keys table in the api_db to verify that both keys exist there with the same name as expected.
  3. Attempt to remove only one of those keys using the deleteSshKey mutation

Expected behavior

Lagoon should allow the deletion of an SSH key based on something which can be guaranteed to be globally unique, such as the public key string itself or the id of the ssh key in the db, as that auto increments to ensure uniqueness.

Additional context

Quasi-related to #2085 , though I feel this is different enough to warrant its own issue.

@cdchris12 cdchris12 added the 1-api-auth API & Authentication subsystem label Dec 7, 2020
@cdchris12 cdchris12 added this to the v1.13.0 milestone Dec 7, 2020
@Schnitzel Schnitzel modified the milestones: v1.13.0, v1.13.2 Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-api-auth API & Authentication subsystem
Projects
None yet
Development

No branches or pull requests

2 participants