Backport of #78137: godeps: update vmware/govmomi to v0.20.1

Cannot cherry-pick #78137 (go mod vs godep)

Includes fix for SAML token auth with vSphere and zones API

Issue #77360

See also: #75742
pull/564/head
Doug MacEachern 2019-05-21 07:59:43 -07:00
parent 39fc3c4956
commit 93263cd95b
2 changed files with 71 additions and 68 deletions

132
Godeps/Godeps.json generated
View File

@ -3319,168 +3319,168 @@
}, },
{ {
"ImportPath": "github.com/vmware/govmomi", "ImportPath": "github.com/vmware/govmomi",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/find", "ImportPath": "github.com/vmware/govmomi/find",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/list", "ImportPath": "github.com/vmware/govmomi/list",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/lookup", "ImportPath": "github.com/vmware/govmomi/lookup",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/lookup/methods", "ImportPath": "github.com/vmware/govmomi/lookup/methods",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/lookup/simulator", "ImportPath": "github.com/vmware/govmomi/lookup/simulator",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/lookup/types", "ImportPath": "github.com/vmware/govmomi/lookup/types",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/nfc", "ImportPath": "github.com/vmware/govmomi/nfc",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/object", "ImportPath": "github.com/vmware/govmomi/object",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/pbm", "ImportPath": "github.com/vmware/govmomi/pbm",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/pbm/methods", "ImportPath": "github.com/vmware/govmomi/pbm/methods",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/pbm/types", "ImportPath": "github.com/vmware/govmomi/pbm/types",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/property", "ImportPath": "github.com/vmware/govmomi/property",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/session", "ImportPath": "github.com/vmware/govmomi/session",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/simulator", "ImportPath": "github.com/vmware/govmomi/simulator",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/simulator/esx", "ImportPath": "github.com/vmware/govmomi/simulator/esx",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/simulator/vpx", "ImportPath": "github.com/vmware/govmomi/simulator/vpx",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/sts", "ImportPath": "github.com/vmware/govmomi/sts",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/sts/internal", "ImportPath": "github.com/vmware/govmomi/sts/internal",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/sts/simulator", "ImportPath": "github.com/vmware/govmomi/sts/simulator",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/task", "ImportPath": "github.com/vmware/govmomi/task",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vapi/internal", "ImportPath": "github.com/vmware/govmomi/vapi/internal",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vapi/rest", "ImportPath": "github.com/vmware/govmomi/vapi/rest",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vapi/simulator", "ImportPath": "github.com/vmware/govmomi/vapi/simulator",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vapi/tags", "ImportPath": "github.com/vmware/govmomi/vapi/tags",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25", "ImportPath": "github.com/vmware/govmomi/vim25",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/debug", "ImportPath": "github.com/vmware/govmomi/vim25/debug",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/methods", "ImportPath": "github.com/vmware/govmomi/vim25/methods",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/mo", "ImportPath": "github.com/vmware/govmomi/vim25/mo",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/progress", "ImportPath": "github.com/vmware/govmomi/vim25/progress",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/soap", "ImportPath": "github.com/vmware/govmomi/vim25/soap",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/types", "ImportPath": "github.com/vmware/govmomi/vim25/types",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/govmomi/vim25/xml", "ImportPath": "github.com/vmware/govmomi/vim25/xml",
"Comment": "v0.20.0", "Comment": "v0.20.1",
"Rev": "bdf05b6cab86b1e9f40ee80a4d2cb07a0c25ef78" "Rev": "4514987f2ddb8875c44cff1d5a24c59425fa6b92"
}, },
{ {
"ImportPath": "github.com/vmware/photon-controller-go-sdk/SSPI", "ImportPath": "github.com/vmware/photon-controller-go-sdk/SSPI",

View File

@ -265,8 +265,11 @@ func (s *Signer) SignRequest(req *http.Request) error {
} }
bhash := sha256.New().Sum(body) bhash := sha256.New().Sum(body)
// Port in the signature must be that of the reverse proxy port, vCenter's default is port 80 port := req.URL.Port()
port := "80" // TODO: get from lookup service if port == "" {
port = "80" // Default port for the "Host" header on the server side
}
var buf bytes.Buffer var buf bytes.Buffer
msg := []string{ msg := []string{
nonce, nonce,