Posts

WSO2 APIM Gateway Flow & Rate Limiting Flow

Image
So, what happens when an API is called to WSO2 API Gateway? And how does that different levels of throttling polices are applied? These are the most common questions with respect to API Gateway & API Security. Let's see the details step by step- When An Api is called with Token Image Credits: WSO2 Gateway Checks if --> API Proxy exists API Proxy Checks for  -->  Resource exists or not Token validation by KM and acknowledge to --> Gateway (Gateway itself validates in case of JWT) Gateway Calls  -->  TM(traffic manager) to publish invocation data asynchronously. Traffic Manager  -->  Enforces throttling policies Gateway  to execute-->  any custom mediation extensions Gateway  publishes-->  events to analytics server Gateway calls  -->  to backend The API Rate Limiting Sequence There are different level of rate limiting policies as supported by WSO2 API Manager. Below are the list of policies ...

WSO2 APIM 4.1 OpenSource Pack Build Error- No Compiler Provided

Image
Recently I trie building the wso2 apim product pack using the source code provided by WSO2 on Github Repository and I faced Java Compilation related errors. I'll share my experience about the same. So let's start- Environment OS: macOS Ventura Java: JDK 1.8 WSO2 APIM Source Code: APIM v4.1 Maven:  Apache Maven 3.9.4 Problem Statement: 1. Downloaded the wso2 apim pack 4.1 from  https://codeload.github.com/wso2/product-apim/zip/refs/tags/v4.1.0 product-apim-4.1.0.zip 2. Go to the root directory  product-apim-4.1.0 3. Maven build command failure during mvn clean install Below is the error snapshot identified during the build process [ INFO ] Changes detected - recompiling the module! [ INFO ] Compiling 1 source file to /Users/kumargaurav/Downloads/product-apim-4.1.0/modules/styles/product/target/classes [ INFO ] ------------------------------------------------------------- [ ERROR ] COMPILATION ERROR :  [ INFO ] -------------------------------------------...

WSO2 APIM v3.2 - API not visible in publisher

Image
I recently encountered a strange issue with API visibility in the publisher portal. Here is what happened and how I overcome to this issue- Environment WSO2 APIM- v3.2.x Openshift: 4.x MSSQL Database 19.x Using PV/PVC for synapse-config and executionplans Problem Statement : There was OpenShift upgrade happened and we have restart the server i.e. re-creation of the pods. This has caused an issue in API listing inside publisher portal. We have verified the API in the database system but the same was not visible in the publisher portal. When we tried to re-create the same via publisher portal; it didn't worked and we got an error that the API exists with the same context. Root Cause:  These issues occurs due to indexing issues and not limited to underlying infra upgrade. This may happen due to multiple reasons that causes indexing failure Solution: Re-building the index solves this issue in following ways- Option 1:  Open the management console/ carbon portal and click on the re...

JWT Debugger- Basic Version

Image
This is JWT (JSON Web Token) debugger basic version where if you enter a correct JWT, debugging will be performed and header, payload & signature data is displayed. All operations are done at client side only. Debug JWT! Reset! eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikt1bWFyIEdhdXJhdiIsImlhdCI6MTUxNjIzOTAyMn0.sNKLqSVJces_BwPM2ujoMZC7ZwKlMJRKiBsr53ROH7w Debug JWT! Reset!

Export public-private keys from PFX file

Image
In this blog I'll share the snippets used to export the public key & private key from a PFX file. Sometimes we have to perform the data encryption/decryption using the digital signature by taking the public key(so called as SSL certificate or public keys)  to encrypt the data and private key to decrypt the data. Let's take the sample DSCs provided by eMudhra- https://www.e-mudhra.com/Repository/ I have taken " e-Mudhra sub CA for Class 3 Individual 2014"  for this blog. This zip contains two files as- Class 3 individiual test_encryption.pfx- For data encryption/decryption Class 3 individiual test_Signature.pfx- For signing the document We'll take the file  Class 3 individiual test_encryption.pfx for this blog and follow the below steps to obtain the public key & private key. A linux machine with openssl utility Run the following command to extract the private key openssl pkcs12 -in Class_3_individiual_test_encryption.pfx -nocerts -out private_key.key If pr...

Base64EncodeDecode

Image
I have created this simple page to convert plain text into base64encoded and the vice versa Encode >> << Decode