ssl - OpenID 空 SSL 上下文错误

标签 ssl ibm-cloud websphere-liberty openid-connect

当我们启动 Bluemix Liberty 应用程序时出现以下错误,大约每 10 次出现 1 次。如果您尝试进行身份验证,在从 OpenID 提供商重定向后,您会看到一个弹出窗口,要求您提供用户名和密码,这似乎没有任何效果。重新启动应用程序可修复它。

CWWKS1707E: The OpenID Connect client [NTBhZGQ4MWMtN2Y5Ni00] was unable to create an SSL context due to [CWWKS1707E: The OpenID Connect client [NTBhZGQ4MWMtN2Y5Ni00] was unable to create an SSL context due to [Null ssl conext]. Ensure that your SSL feature is properly configured.]. Ensure that your SSL feature is properly configured.

这可能与从我们的 server.xml 中用户提供的服务注入(inject) OpenID 客户端配置有关:

<openidConnectClient 
    httpsRequired="true" id="blueid" includeIdTokenInSubject="true" 
    authorizationEndpointUrl="https://${cloud.services.${env.openidservice}.connection.domain}/idaas/oidc/endpoint/default/authorize" 
    tokenEndpointUrl="https://${cloud.services.${env.openidservice}.connection.domain}/idaas/oidc/endpoint/default/token" 
    issuerIdentifier="https://${cloud.services.${env.openidservice}.connection.domain}" 
    clientId="${cloud.services.${env.openidservice}.connection.clientid}" 
    clientSecret="${cloud.services.${env.openidservice}.connection.clientsecret}"
    mapIdentityToRegistryUser="false" scope="openid" signatureAlgorithm="RS256" 
    trustAliasName="${cloud.services.${env.openidservice}.connection.certificate}" 
    trustStoreRef="validationKeyStore" 
    userIdentityToCreateSubject="uniqueSecurityName"> 
</openidConnectClient>

注入(inject)必须有效,因为错误消息中提到的 clientId 是正确的。不确定为什么 SSL 上下文为空。我尝试过在 server.xml 中使用和不使用 SSL 元素,但问题仍然存在。

有谁知道可能是什么原因吗?

最佳答案

在您的 openid connect 客户端配置中,您没有为 openid connect 客户端定义 SSL 配置,因此 openid connect 客户端正在使用服务器的默认 SSL 配置。要获得确定的行为,我建议您通过将“sslRef=”添加到 openidConnectClient 中来为 openid connect 客户端显式配置 SSL,并且您的 ssl 配置必须包含具有 openid 提供者证书的信任库。

关于ssl - OpenID 空 SSL 上下文错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37459029/

相关文章:

ssl - OpenSSL 和 CAPI - 证书冲突

swift - 将 HTTP POST 发送到 Kitura 在 Bluemix 上工作错误

ruby-on-rails - Rails 日志中的 "object allocation during garbage collection phase"是什么意思?

quartz-scheduler - Quartz 1.8.5 + OpenLiberty 18.0.0.4/Websphere Liberty 17.0.0.4 java.lang.NoClassDefFoundError : oracle/sql/BLOB

jpa - 如何在 WebSphere Liberty 上通过 JPA 使用 H2 数据库

java - 如何连接到通过 <HostVMIP> :2376 using Java? 监听 ssl/tls 连接的 docker 守护进程

python - 将 .py 编译为 .exe 后验证 ssl 证书失败

SSL 和加密

eclipse - 从 Eclipse 连接到 Bluemix

java - IBM Websphere MQ 将 javax.jms.TextMessage 显示为 <RFH >