Skip to content

Commit

Permalink
[workspace] support user upload ssh keys
Browse files Browse the repository at this point in the history
Co-authored-by: Huiwen <[email protected]>
Co-authored-by: Christian Weichel <[email protected]>
Co-authored-by: Pavel Tumik <[email protected]>
  • Loading branch information
4 people committed Jun 15, 2022
1 parent f0daee2 commit b458861
Show file tree
Hide file tree
Showing 16 changed files with 1,809 additions and 352 deletions.
3 changes: 3 additions & 0 deletions components/common-go/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const (

// WorkspaceExposedPorts contains the exposed ports in the workspace
WorkspaceExposedPorts = "gitpod/exposedPorts"

// WorkspaceSSHPublicKeys contains all authorized ssh public keys that can be connected to the workspace
WorkspaceSSHPublicKeys = "gitpod.io/sshPublicKeys"
)

// WorkspaceSupervisorEndpoint produces the supervisor endpoint of a workspace.
Expand Down
24 changes: 24 additions & 0 deletions components/ws-manager-api/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ service WorkspaceManager {

// deleteVolumeSnapshot asks ws-manager to delete specific volume snapshot and delete source from cloud provider as well
rpc DeleteVolumeSnapshot(DeleteVolumeSnapshotRequest) returns (DeleteVolumeSnapshotResponse) {}

// UpdateSSHKey update ssh keys
rpc UpdateSSHKey(UpdateSSHKeyRequest) returns (UpdateSSHKeyResponse) {}
}

// MetadataFilter describes conditions for matching a set of workspaces.
Expand Down Expand Up @@ -252,6 +255,18 @@ message BackupWorkspaceResponse {
string url = 1;
}

// UpdateSSHKeyRequest update ssh public key
message UpdateSSHKeyRequest {
// ID is the unique identifier of the workspace
string id = 1;

// keys is a set of authorized_keys
repeated string keys = 2;
}

// UpdateSSHKeyResponse is the answer to a upload ssh key request
message UpdateSSHKeyResponse {}

// WorkspaceStatus describes a workspace status
message WorkspaceStatus {
// ID is the unique identifier of the workspace
Expand Down Expand Up @@ -534,6 +549,9 @@ message StartWorkspaceSpec {

// volume_snapshot to use to restore PVC from, if set
VolumeSnapshotInfo volume_snapshot = 14;

// ssh_public_keys is user's uploaded ssh public keys
repeated string ssh_public_keys = 15;
}

// WorkspaceFeatureFlag enable non-standard behaviour in workspaces
Expand Down Expand Up @@ -618,3 +636,9 @@ message ExposedPorts {
// ports is the set of ports which ought to be exposed to the internet
repeated PortSpec ports = 1;
}

// SSHPublicKeys describes the user's uploaded ssh public keys, it will be used only in annotations.
message SSHPublicKeys {
// keys is the set of ssh public key
repeated string keys = 1;
}
Loading

0 comments on commit b458861

Please sign in to comment.