【问题标题】:Spinnaker & Okta integration failingSpinnaker 和 Okta 集成失败
【发布时间】:2019-01-31 23:46:09
【问题描述】:

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

SAML-TRACE 显示负载到达 okta 并返回

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

Deck url 的直接链接:(500) 未配置 IDP,请使用至少一个 IDP 更新包含的元数据(在浏览器和网关中看到)

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

配置细节(同样没有改变): 直接下载元数据 JKS 正在被杠杆化并且有效 服务网址已确认 JKS 的别名已确认

【问题讨论】:

    标签: okta spinnaker


    【解决方案1】:

    从 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,发现问题就是从那时开始的。最终,我查看了 Gate 在 Container 启动时的日志,发现:

    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

    【讨论】:

      【解决方案2】:

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

      我在 ~/.hal/default/profiles/gate-local.yml 中创建了这个 sn-p

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

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-05-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-08-03
        • 1970-01-01
        • 2017-07-22
        • 2016-09-04
        相关资源
        最近更新 更多