Certificate_unknown WSO2 API Manager 4.1



我使用Api Manager 4.1作为Api Gateway发送请求端点后端。我尝试从我的api项目命中HTTP/HTTPS api端点。但是当我尝试HTTPS时,我总是得到400状态…当我检查apim的日志时。我得到log

[2022-10-04 05:46:25,389]  WARN - SourceHandler I/O error: Received fatal alert: certificate_unknown
[2022-10-04 05:46:25,445]  WARN - AccessConfiguration Error loading properties from file: access-log.properties
[2022-10-04 05:46:25,449]  WARN - MiscellaneousUtil Error loading properties from a file at from the System defined location: access-log.properties
[2022-10-04 05:46:25,451]  WARN - MiscellaneousUtil Error loading properties from a file at from the System defined location: access-log.properties
[2022-10-04 05:46:25,797]  INFO - DefaultKeyValidationHandler org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler Initialised
[2022-10-04 05:46:25,849]  INFO - TimeoutHandler This engine will expire all callbacks after GLOBAL_TIMEOUT: 120 seconds, irrespective of the timeout action, after the specified or optional timeout

我尝试搜索并尝试修复,就像我在搜索中发现的那样,从部署中更改它。Toml,从api-manager.xml更改配置。尝试从新的API项目重新制作,并启用CORS配置。我总是得到400。和credential_certificate。我尝试从服务器的内部web浏览器和从外部浏览器访问端点。我接受了所有的证书,比如我得到的参考搜索。但是没有成功。也许有人能帮上忙。我试着用postman或者api-manager devportal试试。并生成令牌密钥,但结果是相同的。

当从Devportal UI调用API时(使用Try it特性),浏览器将请求发送到具有自签名证书的Gateway。由于浏览器不信任此证书,因此请求失败,并在wso2carbon.log中抛出以下日志跟踪。警告- SourceHandler I/O错误:Received fatal alert: certificate_unknown">

在这种情况下,我们必须显式地告诉浏览器信任该证书。对于开发环境,如果使用自签名证书,则可以将其导入浏览器。在这种情况下,您可以在同一浏览器的新选项卡上访问请求URL(在swagger UI中显示),并信任来自该浏览器的证书。或者,您可以为Gateway使用ca签名的证书并将其导入信任库(如果您在生产环境中,这是推荐的方法)

关于邮差调用;

  • 您是否在邮差呼叫的碳日志中观察到相同的警告日志?
  • 您是否将任何证书导入到邮差或已禁用证书验证?