微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Spring Boot Oauth 2 Okta证书问题

如何解决Spring Boot Oauth 2 Okta证书问题

我有一个简单的Spring boot应用程序在AWS Ec2的docker容器中运行。

使用以下配置将应用程序配置为使用oauth2针对Okta进行身份验证:

okta:
  oauth2:
    issuer: https://xxxx/oauth2/default
    clientId: xxxx
    clientSecret: xxxx

我收到以下错误

[invalid_token_response] An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: I/O error on POST request for "https://xxx/oauth2/default/v1/token": PKIX path building Failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building Failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

似乎Spring不信任Okta端点,我尝试将okta证书添加到Java cacerts文件中,但是没有运气。有什么想法吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。