This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit

Importing Certificates to the API Microgateway Truststore

This documentation is for the API Microgateway component that is coupled with WSO2 API Manager 2.6.0.
View the documentation for the latest release - WSO2 API Microgateway 3.0.2.

For signature validation of JWTs, you need to add the public certificate of the Identity Provider to the truststore of the API Microgateway. Follow the steps given below to import the certificate.

  1. Convert the public certificate to a PEM format. For example,

    openssl x509 -inform der -in public_certificate.cert -out certificate.pem
  2. Import the certificate to the truststore. The ballerinaTruststore.p12 resides in the generated distribution of the API Microgateway at <MICROGW_HOME>/runtime/bre/security.

    keytool -import -keystore <MICROGW_HOME>/runtime/bre/security/ballerinaTruststore.p12 -alias wso2carbonjwt -file certificate.pem

    Use the keytool that comes in JDK 8u60 or later.

  3. Update the certificateAlias configuration in the micro-gw.conf file residing in the <MICROGW_HOME>/conf directory.
    The certificateAlias value is wso2carbonjwt, which is also used in step 2.