<?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 Isuru Gunawardana on Medium]]></title>
        <description><![CDATA[Stories by Isuru Gunawardana on Medium]]></description>
        <link>https://medium.com/@byisuru?source=rss-2a2f43b6308a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1bFQ6ZGcUUsHBQVmkQEJ8w.jpeg</url>
            <title>Stories by Isuru Gunawardana on Medium</title>
            <link>https://medium.com/@byisuru?source=rss-2a2f43b6308a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:01:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@byisuru/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[The Future of Multi-factor Authentication]]></title>
            <link>https://byisuru.medium.com/the-future-of-multi-factor-authentication-557ff62e297?source=rss-2a2f43b6308a------2</link>
            <guid isPermaLink="false">https://medium.com/p/557ff62e297</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[multifactorauthentication]]></category>
            <category><![CDATA[behavioral-biometrics]]></category>
            <category><![CDATA[mfa]]></category>
            <category><![CDATA[biometrics]]></category>
            <dc:creator><![CDATA[Isuru Gunawardana]]></dc:creator>
            <pubDate>Wed, 15 Sep 2021 18:27:47 GMT</pubDate>
            <atom:updated>2021-09-16T04:04:29.948Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you think one-time passwords are still effective in multi-factor authentication? It seems like not anymore. According to the <a href="https://www.sc.edu/study/colleges_schools/law/centers/cybersecurity/_docs/fbi_cyber_pin/2019/fbi_pin-20190917_multi-factor_authentication.pdf">FBI</a>, which recently warned companies that threat actors are obtaining OTPs and circumventing MFA techniques.</p><p>But multi-factor authentication (MFA) authentication is a very popular term these days. In GDPR MFA is mandated and in Google, Github, Facebook we can enable two-step authentication to enhance the security of our data.</p><p>Multi-factor authentication and multi-step authentications are not the same things. When it’s the factor it has to be,</p><ul><li>Something you know</li><li>Something you have</li><li>Something you are</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JfbATIT2uF_P4R-c0Rsa6w.png" /><figcaption>Source: <a href="https://www.entersekt.com/images/Blogs/Behavioral-Biometrics-3-factor-authentication.png">https://www.entersekt.com/images/Blogs/Behavioral-Biometrics-3-factor-authentication.png</a></figcaption></figure><p>And when it’s multi-step it can be using the same factor or different factors.</p><p>When a hacker is trying to get access to an account in which MFA is enabled, the hacker needs to get access to multiple factors. So just by stealing a password hacker can’t get access to the account, which make his work harder.</p><p>Since OTP is something to avoid, what would be the secured way in MFA?</p><p><strong>Biometrics</strong> or <strong>behavioural authentication</strong> methods are a more secure way of authentication. Biometrics are pretty famous, it can be fingerprint or iris recognition or voice recognition. Behavioural authentication is a stronger factor as it’s hard to recreate. Considering all these, the ways of authentication can be divided into separate categories like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*WNBn_RZVzWE4Gnsgfq0aHg.png" /></figure><p>So what’s behavioural authentication methods?</p><p>Behavioural authentication is using the behaviours of a person to validate authentication action.</p><p>Behaviours from one person to another are very different, and it’s hard to pretend like another person. By considering these, behavioural methods like,</p><ul><li>The way people walk, known as gait recognition.</li><li>The way people hold and interact with a phone/tablet.</li><li>The way people use their mouse, known as mouse biometrics.</li><li>The way people type on their keyboards, known as typing biometrics or keystroke dynamics.</li></ul><p>increase the security of the authentication process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_lhUSBQnaKiS8rrP1OMirA.png" /><figcaption>Source: <a href="https://www.plurilock.com/wp-content/uploads/2019/11/behavioral-biometric-guide-intro.png">https://www.plurilock.com/wp-content/uploads/2019/11/behavioral-biometric-guide-intro.png</a></figcaption></figure><p>With the advancement of digital devices, the above behaviours can be recorded over some period and it can be used to compare and identify the identity of a person who is trying to log in. As an example device automatically checks the typing biometrics to confirm the same user is typing (entering) credentials right now.</p><p>Or it can also be used to notify if a device is stolen by checking the gait recognition. Likewise, there will be many advanced features will be out there with behavioural biometrics in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=557ff62e297" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Change Hostname in WSO2 IS with self signed certificate]]></title>
            <link>https://byisuru.medium.com/how-to-change-hostname-in-wso2-is-with-self-signed-certificate-ea547605e015?source=rss-2a2f43b6308a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea547605e015</guid>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[hostname-validation]]></category>
            <category><![CDATA[wso2is]]></category>
            <category><![CDATA[ssl-peer-failed]]></category>
            <category><![CDATA[self-signed-certificate]]></category>
            <dc:creator><![CDATA[Isuru Gunawardana]]></dc:creator>
            <pubDate>Tue, 15 Oct 2019 19:21:37 GMT</pubDate>
            <atom:updated>2019-11-19T06:22:43.170Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Change Hostname in WSO2 IS with self-signed certificate</h3><p>Assume you have setup WSO2 Identity Server instance in cloud and you want to access it with a hostname instead of the IP. It’s not very hard task if you are just accessing the console only. But if you are accessing the /dashboard of the WSO2 IS then it is.</p><p>Below steps will guide you through how to do that, and also it will fix the below common errors occurring when you are accessing the /dashboard.</p><pre>HTTP Status 500 - org.mozilla.javascript.JavaScriptException: JavaException: org.jaggeryjs.scriptengine.exceptions.ScriptException: SSL peer failed hostname validation for name:{x.x.x.x} (/dashboard/controllers/wsUtil.jag#76)<br></pre><pre>HTTP Status 500 - org.mozilla.javascript.JavaScriptException: JavaException: org.jaggeryjs.scriptengine.exceptions.ScriptException: SSL peer failed hostname validation for name: null (/dashboard/controllers/wsUtil.jag#76)<br></pre><pre>The javax.net.ssl.SSLException: hostname in certificate didn&#39;t match: &lt;ip addrees&gt; != &lt;localhost&gt;</pre><p>Let’s imagine our hostname is,<em> is.demo.com. </em>And IS console url would be <a href="https://is.demo.com:9443/carbon">https://is.demo.com:9443/carbon</a> and the dashboard url would be <a href="https://is.demo.com:9443/dashboard.">https://is.demo.com:9443/dashboard.</a> And below steps are tested with WSO2IS-5.7.0</p><ol><li>Update the {WSO2IS_HOME}/repository/conf/carbon.xml as below</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*Hi5ZCTeyMhZfm5llDynKHQ.png" /></figure><p>2. Update the local machine’s /etc/hosts file with below entry<br><em>{instance-ip} is.demo.com</em></p><p>3. And in the remote instance /etc/hosts file you need to add below entry<br><em>{internal-ip} is.demo.com</em></p><p>4. Let’s create the self-signed certificate. First let’s create JKS file as below. Note that the <em>hostname</em> is used as the <em>CN</em>. And <em>wso2carbon</em> is used as the alias. Below command will generate wso2demo.jks file.</p><pre>keytool -genkey -alias wso2carbon -keyalg RSA -keysize 2048 -keystore wso2demo.jks -dname “CN=is.demo.com, OU=Is,O=Chakray,L=SL,S=WS,C=LK” -storepass wso2carbon -keypass wso2carbon</pre><p>5. Then let’s export the public certificate from the above created KeyStore and let’s import that to the WSO2 IS client-trustore.jks as well. (Use the password <em>wso2carbon)</em></p><pre>keytool -export -alias wso2carbon -keystore wso2demo.jks -file pkn.pem</pre><p>Since there’s an already existing cert with the wso2carbon alias in client-truststore.jks first we need to remove that and add the new one as below. If not it will reject importing the certificate with the below error.</p><pre>keytool error: java.lang.Exception: Certificate not imported, alias &lt;wso2carbon&gt; already exists</pre><p>First delete the cert as below, (Use <em>wso2carbon</em> as the password)</p><pre>keytool -delete -trustcacerts -alias wso2carbon -keystore {WSO2IS_HOME}/repository/resources/security/client-truststore.jks</pre><p>Then import the new cert with the same <em>wso2carbon</em> alias as below.</p><pre>keytool -import -alias wso2carbon -file pkn.pem -keystore {WSO2IS_HOME}/repository/resources/security/client-truststore.jks -storepass wso2carbon</pre><p>6. Next step is to add the <a href="https://en.wikipedia.org/wiki/PKCS_12">PKCS12</a> file to the wso2carbon.jks in WSO2IS. In this case also we have to replace the existing cert which uses the wso2carbon alias with the new one.</p><p>First generating p12 file with wso2carbon password.</p><pre>keytool -importkeystore -srckeystore wso2demo.jks -srcstorepass wso2carbon -srckeypass wso2carbon -srcalias wso2carbon -destalias wso2carbon -destkeystore wsdemo.p12 -deststoretype PKCS12 -deststorepass wso2carbon -destkeypass wso2carbon</pre><p>Then importing the wsdemo.p12 file to wso2carbon.jks of the WSO2IS</p><pre>keytool -v -importkeystore -srckeystore wsdemo.p12 -srcstoretype PKCS12 -destkeystore {WSO2IS_HOME}/repository/resources/security/wso2carbon.jks -deststoretype JKS</pre><p>Above command will prompt for the keystore’s password and at the end ask whether we want to replace the existing entry for wso2carbon alias, enter <strong><em>yes</em></strong> and hit enter. Below is a sample output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*QWBdWZ6Z82R5qqj2vj_bnw.png" /></figure><p>Now everything is setup to access the remote WSO2 IS server’s dashboard via <a href="https://is.demo.com:9443/dashboard">https://is.demo.com:9443/dashboard</a> without any errors.</p><p>Earlier</p><figure><img alt="Earlier with errors" src="https://cdn-images-1.medium.com/max/1024/1*eZca45ENcusH-OJYo53nrw.png" /></figure><p>Now</p><figure><img alt="Now" src="https://cdn-images-1.medium.com/max/1024/1*sRW4YwfGEiJQFlrMACIi9A.png" /></figure><p><em>References</em><br><a href="https://docs.wso2.com/display/DS200/Troubleshooting+Guide"><em>https://docs.wso2.com/display/DS200/Troubleshooting+Guide</em></a><em><br></em><a href="https://docs.wso2.com/display/IS570/Changing+the+hostname"><em>https://docs.wso2.com/display/IS570/Changing+the+hostname</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea547605e015" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Native Application Development with Ballerina]]></title>
            <link>https://byisuru.medium.com/cloud-native-application-development-with-ballerina-8eca9d8f1901?source=rss-2a2f43b6308a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8eca9d8f1901</guid>
            <category><![CDATA[ballerinalang]]></category>
            <category><![CDATA[ballerina]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Isuru Gunawardana]]></dc:creator>
            <pubDate>Thu, 22 Nov 2018 20:33:29 GMT</pubDate>
            <atom:updated>2018-11-22T20:33:29.136Z</atom:updated>
            <content:encoded><![CDATA[<p>What is Cloud Native Application?<br>Application which are written to take full advantages of cloud computing frameworks are called cloud native applications.</p><p>According to the <a href="https://www.cncf.io/about/charter/">cloud native computer foundation</a> a cloud native application should have below properties,</p><ol><li>Container packaged<br>Which means application should be able to run in a container. This makes the application is an isolated unit of deployment and also it makes possible to achieve high levels of resource isolation as well. In developers context this encourage, the code and components to reuse and simplify operations for cloud native application.</li><li>Dynamically managed<br>Which means the applications should be able to actively scheduled and managed by a central orchestrating process. This improve the machine efficiency and resource utilization while reducing the cost.</li><li>Micro-services oriented<br>This increase the agility of the the development of the application and the solutions are loosely coupled with dependencies.</li></ol><p><a href="https://ballerina.io/">Ballerina</a> is a programming language which has above properties. And that clearly makes the Ballerina is a cloud native programming language.</p><p>Ballerina has reduce the effort of configuring container details in config files. Instead all we need to do is annotate with relevant information in the code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29ccecae984cca1ecd6e48a4f46609e6/href">https://medium.com/media/29ccecae984cca1ecd6e48a4f46609e6/href</a></iframe><p>itself. And when building the code it generates the <a href="https://docs.docker.com/glossary/?term=Dockerfile">Dockerfile</a> based on the provided information.</p><p>This is an example for annotation level configuration for docker from a <a href="https://github.com/igunawardana/currency-watcher/blob/v0.1.01/currency-reader/currency.bal">sample project</a>. Here it is configured, the values to be read from environment variables. Refer Ballerina documentation <a href="https://ballerina.io/learn/how-to-deploy-and-run-ballerina-programs/">here</a> for more details on the config parameters.</p><p>Ballerina also provide annotation based <a href="https://ballerina.io/learn/api-docs/ballerinax/kubernetes.html">configuration for Kubernetes</a>. This will also do the same like Docker, when building the ballerina code it will generate required yaml files relevant to the annotated configs. Please refer <a href="https://medium.com/@kapilanishantha/ballerina-services-with-kubernetes-3f8a70683940"><em>Ballerina services with kubernetes</em></a> blog post to get more information on this.</p><p>Ballerina is specifically designed for integrations and Microservices best practices are baked in to Ballerina language. As an example <a href="https://microservices.io/patterns/reliability/circuit-breaker.html">Circuit Breaker pattern in Microservice</a> can be easily <a href="https://ballerina.io/learn/by-example/http-circuit-breaker.html">configured in Ballerina</a> as it is baked in to the language. And also in Microservices multiple services can be participating in a global transaction. In that scenario transaction context should be passed from one service to the other then it has to be coordinated and managed. To achieve this, in Ballerina we can implement distributed transactions which will improve the reliability of microservice-based applications. An example can be found <a href="https://ballerina.io/learn/by-example/transactions-distributed.html">here</a></p><p>Ballerina is network aware, we can define client and server endpoints with Ballerina. And Ballerina supports HTTP/S, HTTP2, gRPC, WebSocket and JMS. And also we can extend the Ballerina endpoints to support any other protocols as it is an extension point in Ballerina.</p><pre>endpoint http:Listener httpServiceEndpoint{...}</pre><pre>endpoint http:Client fixerClientEp {...}</pre><pre>endpoint grpc:Listener grpcListenerEndpoint {...}</pre><p>In client endpoints apart from protocol level endpoints, we can see there are higher level endpoints for APIs.</p><pre>endpoint twitter:Client twitterClient {...}</pre><p>You can find / <a href="https://ballerina.io/learn/how-to-extend-ballerina/">write connectors</a> to communicate with any API and publish it to <a href="https://central.ballerina.io/">Ballerina Central</a>.</p><p>When thinking about the agile nature of the development, Ballerina is designed thinking about the lifecycle concepts for microservices and their best practices. Those are baked into Ballerina language in the form of Ballerina’s build system, Ballerina Central, Teseterina and Docker / K8S artifacts generation during the build.</p><p>One other additional thing to mention about Ballerina is we can visualize</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alyjwM9hVIbDW494qwCPkw.png" /></figure><p>what we writing in a sequence diagram. This is very useful to understand and explain what the written code is supposed to do. And also in enterprise level development project this will be used by integration analyst or even business people to get an idea about the use case.</p><p>This is sequence diagram is for <a href="https://github.com/igunawardana/currency-watcher/tree/v0.1.01">simple use case</a> which gets exchange rates from public API. And this diagram is auto generated based on the code written in ballerina. It’s very helpful to see an overview of the use case through sequence diagram to understand the flow.</p><p>References:</p><p><a href="https://ballerina.io/learn/by-example/http-circuit-breaker.html">https://ballerina.io/learn/by-example/http-circuit-breaker.html</a><br><a href="https://www.cncf.io/about/charter/">https://www.cncf.io/about/charter/</a><br><a href="https://www.youtube.com/watch?v=oy8hMTmgpJ8">https://www.youtube.com/watch?v=oy8hMTmgpJ8</a><br><a href="https://www.youtube.com/watch?v=WvgGPQAvHok">https://www.youtube.com/watch?v=WvgGPQAvHok</a><br><a href="https://www.youtube.com/watch?v=7MJVswRVu2o&amp;t=5s">https://www.youtube.com/watch?v=7MJVswRVu2o&amp;t=5s</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8eca9d8f1901" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EIP With Ballerina : Content Based Router]]></title>
            <link>https://byisuru.medium.com/eip-with-ballerina-content-based-router-ac84e104d142?source=rss-2a2f43b6308a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac84e104d142</guid>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[ballerinalang]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[Isuru Gunawardana]]></dc:creator>
            <pubDate>Sat, 17 Mar 2018 00:42:15 GMT</pubDate>
            <atom:updated>2018-03-17T01:07:10.029Z</atom:updated>
            <content:encoded><![CDATA[<p>How easy it is to use the <a href="http://www.enterpriseintegrationpatterns.com/patterns/messaging/ContentBasedRouter.html">Content Based Router</a> (CBR) pattern in Ballerina.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s5JlQzP89B_i8wxb5M9k-Q.jpeg" /></figure><h3>EIP</h3><p>When developing systems to integrate new and existing software in a business environment, Enterprise Integration Patterns (<a href="http://www.enterpriseintegrationpatterns.com/patterns/messaging/">EIP</a>) is a catalogue of design patterns specifically design for integration.</p><blockquote><a href="http://www.enterpriseintegrationpatterns.com/patterns/messaging/">Enterprise integration is too complex to be solved with a simple ‘cookbook’ approach. Instead, patterns can provide guidance by documenting the kind of experience that usually lives only in architects’ heads: they are accepted solutions to recurring problems within a given context.</a></blockquote><h3>Ballerina</h3><p>If you are someone who is keen on enterprise application integrations, you may have already heard about <a href="https://ballerinalang.org/">Ballerina</a>,</p><blockquote>Ballerina is a general purpose, concurrent and strongly typed programming language with both textual and graphical syntaxes, optimized<strong> for integration</strong>.</blockquote><h3>Content Based Router</h3><p><a href="http://www.enterpriseintegrationpatterns.com/patterns/messaging/ContentBasedRouter.html">Content Based Router</a> (CBR) is an EIP which is used in a scenario where, each message should be routed to a specific recipient based on its content. Special caution should be taken on making the routing function easy to maintain as the router can become a point of frequent maintenance in this pattern. Below code snippet is an example of how to implement this EIP using Ballerina with a simple routing function.</p><p><em>Version: Ballerina 0.964.0<br>GIT Project: </em><a href="https://github.com/igunawardana/ballerina-eip/tree/master/content-based-routing"><em>content-based-routing</em></a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ede977bfe4c27f0572201501d5188f45/href">https://medium.com/media/ede977bfe4c27f0572201501d5188f45/href</a></iframe><p>Since the routing logic is externalized above, it can be even enhanced to use a rule engine later. And the logic or mapping of the rule can be easily maintained with some enhancements to the below function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0375f7754f5c97064728b75ab77847aa/href">https://medium.com/media/0375f7754f5c97064728b75ab77847aa/href</a></iframe><p>References:<br><a href="https://ballerinalang.org/docs/by-example/content-based-routing">https://ballerinalang.org/docs/by-example/content-based-routing</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac84e104d142" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>