尝试用Apache代理vsphere webclient

我们希望保护我们的VMWare vsphere 6.5 Web客户端,并使用已经存在的和正在运行的Apache 2.4反向代理(有益于集中监控,mod_security et.al.)

通信客户端< – >代理和代理< – >后端(= vsphere)都必须是TLS安全的。 证书已经准备好了。 DNS相应地configuration。

客户端已经可以通过代理成功访问vsphere启动页面,例如https:// vsphere.domain.tld /

Firefox的networking分析表明,所有的请求都很好,比如说

302 GET /vsphere-client/ [FQDN] document html 

直到/vsphere-client/UI.swf

但是,只要用户点击链接“vSphere Web Client(Flash)”来validation并input菜单,就会引发状态码400。 “vSphere Web Client(Flash)”链接指向/ vsphere-client /,显然会调用SAML请求。

  400 GET https://vsphere.domain.tld/websso/SAML2/SSO/vsphere.local?SAMLRequest=zVRba9sw[...] [FQDN] subdocument 

vsphere sso日志显示:

  tomcat-http--38 ERROR org.opensaml.common.binding.decoding.BaseSAMLMessageDecoder] SAML message intended destination endpoint 'https://vsphere-internal.domain.tld/websso/SAML2/SSO/vsphere.local' did not match the recipient endpoint 'https://vsphere.domain.tld/websso/SAML2/SSO/vsphere.local' 

到目前为止,Apache反向代理上的虚拟主机conf(摘录):

  SSLProxyEngine on ProxyPreserveHost on ProxyRequests off ProxyPass / https://vsphere.domain.tld/ ProxyPassReverse / https://vsphere.domain.tld/ ProxyPass /vsphere-client https://vsphere.domain.tld/vsphere-client/ ProxyPassReverse /vsphere-client https://vsphere.domain.tld/vsphere-client/ ProxyPass /websso/SAML2/SSO https://vsphere.domain.tld/websso/SAML2/SSO/ ProxyPassReverse /websso/SAML2/SSO https://vsphere.domain.tld/websso/SAML2/SSO/ # new, to solve the name binding problem (see 1st answer) RequestHeader set Host "vsphere-internal.domain.tld" 

使用最后一个“RequestHeader”附录(实际上只是颠倒了PreserveHost选项),我现在能够看到vspherelogin页面并login,但是页面再次进行search:

  tomcat-http--10 ERROR com.vmware.identity.BaseSsoController] Could not parse tenant request java.lang.IllegalStateException: org.opensaml.xml.security.SecurityException: SAML message intended destination endpoint did not match recipient endpoint 

任何build议如何获得整个页面?

我想通过将后端主机名(= vsphere web客户端)添加到Apache的vhost conf来解决第一个问题,即“预期的目标端点…与接收端点不匹配”:

  RequestHeader set Host "<backend hostname>" 

(这里是:vsphere-internal.domain.tld),但是正如ezra-s正确解释的那样,这只是颠倒了PreserveHost选项。 所以我删除了RequestHeader和PreserveHost选项。 仍然遭受第二个问题…