Posts

What is an API Gateway?

Image
API Gateways have become a critical component in the current Microservices based architectures, providing common functionalities required by APIs such as routing, API authentication, access control, rate limiting, billing, capturing analytics, monitoring and providing much needed decoupling between a client and the backend services. To understand further onto what an API gateway is, it is best to start from how it has evolved to exist. There are two clearly identifiable categories of API gateways in the market; Reverse proxy products that revolved into becoming API gateways, adding features to the core product eg. Nginx API Manager vendors who broke their monolithic application into microservices which let one of those to be API gateway. Starting from the first category is best to understand the initial requirements. Reverse proxies were already in the market, addressing the need of hiding the internal details of a system and providing an abstract interface for the external parties, i

Ajax to auto populate table data periodically

Image
 Let's consider below use case. The train schedule is adjusted by the control room and exposed as a REST API to be displayed at each train station in near real time. So show the updated details to their passengers, these train station displays should call this REST API in a reasonable frequency and update the information. Below implementation shows how this can be achieved using Ajax technique. This can be used to any similar use case. The full sample code can be located at https://github.com/kladrock/ajax-sample-auto-refresh-table . To simulate the response from the train schedule REST API, we use this, https://raw.githubusercontent.com/kladrock/klad-rocks/main/trains.json . First we need to call get the data from the REST API. It's done in the below code segment. function loadData() { $("#example").DataTable(); $.ajax({ type: 'GET', url: testDataUrl, contentType: "text/plain", dataType: 'json',

How to run MSSQL in Linux

If you are a Microsoft fan or your company is relying on Microsoft technologies, in most of the cases, the database in use will be MSSQL. But if you want try out the things in a Linux based system like Redhat or Ubuntu it is convenient to run an MSSQL instance in the local machine itself. With docker we have a faster and feasible solution. Here I will share the relevant commands and instructions to get started right away. 1. Pull the docker image docker pull mcr.microsoft.com/mssql/server   This will download the latest mssql server tag. 2. To start the container docker run --name MSSQLLatest -d -p 1433:1433 -e "SA_PASSWORD= <StrongPassword>" -e "ACCEPT_EULA=Y" mcr.microsoft.com/mssql/server   These command options are case sensitive. We have mapped default port 1433 to itself of the host machine. You can choose another if that port is occupied. Choose a password of your own in place of '<StrongPassword>'. 3. To start and stop the MSSQL server y

Sign into Dokuwiki with Google

Image
Dokuwiki(https://www.dokuwiki.org/dokuwiki) is a nice and helpful gift by the opensource community. Being a favor of administrators for ease maintenance and integration options, it caters the needs of a content management system or as a corporate or a personal note keeper. In this post I am sharing an approach we followed to keep this simplicity as it is, while making it available for an existing Google user-base via Single Sign On capabilities. We made use of the extend-ability of Dokuwiki via plugins and OAuth 2.0 protocol based integration provided by Google for this purpose. Let's look at the flow and then how this was configured.   Flow As in the diagram, when the user comes to the Dokuwiki login page, we want to show them the option of login via Google. With this feature available, if they are already logged into Google, they will be automatically logged into Dokuwiki with Single Sign On in action. If not, they will go through the Google login procedure at Google site, as usu

WHMCS Based Login for WordPress

Image
 This is to share the experience of a cool project I completed recently. It is perfect integration to have users login to WordPress site, a web hosting solution, using WHMCS being a Web Hosting Billing & Automation Platform. We have a plan to extend this further to other web hosting solutions in use. For this particular integration we have two requirements. Users in WHMCS should be able to seamlessly login to Wordpress to manage it. If the user authenticated at WHMCS is already present in WordPress link them, else create a new user with the details received from WHMCS. We have the well known standard protocols used for similar scenarios based on SAML 2.0 ( http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html ) and OpenIDConnect 1.0 ( https://openid.net/connect/ ). Based on the future direction, wide usage and availability of plugins we selected OIDC(OpenID Connect) to go forward. There were whole lot of plugins available for us in this journey to select

Shibboleth based SSO for SAP

Image
  This was a very interesting project I did with a customer from Israel. They had already selected Shibboleth as the IDP for the solution, where they wanted to login to SAP Hana Cockpit and provide Single Sign-On with variety of other web applications they have. Main reason behind selection of Shibboleth has been free use being a free and open source software. I did setup an OpenLDAP instance for the user base with an structure selected based on the hierarchy they wanted and integrated it with Shibboleth first. SAP Hana Cockpit platform was new to me, but they had good documentation and with little effort could figure out on SAML based authentication they supported. Then we did the integration with Shibboleth which made the scenario complete as follows. User comes to login to SAP Hana Cockpit platform via it’s link. User is redirected to Shibboleth and provided it’s login screen. (We branded it.) User enters credentials which were validated against the OpenLDAP . (We are to have SMS b

Single Sign On Integrations - Intro

Image
Single Sign on(SSO) is everywhere and provides lot of convenience to users. Let me give you few more examples. Have you noticed that when we are logged into our Gmail account and go to Youtube within the same browser, we are automatically logged into Youtube without any further requests for user credentials or authentication.  In today's cooperate world with COVID-19 impact, employees and partners heavily use cooperate applications such as Zoom, Salesforce, Jira in working from home efforts. Authenticating once and letting them securely use all these cooperate applications in another productive use of Single Sign On. In the Education sector also, COVID-19 impact has made the students and teachers to heavily depend on online tools. At such occasion also Single Sign On integration among these educational applications such as Moodle, Office365, Yammer etc, provide lot of convenience. User convenience is not the only benefit of Single Sign on though. It provides a lot more convenience