大三角帆和Okta集成失败

时间:2019-01-31 23:46:09

标签: okta spinnaker

场景: 将大三角帆升级到1.12.0。没有其他配置更改会影响此集成(我们不得不修改s3 IAM,因为它退出了工作)。 Okta集成停止工作。公钥在入口的安装过程中重新发布,可能相关吗?

SAML-TRACE显示有效载荷到达okta并返回

Spinnaker会引发两个不同的错误,具体取决于浏览器以及如何到达那里。

直接链接到平台URL:(500)未配置IDP,请使用至少一个IDP(在浏览器和登机口中看到)更新包含的元数据

okta仪表板中的Okta“小卡片”:(401)身份验证失败:传入的SAML消息无效

配置详细信息(同样没有更改): 直接下载元数据 JKS被利用且有效 服务URL已确认 JKS的别名已确认

2 个答案:

答案 0 :(得分:0)

从1.10.13升级到1.12.2时,我也遇到了这个问题。我在Gate的日志中发现了许多这些错误消息:

2019-02-19 05:31:30.421 ERROR 1 --- [.0-8084-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw e
xception [org.opensaml.saml2.metadata.provider.MetadataProviderException: No IDP was configured, please update included metadata with at least one IDP] with root cause

org.opensaml.saml2.metadata.provider.MetadataProviderException: No IDP was configured, please update included metadata with at least one IDP
        at org.springframework.security.saml.metadata.MetadataManager.getDefaultIDP(MetadataManager.java:795) ~[spring-security-saml2-core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
        at org.springframework.security.saml.context.SAMLContextProviderImpl.populatePeerEntityId(SAMLContextProviderImpl.java:157) ~[spring-security-saml2-core-1.0.2.RELEASE.jar
:1.0.2.RELEASE]
        at org.springframework.security.saml.context.SAMLContextProviderImpl.getLocalAndPeerEntity(SAMLContextProviderImpl.java:127) ~[spring-security-saml2-core-1.0.2.RELEASE.ja
r:1.0.2.RELEASE]
        at org.springframework.security.saml.SAMLEntryPoint.commence(SAMLEntryPoint.java:146) ~[spring-security-saml2-core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
        at org.springframework.security.web.access.ExceptionTranslationFilter.sendStartAuthentication(ExceptionTranslationFilter.java:203) ~[spring-security-web-4.2.9.RELEASE.jar
:4.2.9.RELEASE]
...

降级到1.10.13之后,我升级到了下一个版本1.11.0,并发现问题开始了。最终,我从Container的启动中查看了Gate的日志,发现:

2019-02-20 22:31:40.132 ERROR 1 --- [0.0-8084-exec-3] o.o.s.m.provider.HTTPMetadataProvider    : Error retrieving metadata from https://000000000000.okta.com/app/00000000000000000/sso/saml/metadata

javax.net.ssl.SSLException: Error in hostname verification
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.verifyHostname(TLSProtocolSocketFactory.java:241) ~[openws-1.5.4.jar:na]
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:186) ~[openws-1.5.4.jar:na]
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) ~[commons-httpclient-3.1.jar:na]
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) ~[commons-httpclient-3.1.jar:na]
...

这使我意识到TLS证书已被Gate拒绝。不知道为什么突然开始检查失败。至此,我将其配置为:

$ hal config security authn saml edit --metadata https://000000000000.okta.com/app/00000000000000000/sso/saml/metadata

我最终下载了元数据文件,并使用halyard重新部署。

$ wget https://000000000000.okta.com/app/00000000000000000/sso/saml/metadata
$ hal config security authn saml edit --metadata "${PWD}/metadata"
$ hal config version edit --version 1.12.2
$ hal deploy apply

按照Spinnaker文档的建议打开一个私有浏览器窗口,Gate再次开始正确重定向到Okta。

问题已提交,https://github.com/spinnaker/spinnaker/issues/4017

答案 1 :(得分:0)

所以我最终找到了答案。在门的更高版本中,大三角帆中的tomcat配置发生了明显变化。

我在〜/ .hal / default / profiles / gate-local.yml中创建了此代码段

server:
  tomcat:
    protocolHeader: X-Forwarded-Proto
    remoteIpHeader: X-Forwarded-For
    internalProxies: .*

部署了大三角帆,它又恢复了工作。

相关问题