在 WSO2 API 管理器 4.1.0 GA 版本中,不会通过邮递员进行启用 SSL 的相互 API 调用

问题描述 投票:0回答:1

我正在 WSO2 APIM 4.1.0 GA 版本中尝试 Mutual SSL。我使用

Self signed certificate
创建了
Java Keytool

操作系统: Windows 11

以下是生成证书的命令:

创建新的密钥库:

keytool -genkey -keyalg RSA -alias dev.wso2.com -keystore "C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\devwso2.jks" -validity 4000

转换为pkcs12格式:

keytool -importkeystore -srckeystore C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\devwso2.jks -destkeystore C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\devwso2.jks -deststoretype pkcs12

导出公钥

keytool -exportcert -alias dev.wso2.com -rfc -file "C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\devwso2.pem" -keystore "C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\devwso2.jks"

将公钥导入信任库:

keytool -import -alias dev.wso2.com -file "C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\devwso2.pem" -keystore "C:\pathtoAPIM\wso2am-4.1.0\repository\resources\security\client-truststore.jks"
  • 证书已成功添加到信任库中,并且也从管理控制台验证了证书。

  • 在发布者门户中创建 API 并启用
    Mutual SSL
    作为强制性

  • 上传新的客户端证书并在
    Application level security
  • 下将 OAuth 标记为可选

  • API 发布到 devportal.

使用 Postman 调用受相互 SSL 保护的 API

  • 在 Postman 设置的证书选项卡中添加了证书和私钥。 主持人:

    dev.wso2.com
    CRT文件:
    dev.wso2.crt
    关键文件:
    devwso2.pem
    密码:
    keystorepwd

  • 在常规选项卡中,

    SSL Certificate Verification
    OFF

API 在邮递员中命中:

  • 正如您在上面的屏幕截图中看到的那样,在邮递员中收到类似
    Error: error:0900006e:PEM routines:OPENSSL_internal:NO_START_LINE
    的错误。

我可以知道为什么这个相互 SSL 保护的 API 调用没有发生吗?我们该如何解决这个问题?

参考链接 1

参考链接2

ssl wso2 wso2-api-manager keytool mutual-authentication
1个回答
0
投票

这似乎是邮递员特有的问题。您能否检查此处提到的选项[1] 来解决问题?或者可能是由于 crt 文件中的某些结构问题。

[1] https://community.postman.com/t/error-errorpem-routinesno-start-line/32031

© www.soinside.com 2019 - 2024. All rights reserved.