dashboard,cmd/buildlet,cmd/coordinator: public key auth on windows
Enable public key auth for windows buildlets. Previously the
username/password was hardcoded.
This change enables the `/connect-ssh` http endpoint on the buildlet to setup
authorized_keys and uses the coordinator to proxy ssh traffic to the
buildlet.
Validation:
- run local coordinator (with patches to dev env to act like GCE) with
changes
- build windows buildlet, post to own bucket
- execute:
gomote -localdev create windows-amd64-2012
ssh -p 2222 user-jrjohnson-windows-amd64-2012-0@127.0.0.1
Fixes golang/go#21247
Change-Id: If7adc7e6296a071d50412d9fa9d46ecd9e6cc3f3
Reviewed-on: https://go-review.googlesource.com/52350
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index ba26b41..b10283e 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -212,18 +212,21 @@
machineType: "n1-highcpu-4",
buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz",
+ SSHUsername: "gopher",
},
"host-windows-amd64-2012": &HostConfig{
VMImage: "windows-amd64-server-2012r2-v4",
machineType: "n1-highcpu-4",
buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz",
+ SSHUsername: "gopher",
},
"host-windows-amd64-2016": &HostConfig{
VMImage: "windows-amd64-server-2016-v4",
machineType: "n1-highcpu-4",
buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz",
+ SSHUsername: "gopher",
},
"host-darwin-10_8": &HostConfig{
IsReverse: true,