我们有一个api的后端,需要在访问api时显示客户端证书 . 我们已将客户端证书添加到repository / resources / security / client-truststore.jks以及所有Root CA和Intermediate Certs . 重启服务器 .
我相信Wso2现在能够发送到后端API的调用并返回状态代码403.它返回403,因为后端api没有收到带有请求的客户端证书...
{
"timestamp": "2017-03-14T21:33:36.523Z",
"status": 403,
"error": "Forbidden",
"message": "Access Denied",
"path": "/registrations"
}
当我们直接从带有证书的服务器执行后端时,它工作正常:
curl -k --cert /tmp/client.pem:changeit -X POST https://10.7.64.36:8443/registrations -H "Content-Type: application/json" -d "{\"primaryAccountNumber\": \"12122121212\"}"
我们得到了有效的回复:
{"registration_id":null,"transaction_id":null,"authentication_code":null,"qr_code_image":null,"registered":null,"status":null,"score":null,"reason_codes":[]}
那么curl如何发送--cert请求如何在wso2 api manger中执行此操作,请告知如何将客户端证书关联到后端URL ...以便它将由wso2 api-manager发送并且后端将能够处理请求 .
谢谢 .
1 回答
对于相互ssl,您可以参考以下博客文章 .
http://ishara-cooray.blogspot.com/2016/07/how-to-secure-your-backend-services-and.html
这是博客文章中的重要部分 .