Skip to content

[fga] Introduce sshkeyservice #18479

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

Merged
merged 3 commits into from
Aug 11, 2023
Merged

[fga] Introduce sshkeyservice #18479

merged 3 commits into from
Aug 11, 2023

Conversation

jeanp413
Copy link
Member

@jeanp413 jeanp413 commented Aug 10, 2023

Description

Summary generated by Copilot

🤖 Generated by Copilot at b816b9d

This pull request introduces SSH key management functionality to the server component, by adding a new SSHKeyService class that handles the logic of creating, updating, and deleting SSH keys for users and workspaces. It also adds unit tests for the service class and refactors the GitpodServerImpl class to use the service methods.

Related Issue(s)

Fixes https://linear.app/gitpod/issue/EXP-394/

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@jeanp413 jeanp413 marked this pull request as ready for review August 10, 2023 07:22
@jeanp413 jeanp413 requested a review from a team as a code owner August 10, 2023 07:22
Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

Thanks @jeanp413!
I have added one commit that adds an additional requestorId to the service methods. In this case we don't yet have clients where that is not the same as the userId owning the sshkeys, but we apply this pattern everywhere (first arg is the requestor) to be able to allow other users (e.g. admins) to access any resources.
In the other services we have so far named the first arg userId but that is confusing when we are talking about the user a s a resources, so I opted for changing this to requestorId. We should go through the other services and rename the first argument from userId -> requestorId as well.

@svenefftinge
Copy link
Member

/unhold

@roboquat roboquat merged commit ec7f6d6 into main Aug 11, 2023
@roboquat roboquat deleted the jp/regular-mule branch August 11, 2023 07:48
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.

4 participants