Skip to content

Commit

Permalink
[workspace] support user upload ssh keys
Browse files Browse the repository at this point in the history
  • Loading branch information
iQQBot committed Jun 13, 2022
1 parent 12b58f4 commit 4b2f218
Show file tree
Hide file tree
Showing 14 changed files with 1,757 additions and 578 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 @@ -62,6 +62,9 @@ const (

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

// WorkspaceSSHPublicKeys contains the authorize ssh public key connection to workspace
WorkspaceSSHPublicKeys = "gitpod/sshPublicKeys"
)

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

// controlAdmission makes a workspace accessible for everyone or for the owner only
rpc ControlAdmission(ControlAdmissionRequest) returns (ControlAdmissionResponse) {}

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

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

// UpdateSSHKeyRequest update ssh public key
message UpdateSSHKeyRequest {
// ID is the unique identifier of the workspace whose port to control
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 @@ -598,3 +613,9 @@ message ExposedPorts {
// ports is the set of ports which ought to be exposed to the internet
repeated PortSpec ports = 1;
}

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

0 comments on commit 4b2f218

Please sign in to comment.