RSA Public WSO2carbon 密钥

RSA Public Key of WSO2carbon

我正在从 WSOAM 生成 JWT 令牌,然后将其作为 header 传递给 API。我在 nodejs 中创建了 API,我正在使用 jsonwebtoken 插件来验证和解码 JWT。

我无法找到 verify/decode 令牌的 Wso2carbon 的 RSA Public 密钥。

请帮助我如何生成 RSA Public 密钥或者我应该在哪里找到这个密钥?

所有 WSO2 产品都使用默认的 public/private 密钥对安装到 <WSO2_AM>/repository/resources/security 目录中的 wso2carbon.jks keystore 文件中。建议使用您自己的密钥库,而不是所有 WSO2 产品附带的默认密钥库。

It is recommended to replace this default keystore with a new keystore that has self-signed or CA signed certificates when the products are deployed in production environments. This is because wso2carbon.jks is available with open source WSO2 products, which means anyone can have access to the private key of the default keystore.

如果您要使用默认的 private/public 密钥,请使用以下命令提取密钥。

keytool -export -keystore <WSO2_AM>/repository/resources/security/wso2carbon.jks -alias wso2carbon -file Example.cer