Skip to content

Commit 4b2f218

Browse files
committed
[workspace] support user upload ssh keys
1 parent 12b58f4 commit 4b2f218

File tree

14 files changed

+1757
-578
lines changed

14 files changed

+1757
-578
lines changed

components/common-go/kubernetes/kubernetes.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ const (
6262

6363
// WorkspaceExposedPorts contains the exposed ports in the workspace
6464
WorkspaceExposedPorts = "gitpod/exposedPorts"
65+
66+
// WorkspaceSSHPublicKeys contains the authorize ssh public key connection to workspace
67+
WorkspaceSSHPublicKeys = "gitpod/sshPublicKeys"
6568
)
6669

6770
// WorkspaceSupervisorEndpoint produces the supervisor endpoint of a workspace.

components/ws-manager-api/core.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ service WorkspaceManager {
4040

4141
// controlAdmission makes a workspace accessible for everyone or for the owner only
4242
rpc ControlAdmission(ControlAdmissionRequest) returns (ControlAdmissionResponse) {}
43+
44+
// UpdateSSHKey update ssh keys
45+
rpc UpdateSSHKey(UpdateSSHKeyRequest) returns (UpdateSSHKeyResponse) {}
4346
}
4447

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

238+
// UpdateSSHKeyRequest update ssh public key
239+
message UpdateSSHKeyRequest {
240+
// ID is the unique identifier of the workspace whose port to control
241+
string id = 1;
242+
243+
// keys is a set of authorized_keys
244+
repeated string keys = 2;
245+
}
246+
247+
// UpdateSSHKeyResponse is the answer to a upload ssh key request
248+
message UpdateSSHKeyResponse {}
249+
235250
// WorkspaceStatus describes a workspace status
236251
message WorkspaceStatus {
237252
// ID is the unique identifier of the workspace
@@ -598,3 +613,9 @@ message ExposedPorts {
598613
// ports is the set of ports which ought to be exposed to the internet
599614
repeated PortSpec ports = 1;
600615
}
616+
617+
// ExposedPorts describes the user uploaded ssh public keys, it will be use only in annotations.
618+
message SSHPublicKeys {
619+
// keys is the set of ssh public key
620+
repeated string keys = 1;
621+
}

0 commit comments

Comments
 (0)