wso2 / product-apim

Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
840 stars 784 forks source link

Enable APIKEY signing with primary keystore. #9350

Closed akila95fernando closed 3 years ago

akila95fernando commented 4 years ago

Description:

1) In a scenario where api_key_keystore is not configured and having a separate internal keystore, the APIKEY will be signed using the internal keystore. We need to give the priority to primary keystore istead of internal. refer the code [1]

2) When following property is used to point primary keystore for signing APIKEY and the passwords are encrypted with the Ciphertool we were able to notice that the retrieval of the Private key is failing.

_[apim.devportal] api_keykeystore = "KeyStore"

[1] https://github.com/wso2-support/carbon-apimgt/blob/07d078afea5d0d78275ac72e7d5ad7ac6823a5ce/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java#L9951

Steps to reproduce:

Affected Product Version:

APIM-3.1.0

Suggested Labels:

rmsamitha commented 3 years ago

@Chamindu36 If this is fixed in master, shall we close this issue?

Chamindu36 commented 3 years ago

@Chamindu36 If this is fixed in master, shall we close this issue?

This fix is added to the master. Hence this issue will be closed.

hasuniea commented 3 years ago

https://github.com/wso2-support/carbon-apimgt/pull/3612