<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sanjeewa Malalgoda on Medium]]></title>
        <description><![CDATA[Stories by Sanjeewa Malalgoda on Medium]]></description>
        <link>https://medium.com/@sanjeewa190?source=rss-ae0c17280e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9aMRv3TCOhu-BP6u.</url>
            <title>Stories by Sanjeewa Malalgoda on Medium</title>
            <link>https://medium.com/@sanjeewa190?source=rss-ae0c17280e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:32:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanjeewa190/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes…]]></title>
            <link>https://medium.com/@sanjeewa190/empowering-the-future-of-api-management-unveiling-the-journey-of-wso2-api-platform-for-kubernetes-30a1134484b5?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/30a1134484b5</guid>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Thu, 20 Jul 2023 05:50:09 GMT</pubDate>
            <atom:updated>2023-07-20T05:50:09.349Z</atom:updated>
            <content:encoded><![CDATA[<h3>Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes (APK) Project and the Anticipated Alpha Release</h3><h3>Introduction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*l_SgWT69th9DUWSLFBme3Q.png" /></figure><p>In the ever-evolving realm of API management, our journey embarked on the APK project eight months ago, and now, with great anticipation, we stand on the verge of releasing our Alpha version. Our sights are set on the momentous 1.0.0 GA release, scheduled for the end of August 2023. As a team deeply involved in the development of APK, we are compelled to share the motivations driving our efforts, the intricate components shaping our creation, and how this solution will revolutionise API management.</p><h3>APIs and Importance of APIs</h3><p>In the digital business era, APIs play a crucial role in enabling services, fostering collaboration, and driving innovation. They empower internal and external teams to collaborate effectively, making collaboration and cooperation easier than ever before. APIs enable businesses to adapt and evolve quickly in a dynamic environment, responding to market changes, customer needs, and emerging opportunities with agility. By seamlessly integrating with various systems, technologies, and platforms, APIs provide the flexibility that organizations need to stay ahead of the curve. Moreover, APIs streamline integration, simplify communication between different components, and enhance operational efficiency, ultimately improving the overall customer experience. In summary, APIs are essential tools for every business, offering countless benefits and opportunities in today’s interconnected world.</p><h3>Some of Our Observations</h3><p>Based on our recent market analysis, we have made several noteworthy observations in the API management landscape. Firstly, we have noticed a significant shift where APIs are no longer standalone components but have become integral parts of the infrastructure, operating seamlessly behind the scenes. This observation aligns perfectly with our approach in developing APK, which embraces the integration of API management and gateway functionalities into platforms.</p><p>Furthermore, we strongly believe that the future of API management lies in the seamless integration of these functionalities with applications and services. This integration will enable developers to focus solely on building their applications, with API management capabilities automatically enabled by default. This trend reflects the increasing importance of API management as a core part of the development process.</p><p>Another observation we have made is the growing prominence of Envoy proxy, not only in Kubernetes environments but also in other contexts. Envoy has emerged as a popular gateway choice for many organizations, highlighting its effectiveness and reliability in handling API traffic.</p><p>In recent years, we have also witnessed a widespread adoption of Kubernetes for new deployments across various sectors. Organizations have recognized the immense benefits that Kubernetes brings to their containerized applications and microservices architecture, further emphasizing its significance in the API management landscape.</p><p>Lastly, there has been a notable shift towards emphasizing the management aspects of APIs, encompassing areas such as governance, administration, and control. Organizations are increasingly realizing the importance of effectively managing APIs to ensure security, scalability, and compliance with regulatory requirements.</p><p>These observations provide valuable insights into the evolving API management market and guide our development of APK, as we strive to address the emerging needs and trends in this dynamic industry.</p><h3>Introduction to APK</h3><p>Introducing APK, the API Platform for Kubernetes, a next-generation API management solution that harnesses the power of Kubernetes and offers a range of exceptional characteristics to meet the evolving needs of modern API management. With APK, we have leveraged the native features of Kubernetes, enabling it to seamlessly understand concepts like namespaces and clusters. This empowers APK to automatically scale deployments based on load and other parameters, leveraging the rich metrics provided by Kubernetes.</p><p>At the core of APK’s gateway solution is the carefully chosen Envoy technology. Envoy is renowned for its exceptional characteristics, including its speed, lightweight nature, and perfect fit within the APK ecosystem as the gateway component. As we developed APK, we went beyond building a simple gateway. We created extensions to address specific use cases in API management, some of which we have contributed back to the Envoy community. Collaboration and contributing to the community are deeply ingrained in our philosophy, as we believe in the power of collective innovation.</p><p>WSO2 APK proudly adheres to the Kubernetes Gateway API specification, an open-source project managed by the SIG-NETWORK community. This specification defines a set of resources, including GatewayClass, Gateway, HTTPRoute, TCPRoute, and Service, which collectively enhance service networking capabilities in Kubernetes. By embracing this specification, WSO2 APK leverages expressive and extensible interfaces to enable seamless integration with Kubernetes service networking.</p><p>APK’s microservices architecture is another key strength. All components, such as back office, portals, and admin services, have been developed as microservices. This architecture offers numerous advantages, including easy scalability to handle higher loads and seamless upgrades to newer versions without disruptions. By adopting a microservices approach, we fully harness the benefits of this architecture, ensuring agility and flexibility.</p><p>A notable aspect of APK is the separation of the control plane and data plane, which grants users the freedom to integrate any control plane of their choice. Whether it’s plugging in your own control plane or utilizing the APK data plane, you can tailor the solution to your specific needs, providing maximum flexibility and customization.</p><p>Moreover, APK is an evolving open-source solution, driven by contributions from the community. This collaborative approach enables us to deliver advanced API management capabilities that address the demands of modern API management. APK is designed specifically for cloud-native architectures, seamlessly integrating with Kubernetes and embracing the principles of scalability, resilience, and elasticity required in cloud environments.</p><p>With seamless CI/CD integration, APK streamlines the continuous integration/continuous delivery process, offering easy-to-use tools and APIs. This allows for efficient deployment and management of APIs, supporting a streamlined GitOps approach.</p><p>APK aims to provide API marketplace capabilities, enabling features for sharing, discovery, and reusability of APIs. By focusing not only on the technical aspects of API management but also on efficient governance and administration, APK empowers organizations to optimize their API ecosystems.</p><p>With its Kubernetes-native approach, exceptional characteristics, microservices architecture, and commitment to collaboration and innovation, APK sets a new standard for API management, enabling organizations to embrace the power of APIs in their digital transformation journey.</p><h3>APK Components</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mdZMrnnsr-8IQGX4" /></figure><p>The APK architecture comprises both control plane and data plane components, with a focus on the data plane for our demonstration. The data plane consists of two main domain services: the Config Service and the Deployer Service.</p><p>The Config Service is an open API that allows you to generate APK configurations. It enables you to create APK configurations and Kubernetes API artifacts based on inputs such as OpenAPI schema files or API configurations. This service can be invoked without specific security credentials, simplifying the configuration generation process.</p><p>On the other hand, the Deployer Service facilitates the creation of API artifacts within the gateway runtime of the data plane. This API is secured with OAuth 2.0, requiring a valid access token for invocation. By invoking the Deployer Service with the necessary APK artifacts, such as APIs and rate limit policies, they can be deployed to the runtime environment.</p><p>These components play a crucial role in the APK architecture, enabling efficient configuration generation and deployment of API artifacts within the data plane.</p><p>The gateway partition, depicted in the diagram, consists of three key components: the Router, Enforcer, and Management Client. The Router, an Envoy-based gateway proxy, intercepts all incoming API traffic and applies Quality of Service (QoS) policies to ensure optimal performance and reliability.</p><p>The Enforcer component handles authentication and authorization for API calls, ensuring that only authorized requests are allowed to access the APIs. Lastly, the Management Client is responsible for configuring the Router and Enforcer with the necessary information. It facilitates seamless communication and synchronization between these components, ensuring the proper functioning of the gateway partition.</p><p>These three components, the Router, Enforcer, and Management Client, form the gateway partition, working together to ensure secure and efficient API traffic management within the APK architecture.</p><p>In addition to the gateway partition components, the APK architecture includes a crucial service known as the Rate Limiting Service. This service plays a vital role in handling rate limiting for API calls. The Router component communicates with the Rate Limiter to evaluate incoming requests against the allocated quota. The Rate Limiter service maintains rate limit policies and manages counters to enforce the defined limits.</p><p>When there is a need for distributed counters across multiple gateways, Redis serves as a recommended shared information store. The inclusion of the Redis service in the architecture facilitates the management of shared information for rate limiting across gateways.</p><p>These APK components, both within the data plane and the gateway partition, work in harmony to enable seamless API management, configuration generation, deployment, and rate limiting within the APK architecture. By understanding these components, you gain a comprehensive understanding of how APK operates and supports efficient API traffic management.</p><h3>Developer Workflows to Create and Deploy API in APK</h3><h3>Standard API Development Flow</h3><p>The API developer workflow in APK provides a streamlined process for creating and deploying APIs. As an API developer, you can start by providing your API schema file, typically an OpenAPI file, to the Configuration Service. This service generates an APK configuration file that includes important API metadata, rate limiting details, security settings, and other necessary information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DzL4Cj7CUHGxQdS1" /></figure><p>To enhance the configuration process, APK offers a VS Code plugin that provides syntax highlighting and suggestions. This plugin makes it easier to add rate limitations, new resources, and security configurations to your API. Once you have completed the configuration editing, you have two deployment options.</p><p>For development scenarios, you can directly deploy the configuration to the runtime by calling the Deployer Service. This allows for quick and iterative deployments during the development phase. However, for production scenarios, it is recommended to commit the configuration to a source control system such as GitHub. This enables controlled and automated deployments through pipelines, ensuring a structured and controlled release process.</p><p>By incorporating source control in the workflow, you can effectively manage versions, revisions, and change histories of your configuration files. This enhances collaboration and control within the development team, facilitating better teamwork and code management practices.</p><h3>API Development Flow for Kubernetes Developers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-tn7yZQP0hdQwlDn" /></figure><p>In the diagram, we showcase how API Kubernetes artifacts can be easily generated from the provided configurations. APK aims to elevate APIs as first-class citizens in Kubernetes environments, and to achieve this, custom resources for APIs were created.</p><p>By invoking the Configuration Service, you can generate Kubernetes artifacts specifically tailored for APIs. These artifacts can be applied to a Kubernetes cluster using standard command-line tools like kubectl. However, in production scenarios, direct execution of kubectl commands on the runtime may not be feasible. In such cases, pipeline jobs play a vital role, where the generated artifacts are applied to the runtime through automated processes.</p><p>Many organizations have embraced Kubernetes practices and prefer working with Kubernetes configuration files and kubectl commands directly. This feature proves valuable to them, as it aligns with their existing workflows and allows for greater customization and control over API creation.</p><p>With this streamlined process, APK seamlessly integrates APIs into Kubernetes environments, enabling better management and utilization of API resources within the Kubernetes ecosystem. The workflow supports both development agility and production reliability, empowering API developers to create and deploy APIs effectively in APK.</p><h3>APK Gateway</h3><p>APK Gateway is a lightweight API gateway specifically designed for microservices architectures, with a strong focus on efficiency. It is purpose-built to seamlessly integrate with modern cloud platforms, ensuring smooth operation in cloud-native environments.</p><p>With its engineered scalability, APK Gateway can effortlessly handle increasing API traffic and adapt to growing demands. It offers rapid startup times, with an approximate 1-second initialization, ensuring instant availability and responsiveness.</p><p>Security and authentication are paramount, and APK Gateway enhances these processes by supporting self-validating tokens. This helps ensure the integrity and confidentiality of API communications. Additionally, the gateway provides compatibility with both mutable and immutable gateway configurations, allowing for flexibility in configuration management.</p><p>Whether you have small-scale or large-scale API deployments, APK Gateway is designed to handle them seamlessly. It is the ideal solution to meet your evolving needs, providing the power and agility required for efficient API management in microservices architectures.</p><p>Experience the benefits of APK Gateway and unlock the full potential of your microservices’ architecture, with enhanced performance, scalability, and security for your APIs.</p><h3>APK Control Plane</h3><p>In APK, the control plane plays a crucial role in managing the API lifecycle and overseeing administrative tasks. It consists of several domain services that work together to provide comprehensive management functionalities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pJTBR6DqdMq6JblR" /></figure><p>The Admin service serves as the backbone for administrative tasks, allowing users to manage organizations, users, and other high-level management activities. It provides essential capabilities for maintaining control over the API ecosystem.</p><p>The Back Office service is responsible for managing organizations, global policies, and other important aspects. It enables users to add and update documentation, define lifecycles, adjust portal visibility settings, and manage security protocols. It ensures efficient administration and configuration management.</p><p>For the developer portal, we have the Developer Portal DS, which offers an intuitive interface for developers. It facilitates API searching, subscription management, consumer application management, and client security. The Developer Portal DS enhances the developer experience by providing easy access to API resources and promoting collaboration.</p><p>These domain services expose REST APIs that users can interact with to perform various tasks. They interact with a Postgres database service, chosen for its efficiency in storing API metadata.</p><p>The user interface, built with React, hosts a suite of applications that provide user-friendly interfaces for creating, managing, and consuming APIs. These applications enhance the overall user experience by simplifying complex tasks and streamlining workflows.</p><p>The Management Server component acts as an intermediary between the control plane and the data plane. It facilitates communication and coordination between these two planes, ensuring efficient operation and seamless integration.</p><p>By leveraging the control plane components in APK, users can effectively manage the API lifecycle, perform administrative tasks, and provide a superior developer experience through intuitive interfaces and efficient coordination between the control and data planes.</p><h3>APK Scaling Capabilities</h3><p>Scaling capabilities are crucial for ensuring optimal performance and handling increased workload in APK, the API gateway solution. In a Kubernetes environment, APK leverages the Kubernetes Horizontal Pod Autoscaler (HPA) and the Kubernetes Metrics Server for automated scaling.</p><p>The Kubernetes HPA allows the gateway’s replicas to be automatically adjusted based on specific metrics such as CPU utilization, memory usage, or custom metrics. This dynamic scaling ensures that the gateway can efficiently handle varying traffic loads, maintaining optimal performance and responsiveness.</p><p>APK also supports vertical scaling, which enables organizations to manage the number of APIs and other resources. If the API count exceeds a certain limit, organizations have the flexibility to deploy multiple gateway partitions within the same cluster or opt for a multi-cluster deployment strategy. This allows for efficient resource allocation, load balancing, and high availability in the API management infrastructure.</p><p>By leveraging both horizontal and vertical scaling capabilities, APK empowers organizations to effectively manage their API traffic, optimize resource allocation, and deliver seamless performance even during peak demand. These scaling mechanisms enable businesses to adapt to changing requirements, scale their API infrastructure as needed, and provide exceptional user experiences to their customers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30a1134484b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Invoke Kubernetes APIs via simple HTTP client, Invoke k8s API programmatically.]]></title>
            <link>https://medium.com/@sanjeewa190/in-this-post-i-would-like-to-explain-how-we-can-invoke-k8s-api-and-receive-k8s-cluster-information-6da2f7db8967?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6da2f7db8967</guid>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Wed, 09 Nov 2022 11:11:31 GMT</pubDate>
            <atom:updated>2022-11-09T11:13:35.496Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post i would like to explain how we can invoke k8s API and receive k8s cluster information. When we develop applications, programs sometimes we will need to invoke k8s APIs to perform some complex deployment tasks and in this post we will see how we can do that step by step.</p><p>In my setup i have used Rancher desktop and k8s 1.24.3 version. Below instructions can slightly change in other versions.</p><p>First we need to create k8s user account. So for the creation of our user account, we will create service account, cluster role and cluster role binding. Please create below .yaml files for each of these resources and apply them into k8s cluster using</p><p>ServiceAccount.yaml</p><pre>apiVersion: v1</pre><pre>kind: ServiceAccount</pre><pre>metadata:</pre><pre>name: apk-platform</pre><pre>namespace: default</pre><p>ClusterRole.yaml</p><pre>apiVersion: rbac.authorization.k8s.io/v1</pre><pre>kind: ClusterRole</pre><pre>metadata:</pre><pre># &quot;namespace&quot; omitted since ClusterRoles are not namespaced</pre><pre>name: apk-role</pre><pre>rules:</pre><pre>- apiGroups: [&quot;*&quot;]</pre><pre>resources: [&quot;*&quot;]</pre><pre>verbs: [&quot;*&quot;]</pre><p>ClusterRoleBinding.yaml</p><pre>apiVersion: rbac.authorization.k8s.io/v1</pre><pre># This cluster role binding allows anyone in the &quot;manager&quot; group to read secrets in any namespace.</pre><pre>kind: ClusterRoleBinding</pre><pre>metadata:</pre><pre>name: role-binding</pre><pre>roleRef:</pre><pre>kind: ClusterRole</pre><pre>name: apk-role</pre><pre>apiGroup: rbac.authorization.k8s.io</pre><pre>subjects:</pre><pre># You can specify more than one &quot;subject&quot;</pre><pre>- kind: ServiceAccount</pre><pre>name: apk-platform # &quot;name&quot; is case sensitive</pre><pre>namespace: default</pre><p>Apply below 3 commands</p><blockquote><em>kubectl apply -f ServiceAccount.yaml<br>kubectl apply -f ClusterRole.yml<br>kubectl apply -f ClusterRoleBinding.yaml</em></blockquote><p>Set below varaible as we are going to use them in next steps</p><blockquote><em>&gt;&gt;SERVICE_ACCOUNT=apk-platform<br>&gt;&gt;APISERVER=https://$(kubectl -n default get endpoints kubernetes — no-headers | awk ‘{ print $2 }’)</em></blockquote><p>Now we have successfullycreate service account and cluster role binding. Next we will need to get token and certificate to invoke API</p><p>To get token execute following command with provided yaml file.</p><p>Token.yaml</p><pre>apiVersion: v1</pre><pre>kind: Secret</pre><pre>metadata:</pre><pre>name: apk-platform-token</pre><pre>annotations:</pre><pre>kubernetes.io/service-account.name: apk-platform</pre><pre>type: kubernetes.io/service-account-token</pre><p>Execute following</p><blockquote><em>kubectl apply -f ClusterRoleBinding.yaml</em></blockquote><p>Now you can see generated token , cert etc using below command</p><p>&gt;&gt;kubectl get secret “apk-platform-token” -o json</p><pre>{</pre><pre>“apiVersion”: “v1”,</pre><pre>“data”: {</pre><pre>“ca.crt”: “XXX”,</pre><pre>“namespace”: “ZGVmYXVsdA==”,</pre><pre>“token”: “XXXX”</pre><pre>},</pre><pre>“kind”: “Secret”,</pre><pre>“metadata”: {</pre><pre>“annotations”: {</pre><pre>“kubectl.kubernetes.io/last-applied-configuration”: “{\”apiVersion\”:\”v1\”,\”kind\”:\”Secret\”,\”metadata\”:{\”annotations\”:{\”kubernetes.io/service-account.name\”:\”apk-platform\”},\”name\”:\”apk-platform-token\”,\”namespace\”:\”default\”},\”type\”:\”kubernetes.io/service-account-token\”}\n”,</pre><pre>“kubernetes.io/service-account.name”: “apk-platform”,</pre><pre>“kubernetes.io/service-account.uid”: “e546dfae-7420–425f-881e-fcdcbe7ace9f”</pre><pre>},</pre><pre>“creationTimestamp”: “2022–11–09T08:07:51Z”,</pre><pre>“name”: “apk-platform-token”,</pre><pre>“namespace”: “default”,</pre><pre>“resourceVersion”: “43505”,</pre><pre>“uid”: “d2d4f3ae-aee6–4784–8a5f-fa7d1e874bfb”</pre><pre>},</pre><pre>“type”: “kubernetes.io/service-account-token”</pre><pre>}</pre><p>Now lets extract token and certificate using below commands</p><p>Extract token data into variable</p><blockquote><em>&gt;&gt;TOKEN=$(kubectl get secrets apk-platform-token -o json | jq -Mr ‘.data.token’ | base64 -d)</em></blockquote><p>Extract certificate information to file</p><blockquote><em>&gt;&gt;kubectl get secret “apk-platform-token” -o json | jq -Mr ‘.data[“ca.crt”]’ | base64 -d &gt; /tmp/ca.crt</em></blockquote><p>Now we have all required information to invoke k8s API. Lets execute curl command using token and certificate we obtained as follows.</p><p>curl -s $APISERVER/openapi/v2 — header “Authorization: Bearer $TOKEN” — cacert /tmp/ca.crt | less</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6da2f7db8967" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Results Are in: WSO2 Named a Leader in the “API Management Solutions, Q3 2020” Report]]></title>
            <link>https://medium.com/@sanjeewa190/the-results-are-in-wso2-named-a-leader-in-the-api-management-solutions-q3-2020-report-8031a06dddd3?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8031a06dddd3</guid>
            <category><![CDATA[forrester-research]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Wed, 05 Aug 2020 19:51:01 GMT</pubDate>
            <atom:updated>2020-08-09T11:39:50.161Z</atom:updated>
            <content:encoded><![CDATA[<p>The WSO2 API Manager team is happy to announce that WSO2 has been named a Leader in The Forrester Wave™: API Management Solutions, Q3 2020 report1. You can download the report [<a href="https://wso2.com/resources/analyst-reports/the-forrester-wave-api-management-solutions-q3-2020/?utm_source=wso2.com%2Fhome_page&amp;utm_medium=banner&amp;utm_campaign=forrester_wave_2020">https://wso2.com/resources/analyst-reports/the-forrester-wave-api-management-solutions-q3-2020</a>].</p><p>The new report2 examines the “15 providers that matter most” along 26 evaluation criteria. WSO2 and the other 14 companies were included because they had a prominent presence as API management vendors and met Forrester’s requirements for an API management solution that was complete and standalone.</p><p>For those of us on the WSO2 API Manager team, the report process started a few months ago when we answered a detailed questionnaire covering all the areas related to API management, explaining how our product supported a range of categories. We also provided our insights about our vision for the future of API management and our plans to cater to future demands. After we submitted our response, we provided a demo explaining our product capabilities and how they met real-world API management use cases and requirements.</p><p>We would like to take this opportunity to thank those who worked on the questionnaire and demo. Also, we must thank all our internal teams, customers, developer communities, partners, and everyone else with us throughout this journey. And big thanks go to the Forrester team for structuring a thorough analysis covering all of the aspects related to an API management solution. Additionally, we congratulate all of the vendors who participated in this evaluation.</p><h3>Our Report Highlights About WSO2 API Manager</h3><p>WSO2 API Manager is well known for its free and open-source nature. The product also comes with multiple extension points that allow users to customize the product to suit their requirements without changing the core product. Most of our customers and community users enjoy this flexibility and make maximum use out of that. The following are some of the highlights from the report about WSO2 API Manager’s flexibility and other capabilities.</p><p>The report3 notes that, “<strong>The fully open-source nature of the product adds an additional layer of flexibility, should customers need it, in addition to offering a free-forever path to getting started with API management through open source self-support.</strong>”</p><p>Over the last year, the WSO2 API Manager team spent significant time on innovation and research. As a result, we were able to include many new features and support new protocols, standards, such as GraphQL, WebSocket, and gRPC on top of the REST/SOAP API support we already offered. Moreover, we looked at how API management coexisted with service mesh and designed and developed components around that. Notably, we released API Manager Istio integration to address some of the API management requirements in service mesh environments. We also invested heavily in completely revamping our user interfaces.</p><p>The report4 mentioned some of our newer developments: “<strong>Notable features include GraphQL publishing support, deep microservice platform integration, good API product packaging, and full application integration features in WSO2’s Enterprise Integrator product</strong>.”</p><p>The report5 went on to say, <strong>“Key future product priorities include REST API design, more investment in microservices and non-REST APIs, deeper service mesh integration, CI-CD enhancements, and API ecosystems and product management.”</strong></p><p>Our WSO2 API Management solution goes beyond targeting just API design and development. Today most organizations have legacy services and APIs they started many years back. When we plan for a modern API-driven service layer, we cannot completely forget them. So integration capabilities. including brownfield integration, are important when taking the next step with what you already have. At the same time, API management products should support most modern microservice-driven service implementations as well. Our team equally understands and caters to both of these requirements.</p><p>The report6 notes that, <strong>“The solution particularly well suits buyers with strategies that combine integration, APIs, and microservices with a desire for the benefits of open source.”</strong></p><h3>A Look at WSO2 API Manager</h3><p>WSO2 API Manager is a full lifecycle API management solution. It supports API design, development, management/governance, and API behavior analysis capabilities. Different users, including API designers, developers, API product managers, API consumers, and partners can reap the benefits of this platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TJPpVAXC21IAumsJ" /></figure><p><strong>How WSO2 API Manager Helps Organizations to Implement an Integrated Supply Chain for APIs</strong></p><p>WSO2 API Manager can be deployed on-premises, on a private cloud, as a service in the cloud, or in a hybrid fashion where components can be distributed and deployed across multiple clouds and on-prem infrastructures.</p><p>It features a cloud-native API gateway and provides a Kubernetes operator for easily converting raw microservices into managed APIs. API Manager integrates with service meshes and offers a full-fledged management plane and control plane for managing, monitoring, and monetizing APIs and API products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TGDfDIk53dq2dAWp" /></figure><p><strong>Different Components and Inter-connectivity of the Combined WSO2 API Management Solution</strong></p><p>WSO2 is now the world’s 6th largest open-source software company. Our size and staff (600+) allow us to run a 24/7 operation with a global reach. We have sold and delivered into 60+ different countries with offices in California, New York, London, Berlin, Sydney, Sao Paolo, and Colombo. We have 133 partners worldwide to cater to different markets with a local presence. Last year alone we had 17 worldwide summits with partners with over 2,500 attendees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VP5Rr4zuj_cOxbZ3" /></figure><p><strong>How WSO2 Delivers Solutions to Our Customers via Our Global Offices and Partner Network</strong></p><p>The product investments we’ve made to help our customers in different industry verticals, such as banking, healthcare, finance, and retail, among others, have contributed heavily to this</p><p>growth over the last few years. Now WSO2 delivers mission-critical solutions across a range of industry sectors.</p><h3>Vision for the Future</h3><p>As a leader in the API management domain, we continue to invest our time and resources to analyze trends to predict the opportunities and demands of the future. Based on the different observations and feedback we get from our customers and community, we design and adjust our road maps from time to time. Currently, we plan to invest more in WebSockets and GraphQL as we see a growing use of those technologies in modern application development. Also, with the popularity of service mesh solutions for managing large microservices deployments, we will continue to put more effort into Istio-related work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HGLp9bfXJpD0rpYh" /></figure><p><strong>Our Near-Term and Mid-Term Future Plans</strong></p><p>Are you keen on getting started with the API management platform that is recognized as a Leader7 by Forrester Research, Inc.? Here are some links that will help you:</p><ul><li>WSO2 API Manager:<a href="https://wso2.com/api-management/"> https://wso2.com/api-management/</a></li><li>The Forrester Wave™: API Management Solutions, Q3 2020 report: <a href="https://www.forrester.com/report/Now+Tech+API+Management+Solutions+Q3+2020/-/E-RES161237">https://www.forrester.com/report/Now+Tech+API+Management+Solutions+Q3+2020/-/E-RES161237</a></li><li>WSO2 Customer Success Stories:<a href="https://wso2.com/about/customers/"> https://wso2.com/about/customers/</a></li></ul><p>Got any questions, or would you like to get in touch? Reach us via <a href="https://wso2.com/contact/">https://wso2.com/contact/</a>.</p><p>1Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” by Randy Heffner with Christopher Mines, Abigail Livingston, and Kara Hartig, August X, 2020.</p><p>2Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” August X, 2020.</p><p>3Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” August X, 2020.</p><p>4Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” August X, 2020.</p><p>5Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” August X, 2020.</p><p>6Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” August X, 2020.</p><p>7Forrester Research, Inc. “The Forrester Wave™: API Management Solutions, Q3 2020,” August X, 2020.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8031a06dddd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WSO2 API Manager Integration with Istio service mesh solution.]]></title>
            <link>https://medium.com/@sanjeewa190/wso2-api-manager-integration-with-istio-service-mesh-solution-a0c8546aef10?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0c8546aef10</guid>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 12:09:22 GMT</pubDate>
            <atom:updated>2019-12-20T12:10:48.932Z</atom:updated>
            <content:encoded><![CDATA[<p>I decided to write this article in December 2019 after we did API Manager release 3.0.0. Main reason to write this article is the Istio community decision to move away from the mixer and mixer adapter concept. Similar to WSO2 API Manager many other solutions which are based on mixer architecture now looking for alternatives. So the intention of this article is to explain our plan to support API Management in Istio service mesh without having mixer support. As you already know we have released API Manager Istio integration with a mixer plugin approach.</p><p><strong>Istio Integration with mixer plugin approach</strong></p><p>While Istio provides data plane (DP) and control plane (CP) capabilities, WSO2 API Manager provides management plane capabilities to manage microservices. When you need to expose a service to the outside in a managed way, the API developer can use the WSO2 API Publisher Portal to create the API by attaching necessary policies like security. The Publisher is capable of pushing all these policies in to the Envoy proxy via the Pilot and Mixer in order for them to take action with regard to policy enforcement. After publishing the API, it will appear in the WSO2 API Developer Portal. Thereafter, the app developer can discover these APIs and use them in their application along with all the capabilities provided by the developer portal such as, getting a subscription plan, adding application security etc. If you are a business user, you can use WSO2 API-M Analytics to get more business insights by looking at the API Analytics. Let us now see how service calls work with this solution and at which point API related quality of services gets applied. When a request comes from the outside, it first goes to the Istio proxy (Envoy) and then it will communicate with the Mixer(via mixer adaptor connected to WSO2 API Manager) in order to perform policy checks. Based on the outcome of the policy checks, the request may be routed to the service or an error should be sent back to the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uf4JPjPbhAePZuJE" /></figure><p>But recently the Istio community had some discussions about moving away from the Mixer and Mixer plugin concept. Hence most of the solutions developed using a mixer plugin approach now looking forward to new solutions. Similarly, the WSO2 API Manager team also evaluated some other approaches to implement API Management support in Istio service mesh. As of now we are evaluating 2 main approaches to add API Management support to service mesh. Please see below sections to get detailed understanding about each model.</p><p><strong>1. Istio integration with having API Microgateway in front of ingress gateway.</strong></p><p>With this approach API Manager gateway run time do not have specific dependency with Istio run time and API Gateway run time deployed in front of ingress gateway and handle north — south traffic to service mesh. Main advantage of this mode is not having dependency on the Istio system and its pods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2LsFBM8ur8qK4C84" /></figure><p><strong>2. Istio(permissive mutual ssl) integration with having API Gateway/microgateway replacing the ingress gateway</strong></p><p>Istio can be enabled to have permissive mutual TLS. In that case all the services accept both plain text and mutual TLS traffic. In these kinds of scenarios, the istio ingress gateway can be replaced with the API Gateway/microgateway. By having gateway at the edge make sure that istio microservices are protected and the TLS termination can be done successfully at the gateway level. And also enabling mutual ssl among microservices can cause additional overhead. So having a gateway at the edge(handles the north-south traffic) to handle secure connections as well as provide authentication/authorization instead of mutual ssl among services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fmJ3xXvWWHTroRjC" /></figure><p>When we deploy WSO2 API Manager with service mesh solution like Istio we need to carefully analyze requirements and decide which model is the right choice. Below table contains feature comparison between both of these models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-231cczsyGdBpWP4pzjyg.png" /></figure><p>In summary, considering all facts we believe Istio integration with WSO2 API Manager by deploying microgateway infront of ingress gateway or replacing gateway will be the best possible way of integrate WSO2 API Manager with Istio.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0c8546aef10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run your MSF4J Application in cloud foundry run time.]]></title>
            <link>https://medium.com/@sanjeewa190/how-to-run-your-msf4j-application-in-cloud-foundry-run-time-993f7cb80c1d?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/993f7cb80c1d</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Thu, 16 Aug 2018 12:15:49 GMT</pubDate>
            <atom:updated>2019-06-26T09:24:01.138Z</atom:updated>
            <content:encoded><![CDATA[<p>Article Moved to <a href="http://sanjeewa.me/index.php/2019/06/how-to-run-your-msf4j-application-in-cloud-foundry-run-time/">http://sanjeewa.me/index.php/2019/06/how-to-run-your-msf4j-application-in-cloud-foundry-run-time/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=993f7cb80c1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to deploy WSO2 API Microgateway in Google Kubernetes Engine]]></title>
            <link>https://medium.com/@sanjeewa190/how-to-deploy-wso2-api-microgateway-in-google-kubernetes-engine-7a3ec4f138e3?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a3ec4f138e3</guid>
            <category><![CDATA[microgateway]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker-kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Tue, 07 Aug 2018 10:36:11 GMT</pubDate>
            <atom:updated>2019-06-26T09:27:22.161Z</atom:updated>
            <content:encoded><![CDATA[<p>Article moved <a href="http://sanjeewa.me/index.php/2019/06/how-to-deploy-wso2-api-microgateway-in-google-kubernetes-engine/">to http://sanjeewa.me/index.php/2019/06/how-to-deploy-wso2-api-microgateway-in-google-kubernetes-engine/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a3ec4f138e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WSO2 API Manager Microgateway — This is applicable for version 2.5.0(initial release) only]]></title>
            <link>https://medium.com/@sanjeewa190/wso2-api-manager-microgateway-a32e37638c3a?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a32e37638c3a</guid>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[microgateway]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 04:20:18 GMT</pubDate>
            <atom:updated>2019-12-13T03:52:36.979Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*1LvpXxl5Xz_VI2Kc.jpg" /><figcaption>Source : <a href="https://videohive.net/item/plexus-technology-looped-background-2k/21522939">https://videohive.net/item/plexus-technology-looped-background-2k/21522939</a></figcaption></figure><p>Important- please note that this article applicable for API Manager initial release 2.5.0 only. Please refer <a href="https://sanjeewamalalgoda.blogspot.com/2019/12/wso2-api-manager-microgateway-and.html">this</a> article for more accurate details and comparison about API Manager microgateway 3.0.0 and later releases.</p><p><a href="https://sanjeewamalalgoda.blogspot.com/2019/12/wso2-api-manager-microgateway-and.html">https://sanjeewamalalgoda.blogspot.com/2019/12/wso2-api-manager-microgateway-and.html</a></p><h3>What is WSO2 API Manager Microgateway?</h3><p>WSO2 API Manager Microgateway is lightweight message processor for APIs. On a very high level, microgateway used for message security, transport security, orchestration, routing, and other common API Management related quality of services. It can process incoming and outgoing messages while collecting information required for usage metering and throttling capabilities. And microgateway natively support scaling in highly decentralized environments including microservice architecture. In addition to that immutable, ephemeral microgateway fits microservice architecture verywell. Microgateway capable to operate in lockdown environments such as IoT devices, since connectivity to API Management system from microgateway is not mandatory unlike API gateway.</p><p>Setting up micro gateways closer to your backend servers and on premise deployments not only reduce network latency, but it also adds additional security as you can run it in fully control environment with selected set of APIs. You can run micro gateway in regional data center, same instance your service implementation runs or if need you can do same in your local workstation as well.</p><p>In summary microgateway is simplified lightweight version of API gateway. It also supports most of the API gateway capabilities such as authentication/authorization, usage data metering, throttling etc. However microgateway only supports subset of capabilities of API gateway.</p><h3>Key Advantages of Microgateway</h3><p>Fits microservice architecture : Characteristics if microgateway helps it to fit well in microservice architecture. Since microgateway have small startup delay and consumes less resources its native support container based deployments. When there is requirement to scale microgateway we can do that easily. Immutable, ephemeral gateways helps to build cloud-native API Management solutions and if we have simple and infinitely repeatable deployments which use continuous integration/delivery it would be much easier with microgateway. Also with these capabilities server and node failures do not result in your service going down.</p><p>Accelerate rapid development : Unlike full API gateway, users can easily run set of selected APIs in controlled environment within seconds in microgateway. As example if some developer need to do quick debug on API invocation flow, then he can simply setup microgateway in local workstation without doing full blown deployment.</p><p>Low resource consumption and efficient — Microgateway is capable to run with very low memory and CPU consumption. Its lightweight design allows microgateway to load minimum required components to process API calls.</p><p>Reduce network latency — Users can deploy microgateway closer to backend services as per requirement. If need microgateway can deploy in regional data center or same sub net where your services resides. With this you do not need to route your API calls through internet or different network segments.</p><p>No configurations — Users do not need to do specific configurations when starts microgateway unless you need to change default behavior. Also its very easy to install, run and manage microgateways.</p><p>Dev-opts friendly — No programming need to setup and manage microgateway and we can do it only using configurations or environment variable which can override configurations. Also if need we can easily integrate microgateway management with container management system and automate deployment process.</p><p>Enhanced Security — If your API consumer and producer both resides in same network or close proximity then there is no point of routing that traffic through cloud gateway. We can simply route that traffic through microgateway resides within same network. It will help us to reduce network latency. And also route traffic within the same network boundaries help us to address some security concerns and compliance with certain regulations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*hArr6nrG1g9VIT4Ef8GuDw.png" /><figcaption>API Gateway Vs Microgateway Feature Comparison(above feature comparison is for initial microgateway release we did early 2019 please see below for API Micrigateway 3.0.1 )</figcaption></figure><h3>API Microgateway 3.0.1 Feature Comparison with API Gateway</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dFfGuHsyDJ-NgxjCfeTb-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHcilk9AtFBAbVjeVzLkfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y7fSKkRSInV3k3KUmeIDrA.png" /></figure><h3>When to use microgateway,</h3><ul><li>When we need to run gateway in lock-down environment or offline mode which do not have connection API Management system.</li><li>Run set of selected APIs in in controlled environment such as private jet gateway mode. Specially when we see unusual traffic pattern on one API and need to scale it alone.</li><li>Scale only set of selected APIs according to traffic patterns. Independently scalable set of APIs can run with microgateway.</li><li>Internal or on premise API gateway deployment where we have consumers(delivery channels) and service instances resides within same network. In such cases having microgateway within close proximity to backend server will reduce latency.</li><li>When there is a requirement to run gateway in sidecar mode along with application server within same runtime(or same pod in k8s world)</li></ul><p>When to use API gateway.</p><ul><li>When there is requirement to throttle API calls based on counters across all gateway nodes.</li><li>Run API gateway as centralized gateway which can handle requests for many different APIs and different backend servers.</li><li>Traditional SOAP architecture which requires Gateway to perform mediations, orchestrations.</li></ul><h3>Dependency on API Management Core Runtime</h3><p>From API Manager 2.5 release onward we will distribute API Microgateway toolkit which is responsible for microgateway related management tasks. It comes with command line tool which accepts commands issue by user. With this command line tool users will be able to communicate with API Management core runtime(API publisher) and build microgateway runtime. API Microgateway toolkit can communicate with API publisher to retrieve API metadata that required to create microgateway runtime.</p><p>API labeling concept allows API creators to add set of labels for APIs they create. Similar to tagging we can logically group APIs into different labels based on API characteristics. We can use different concepts for labeling APIs such as departments(as example we can think of HR, Finance, Engineering departments etc), privacy(internal, external, private), deployment locations(as example cloud, on-premise, hybrid) etc. API Microgateway toolkit designed in a way it can create microgateway per label basis. Usually when API gateway toolkit initiates label it will communicate with API core runtime and retrieve API data with specific label. Then create micro-gateway projects in provided workspace.</p><ul><li>Upon API Gateway CLI setup users are suppose to provide label name API Management core base URL, username and password. So with this information CLI can communicate with APIs exposed from API core. Then it will create project in workspace for given label and that will include all APIs under given label.</li><li>And also it will create all throttling policies that we need for runtime. You can those policies under /src/policies directory of each project.</li><li>Then when we issue build command it will build project and create single distribution that contains ballerina runtime with API definitions. Users can directly run this in their on premise deployment or local workstation.</li><li>Then users can run generate microservice in any environment they preferred.</li></ul><h3>Hybrid API Management Deployment with Microgateway.</h3><p>Most API Management solutions have some sort of API gateway within their component stack. And typically its acting as policy enforcement point and usage metering agent for API calls. Also it can add some other quality of services. If API Management solution offered as SaaS then typically this gateway running on cloud deployment and users can access that through internet.</p><p>Some organizations have strict security requirements due to internal policies and all API traffic management through the gateway must be done on-premise. Like discussed above there are some other advantages like reduced network latency also available with on premise deployments.</p><p>When we need to utilize capabilities of both these deployments we should go to some hybrid solution. Hybrid API Management is not a new thing for us at WSO2 and we keep supporting hybrid API Management for last few years. WSO2 solution to hybrid API Management is having centrally controlled API Management system while having set of on premise gateways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*SyX1NQnBP-w-BIWcv-XLGA.png" /></figure><h3>What you need to know about APIs in Microgateway</h3><p>API Manager Microgateway contain set of APIs retrieved from API Manager publisher. Also when we initialize microgateway it will retrieve some of the information which required to authenticate API calls. In addition to that when we initialize micro gateway we will generate required throttling policies and embed them to gateway project. So that means microgateway instance created will have all required information to process(authenticate, throttle requests etc) API calls. Microgateway toolkit capable to communicate with centrally deployed API Manager (publisher node) and retrieve all information required to bootstrap microgateway runtime.</p><h3>API Microgateway and Analytics</h3><p>When API traffic route through API gateway we will read incoming/outgoing messages and process them asynchronously to generate usage data. This asynchronous process allows gateway to process message without adding additional overhead to API invocation time. After extracting required information from messages they will publish to specific streams and eventually written to file system.</p><p>In gateway we do have configured periodic task to read these usage data files time to time and send them to central API Management system’s analytics node as compressed file stream. So analytics node can read these files and summarize them as usual. Then from that point onward analytics process have no difference in microgateway scenario and default synapse based gateway.</p><h3>API Microgateway security</h3><h4>Role of Central API Management System.</h4><p>Like discussed early API Microgateway toolkit need to communicate with API Manager runtime to retrieve all API metadata that need to bootstrap gateway runtime. And also API Manager runtime plays important role as its the one manage all client applications, access token management etc.</p><ul><li>Whenever user need to consume API which is deployed in microgateway, user will need to go to API store and subscribe to that API. Then same as usual process user need to generate access tokens or self contained token to invoke API. None of these user flows are different for microgateway as well.</li><li>Since micro gateways do not have access to any persistence store or database it do not communicate with central API Management system via file access or direct database calls. Microgateway will communicate with central API Management system only via web service calls and later we will see how that communication happens.</li></ul><h4>Client app authentication</h4><ul><li>Microgateway supports client authentication through OAuth 2.0 based access tokens and self contained tokens that end user can obtain.</li><li>Self contained token will be validated within microgateway itself and it do not need to communicate with central API Management runtime. So if you are having requirement of offline gateway then self contained token is the ideal solution for that.</li><li>But when user passed OAuth 2.0 based access token microgateway will communicate with central API Management system to validate access tokens. The main reason to perform above call is to retrieve additional information required to build authentication context within microgateway.</li></ul><h3>Can I move my existing APIs to Microgateway?</h3><p>Yes you can do that. If you have any mediation, orchestration related logic with your API then you will have consider moving that to separate microservice or integration layer before move that API to microgateway. With that approach we will able to utilize microgateway as per its design. And also dynamic endpoints, endpoint security do not support by microgateway right now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a32e37638c3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[General Data Protection Regulation (GDPR) for API Manager 3.0.0]]></title>
            <link>https://medium.com/@sanjeewa190/general-data-protection-regulation-gdpr-for-api-manager-3-0-0-685648cc831a?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/685648cc831a</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[gdpr]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Wed, 07 Mar 2018 11:24:54 GMT</pubDate>
            <atom:updated>2018-03-07T11:24:54.627Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently WSO2 API Manager team evaluated GDPR requirement(right to be forgotten) for API Manager 3.0.0 development. Our primary focus was to implement “right to be forgotten” without affecting core logic of the system.</p><h3>Right to be Forgotten</h3><p>Following is the design to address “right to be forgotten”.In API Manager 3.0.0 we do have set of MSF4J based microservices. Then ReactJS based apps developed on top of these APIs. Micro services directly call API publisher, store and admin implementations(via APIs). API Manager API layer will intercept each API call and change user name to pseudo name.</p><p>To do this internally we map real user to pseudo user and vise versa. It works like this.</p><ul><li>If pseudo name/username available then get mapping and return mapped value.</li><li>Else check mapping in storage and load it. Then return mapped value.</li><li>If mapping is not in database then add it to storage. Then return mapped value.</li></ul><p>And if we need to disable GDPR support due to some reason then above mentioned utility methods can return same attribute passed. Then it will not change anything and real user name will be used inside implementation.</p><p>As you can see in below image, API Manager implementation(boundary marked with green dash line) works only with pseudo name. Whenever it communicates with API layer or any other external system(two boxes connected to green box) we will change pseudo name to real user name. I have done a quick test with this implementation and now everything(logs, db entries, files etc) getting recorded with pseudo name. So whenever we need to delete user we just have to delete user and remove mapping. Our plan is to do same for light weight auth framework as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/0*1GF12iNhFo1G9MAf." /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=685648cc831a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fix “Dropping message after ENDPOINT_TIMEOUT of : 60 seconds” issue due to fixed default API…]]></title>
            <link>https://medium.com/@sanjeewa190/how-to-fix-dropping-message-after-endpoint-timeout-of-60-seconds-issue-due-to-fixed-default-api-6bf552ebf59d?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bf552ebf59d</guid>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-management]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Thu, 14 Dec 2017 09:15:25 GMT</pubDate>
            <atom:updated>2017-12-14T09:15:25.956Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to fix “Dropping message after ENDPOINT_TIMEOUT of : 60 seconds” issue due to fixed default API Timeout</h3><p>In API Manager we do have different timeouts. Let me quickly go through different timeout settings available with API Manager.</p><p>1. <strong>Global Timeout</strong> defined in synapse.properties (API_HOME\repository\conf) file. This will decide the maximum time that a callback is waiting in the APIM for a response for a particular request. If APIM does not get any response from Back End, it will drop the message and clears out the callback. This is a global level parameter which affects all the endpoints configured in APIM.</p><p>2. <strong>Socket Timeout</strong> defined in the passthru-http.properties (APIM_HOME\repository\conf) file. This parameter will decide on the timeout which a particular http request is waiting for a response. If APIM does not receive any response from the Back End during this period, HTTP connection get timed out and that will eventually throw timeout error in the APIM side and fault handlers will be hit.</p><p>3. <strong>Endpoint Timeout</strong> — You can define timeouts on the endpoint configuration such that it will affect only that particular endpoint in an API. This will be a better option if you need to configure timeouts per API endpoint for different Back end services. You can also define the action upon the timeout.</p><p>So its not sufficient to change only passthrough.http.properties (http socket timeout to 600000). Because even if you increased that, global timeout handler will trigger before that. So we need to change that as well to desired value(as mentioned above). So we can update global timeout and socket timeout both in configuration level(please do that as mentioned above and restart gateway nodes). Then from API level we can set different timeout in API level.</p><p>Here actual problem was default API(proxy of actual API without version) having different template which comes with predefined timeout for endpoint(60 seconds). Then it will trigger before actual API timeout.</p><p>To overcome this issue we can update velocity template to remove endpoint timeout from default API. Go to wso2am-2.1.0/repository/resources/api_templates directory and open default_api_template.xml file. Then we can template the way default API getting created. So we can remove timeout from default template so it will not effect to default API. We need to apply this change to API publisher node as it will create API definition and then push it to gateway.</p><p>Replace below in that file,</p><pre>&lt;timeout&gt;<br>&lt;duration&gt;60000&lt;/duration&gt;<br>&lt;responseAction&gt;fault&lt;/responseAction&gt;<br>&lt;/timeout&gt;<br>&lt;suspendOnFailure&gt;<br>&lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;<br>&lt;/suspendOnFailure&gt;<br>&lt;markForSuspension&gt;<br>&lt;retriesBeforeSuspension&gt;0&lt;/retriesBeforeSuspension&gt;<br>&lt;retryDelay&gt;0&lt;/retryDelay&gt;<br>&lt;/markForSuspension&gt;</pre><p>with,</p><pre>&lt;suspendOnFailure&gt;<br>&lt;errorCodes&gt;-1&lt;/errorCodes&gt;<br>&lt;initialDuration&gt;0&lt;/initialDuration&gt;<br>&lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;<br>&lt;maximumDuration&gt;0&lt;/maximumDuration&gt;<br>&lt;/suspendOnFailure&gt;<br>&lt;markForSuspension&gt;<br>&lt;errorCodes&gt;-1&lt;/errorCodes&gt;<br>&lt;/markForSuspension&gt;</pre><p>Then we will need to republish existing APIs to reflect this change to all APIs with default version. And for all new APIs create after this fix will update automatically.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bf552ebf59d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to do Blue-green Deployments, Canary Releases with WSO2 API Manager.]]></title>
            <link>https://medium.com/@sanjeewa190/how-to-do-blue-green-deployments-canary-releases-with-wso2-api-manager-81e7d353fe03?source=rss-ae0c17280e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/81e7d353fe03</guid>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Sanjeewa Malalgoda]]></dc:creator>
            <pubDate>Tue, 28 Nov 2017 17:01:40 GMT</pubDate>
            <atom:updated>2017-11-28T17:01:40.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>A typical WSO2 API Manager deployment requires an upgrade time to time. Usually we need to update deployment when we have fix, patch or critical security upgrade for products used in solution. When system upgrade perform it is common requirement to avoid any down time. Usually to address this use case system admins, devops follow blue-green, canary deployments to rollout updates. In this article we will discuss about doing blue-green canary releases in API Manager deployment context.</p><h3>API Manager Update and Patch Installation</h3><p>A typical WSO2 API Manager deployment requires an update time to time. Usually we need to update deployment when we have fix, patch or critical security upgrade for products used in solution. Most of the time these fixes comes as patch or WUM update with only jar or UI level changes. So majority of these updates do not have database or schema changes. When we have this kind of updates patches etc we do not need to worry about data replication between older and updated deployment. We can keep data layer as it is and update application only. To address this use case we will be able to use both blue-green and canary update process without making system read only.</p><h3>Canary Release for API Manager Product Update and Patch Installation</h3><p>Let me explain how we can do canary release for WSO2 API Manager upgrade. First we can take database dump of running system. Before we do that we need to make API Manager store and publisher read only. Otherwise we need to synchronize databases, file system, indexers etc. Usually production deployment rollouts happens within small time window. So we will be able to disable store and publisher operations(usually write operations) and let API gateway( which is more critical for live system), key manager and traffic manager to serve requests. If we need to have all API Manager instances running with read/write mode it will bit challenging as we need to replicate databases, file system changes across two different deployments.</p><p>So in this particular scenario we will assume we make API store, publisher and keep running API gateway and key manager. If we made API Manager store and publisher (and admin app ) readonly then APIs, Application, policies etc will not updated. Since API Manager gateway and key manager running and serve live traffic it may require to generate access tokens, revoke them etc. If we do any of these operations then we need to write entries to access token tables only (Its IDN_OAUT2_ACCESS_TOKEN and IDN_OAUTH2_ACCESS_TOKEN_SCOPE tables available in API Manager database).</p><h3>Migration Between Major Product Versions</h3><p>If we are doing API Manager deployment migration between major product versions then there will be schema and data changes. In such cases normally we recommend to do Blue-Green deployment. But if we really need gradual traffic movement to new deployment then we can follow canary process as well.</p><h3>Blue-green Deployment of API Manager.</h3><p>Blue-green deployment also allows us to do rapid way to rollback when we need to upgrade migrate API Manager deployments. Same as canary release there is an issue of dealing with missed transactions while the green environment was live. Let me explain how this happens. Usually we take dump of current running system and create another new deployment using data got from running system. In API Manager case even we made store and publisher readonly there can be access tokens generated between migration process(after we took dump and before we switch traffic to new deployment). So in this case we need to create one way sync up script which copies tokens created in live system to new system. So we need to create script to copy all newly added and updated entries in live system to migrated/updated system.</p><p>Other option is put complete system to read-only mode before cut-over, run it for a while in read-only mode, and then switch it to read-write mode. But for API Gateway this is not applicable solution as users do not need downtime at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/0*egHvkl9epnMNAX3X." /></figure><p>Image 02: API Manager Blue-green Deployment</p><p>How to do Blue-green Deployment</p><p>If we consider blue-green deployment then its same basic mechanism as you need to get a hot standby working. So this allows you to test your disaster recovery procedure on every release. The fundamental idea is to have two easily switchable environments. Now lets see how we can do blue-green deployment with WSO2 API Manager. Usually we recommend this pattern when we have to do API Manager migration between major versions.</p><ul><li>Create database dump of current running setup (Live system), and then restore it to lower environment.</li><li>Do sanity check. We need to check we have created dump properly and set up lower environment properly.</li><li>Create and test one way sync up script. In blue-green mode we do not route requests to both environments at same time. So here also we need to think about token tables if we make store and publisher read only. Ideally what we need is always copy new entries created in live deployment to new deployment.</li><li>Perform migration steps in lower environment if it is migration between major versions.</li><li>If its product upgrade or patch update then we need to follow instructions listed in readme file. In this case also we need to set up complete deployment using upgraded/ patch applied product distribution. Usually we use puppet, chef like deployment automation tool for this.</li><li>After performing migration, upgrade we can do quick sanity check.</li><li>Then we need to test all use cases end to end in migrated test deployment.</li></ul><p>Same as canary mode we need to follow below when we do real migration on live system. Here also we need to identify minimum traffic window.</p><p>Make API Manager store and publisher read only for maintain window.</p><p>Perform creating dump and restore to new environment.</p><p>Do migration, system update or patch application in new environment.</p><p>Run sync up script to update new tokens created in original deployment.</p><p>Then test functionalities using automated tests and manual tests.</p><p>Then once we are confident enough switch traffic to new(blue) deployment using DNS switch or load balancer level change.</p><h3>Canary Release for Product Updates</h3><p>In general terms, canary release is a technique to reduce the risk of switching traffic to complete new deployment in production by slowly routing subset of complete. Usually we do this before rolling it out to the entire infrastructure and making it available to everybody.</p><p>Similar to a blue-green Deployment, we can start this by deploying the upgraded version of our software into infrastructure, to which no traffic routed. Then we can start initial testing on that deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*moDEp8Bbs4akJD5r." /></figure><p>Image 01 : Canary Release for API Manager</p><h3>Upgrade and Release</h3><p>Now lets see how we can do API Manager upgrade and do canary release. This concept we can apply for product upgrades(usually via wso2 update manager or patch issued by wso2). If we consider major API Manager version then we will issue number of patches, updates for that particular version. Usually we do not have API level changes or critical non backward compatible changes on these updates, fixes. So we can easily do canary release when we upgrade system.</p><p>To make this article complete i will list down steps required to do canary release for API Manager product upgrade or patch application.</p><ul><li>Create database dump of current running setup (live system), and then restore it to lower environment.</li><li>Do sanity check. We need to check we have created dump properly and set up lower environment properly.</li><li>Create and test two way sync up scripts(if we have data changes) as in canary release mode we keep running both environments at same time. Like discussed early we need to focus on token tables if we make store and publisher read only. It’s important to test them thoroughly with production like databases and traffic pattern.</li><li>Now it’s time to update, patch lower environment. Then we will have deployment similar to production with newly released updates.</li><li>If its product upgrade or patch update then we need to follow instructions listed in readme file. In this case also we need to set up complete deployment using upgraded/ patch applied product distribution. Usually we use puppet, chef like deployment automation tool for this.</li><li>After performing upgrade we can do quick sanity check on test environment.</li><li>Then we need to test all use cases end to end in updated test deployment.</li></ul><p>Once we completed all above steps we know we can do real live system update. If an approval required from quality assurance team or test team then we can let them to involve with flow at this stage and let then to perform their tests on updated test deployment.</p><p>Now it’s time plan real product update. Before do anything, we need to analyze traffic pattern of the deployment for about one week or more to identify time slot for update. System maintainers should identify minimum traffic window for update. Once we followed above steps we can get rough idea about time take to final update and allocate time slot as per above analysis.</p><p>We need to do following for final product update.</p><p>Make API Manager store and publisher read only for maintain window(say 3 hours).</p><p>Perform creating dump and restore to new environment.</p><p>Do system update/patching in new environment.</p><p>Run sync up script to update new tokens created in original deployment.</p><p>Then test functionalities using automated tests and manual tests.</p><p>When you are happy with the new version, you can start routing fraction of traffic to this new deployment. There are different strategies to choose which traffic should go to new deployment. A simple strategy is to use a random set of requests to newly created deployment. Usually we can do this by adding load balancer, firewall rule saying route x% of traffic to new deployment. So if we send 10% of traffic to new deployment rest of the 90% will route to old deployment. Some organizations choose to release the new version to route internal traffic before releasing to public internet.</p><p>In large, distributed scenarios, instead of using a load balancer to decide which requests will be redirected to the new deployment, it is also common to use different partitioning strategies. If you have geographically distributed users, you can rollout the updates to one region first and then move to next regions. If need users can have multiple canaries.</p><p>One drawback of using canary releases is that you have to manage multiple deployments of API Manager at once. You can even decide to have more than two versions running in production at the same time, however it is best to keep the number of concurrent versions to a minimum. When we have multiple versions of product running at same its bit challenging to implement sync up scripts for token related tables.</p><h3>Conclusion</h3><p>In this article we discussed about blue-green and canary release models in WSO2 context. In API Manager deployments minimum downtime is very important requirement as many different clients, users invoke APIs(from different geo locations from different time zones etc) and API Management system do not have control over that. So uptime is critical for API Management system. At the same time it’s really important to maintain system upto date and apply critical patches, updates etc whenever they available. When we apply updates to system usually we need downtime window. If we follow blue-green and canary deployment patterns we can minimize this downtime. Since these deployment practices are proven patterns we recommend our users to follow these.</p><p>Usually when we have very high traffic and we are not sure about complete traffic switch to new deployment we can use canary deployment pattern to do gradual traffic movement. Specialty this is good solution for product updates and patching product(when we have minimum data changes).</p><p>If we are fully tested and confident about new deployment we may use blue-green pattern. Also we can use blue-green pattern easily if we have hot backup of live system. Generally Blue-green pattern used when we do complete product migration between major versions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81e7d353fe03" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>