<?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 Yasara Yasawardhana on Medium]]></title>
        <description><![CDATA[Stories by Yasara Yasawardhana on Medium]]></description>
        <link>https://medium.com/@yasarayasawardhana?source=rss-c72789a6081f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GW6zvOa9ADWoHBdF</url>
            <title>Stories by Yasara Yasawardhana on Medium</title>
            <link>https://medium.com/@yasarayasawardhana?source=rss-c72789a6081f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 18:50:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yasarayasawardhana/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[Exploring Azure Cosmos DB — Part I]]></title>
            <link>https://yasarayasawardhana.medium.com/exploring-azure-cosmos-db-part-i-a164cbd8f7f5?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a164cbd8f7f5</guid>
            <category><![CDATA[cosmosdb]]></category>
            <category><![CDATA[nosql-database]]></category>
            <category><![CDATA[azure-services]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 02 Oct 2022 14:56:58 GMT</pubDate>
            <atom:updated>2022-10-02T14:56:58.721Z</atom:updated>
            <content:encoded><![CDATA[<h3>Exploring Azure Cosmos DB — Part I</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/0*3WxVfllvtW1sO3aG.png" /></figure><p>Before getting started with Azure Cosmos DB, lets see what NoSQL database is when compared to an SQL database, which will help us understand more on why and when to use cosmos DB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*uCSvtLz9qSstJ1mK0qf5mA.png" /></figure><h4>Introduction to Cosmos DB</h4><p>Cosmos DB belongs to the NoSQL database category. It is a Paas (Platform as a service) which is a fully managed, globally distributed, multi-model NoSQL database service provided by Microsoft Azure. It provides extremely low latency, high availability, and consistency and supports multi-region (Geo) replication too.</p><p>Azure Cosmos DB provides support for 5 database APIs with SDKs for many programming languages and platforms. The API we choose to interact with the Cosmos DB service depends on the data model that we intend to use with our database. The following table summarizes the five APIs offered for Azure Cosmos DB based on the four NoSQL data models:</p><h4>5 APIs of Cosmos DB</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*1M6egXEMob7pb5PmlivYuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JXHixhNESPvlRt7J.png" /></figure><ol><li>SQL API : This supports JSON documents and SQL-based queries.</li></ol><p>2. Mongo DB API : Supports Mongo DB APIs and JSON documents.</p><p>3. Gremlin API : Supports Gremlin API with graph-based nodes and edge data representations.</p><p>4. Cassandra API: Supports Casandra API for wide column data representations.</p><p>5. Table API — Supports Table API for Table Storage with premium capabilities.</p><p>Although support for all endpoints is there we should carefully review the use-cases before deciding on the API to avoid possible future blockers. There are limitations in functions available for MongoDB, Cassandra and Gremlin APIs. The most recommended one is the SQL API which has a maintained and active <a href="https://github.com/Azure/azure-cosmos-dotnet-v3">Github repo</a>.</p><h4>Cosmos DB resource model</h4><p>We can classify the Cosmos DB resource model into 4 Pillars: Account, Database, Container and Item.</p><p>The following diagram shows the generalized hierarchy of the Cosmos DB:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7KEcxZ5ezygL1CFd.jpg" /></figure><p><strong>1st Layer-Account: </strong>The foundation of every cosmos DB is an ‘account’ which represents a set of configurations and using them we can perform administration tasks, such as:</p><ul><li>Global data replication</li><li>Consistency levels</li><li>Backup strategy</li><li>Private endpoints</li><li>Firewall rules</li></ul><p>An account can have as many databases created as you want.</p><p><strong>2nd layer-Database:</strong> Its like a light logical “box” encapsulating data access and capacity allocation. These databases can be either of type <strong>key-value, column, document</strong> or<strong> graph</strong> which are the 4 NoSQL database types explained above. Moreover, each database can have a set of containers.</p><p><strong>3rd layer-Container: </strong>Container is where the data is stored. It is a schema-agnostic container of entities, stored procedures, user-defined functions (UDFs) and triggers<strong>. </strong>Depending on the Cosmos API selected, a container is realized as <strong>table, collection or graph</strong>. Few main features of a container are;</p><ul><li>Containers contain consolidated <em>JSON </em>documents and associated JavaScript logic for writing store procedures, triggers, user defined functions.</li><li>Ability for either <em>AutoScale</em> or <em>manual </em>scaling where we can mention the throughput(Request Unit or RU) request unit<em>.</em></li><li>‘Time to live’ option which helps to automatic delete items from collections.</li></ul><p><strong>4th layer-Item:</strong> Cosmos item can be as a <strong>document</strong> in a collection, <strong>row</strong> in a table, <strong>node</strong>, or <strong>edge</strong> in a graph. Basically, items comprises of the data content inside a container.</p><h4>What is Azure Cosmos DB partition key?</h4><p>Partition key is a very crucial decision that you need to take when creating the DB containers which directly affects the performance and latency of queries.</p><p>In terms of writing efficient queries, Cosmos DB allows you to group a set of items in your collection by a similar property determined by the <strong><em>partition key</em></strong><em>.</em> Partition keys are the core element to distributing your data efficiently into different <em>logical</em> and <em>physical</em> sets so that the queries performed against the database are completed fast.</p><p>Since you cannot change the partition key once the container is created, it is required to choose the partition key during the design phase of the application architecture.</p><p>Physical partitioning:</p><p>Cosmos DB is designed to scale horizontally based on the distribution of data between <em>physical partitions</em>. These partitions are self-sufficient nodes which can be separately deployed and are synchronized and coordinated by a central gateway.</p><p>Logical partitioning:</p><p>Logical partitions are a set of documents which share the same characteristic <em>(partition key)</em> and they all are usually persisted fully in the same physical partition.</p><h4>How to create an Azure Cosmos DB</h4><p>You can refer the below step-by-step guide to create a cosmos DB, write a sample JSON data and run a simple query in the cosmos DB data explorer.</p><p><a href="https://learn.microsoft.com/en-us/azure/cosmos-db/sql/create-cosmosdb-resources-portal">Quickstart - Create Azure Cosmos DB resources from the Azure portal</a></p><p>You have reached the end of this blog-post. I hope you got a basic understanding of the core concepts in Cosmos DB and why and when to use it in real world applications. Hence as the next step of this blog series, I will guide you on how to build a simple java project to write bulk document data to Cosmos DB and query from those persisted DB data. Stay tuned ..!</p><h4>References</h4><ul><li><a href="https://learn.microsoft.com/en-us/azure/cosmos-db/choose-api">Choose an API in Azure Cosmos DB</a></li><li><a href="https://learn.microsoft.com/en-us/azure/cosmos-db/sql/create-cosmosdb-resources-portal">Quickstart - Create Azure Cosmos DB resources from the Azure portal</a></li><li><a href="https://www.infoq.com/articles/Cosmos-DB-Tutorial/">An Introduction and Tutorial for Azure Cosmos DB</a></li><li><a href="https://parveensingh.com/cosmos-db-parition-keys/">Azure Cosmos DB Partitions &amp; Partition Keys Simplified</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a164cbd8f7f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integration of TypingDNA with WSO2 Identity Server]]></title>
            <link>https://yasarayasawardhana.medium.com/integration-of-typingdna-with-wso2-identity-server-5e55de3582db?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e55de3582db</guid>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 11 Sep 2022 15:56:31 GMT</pubDate>
            <atom:updated>2022-09-12T03:16:22.507Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*qTSeS3iQGQYx-AOLoJWloA.jpeg" /></figure><p>TypingDNA is a technology that is able to authenticate people based on the typing patterns by analyzing the way we type and creating our own ‘typing identity’.</p><p>Being a Romanian startup, TypingDNA developed their own AI-based algorithms to make this work. This technology observes factors such as the time it takes to press, release, and move between keys, so TypingDNA can recognize user login attempts and other important security elements.</p><p>TypingDNA technology, known as typing biometrics, creates a safer internet. It allows for known applications, such as authentication, fraud detection or password recovery, and it can be used in a lot of fields, from banking to online assessments.</p><p>To highlight the importance of this feature, consider the fact that almost any device today has a keyboard. Implicitly, typing behavior can become the most common biometric system for regular users. hence leveraging typing biometrics into an identity management solution is important as an additional layer of robust protection against potential cyber threats.</p><p>WSO2 Identity Server 5.11.0 onwards has the support for typingDNA feature. I will take you through a simple demonstration of authenticating to a sample application when typingDNA is enabled.</p><ol><li>Download and install the <a href="https://github.com/wso2/product-is/releases">WSO2 identity server</a>.</li><li>Download the typingDNA authenticator and artifacts from <a href="https://store.wso2.com/store/assets/isconnector/details/f6556b4f-bb18-4b1b-a7c1-39e6b3657b15">IS connector store</a>.</li><li>Copy the downloaded org.wso2.carbon.identity.conditional.auth.typingdna.functions-x.x.x.jar file into the &lt;IS-Home&gt;/repository/components/dropins directory.</li><li>Copy the api#identity#typingdna#v_.war file into the &lt;IS-Home&gt;/repository/deployment/server/webapps directory.</li><li>Add the below configuration in the &lt;IS-Home&gt;/repository/conf/deployment.toml file.</li></ol><pre>[myaccount.security]<br>enabled_features=[&quot;security.loginVerifyData.typingDNA&quot;]</pre><p>7. If you are having IS 5.11.0 version, there are few more additional configs to be done which are listed <a href="https://github.com/wso2-extensions/identity-conditional-auth-typingdna/blob/main/docs/config_IS5.11.0.md">here</a>.</p><h4><strong>TypingDNA account setup</strong></h4><p>1. Signup <a href="https://www.typingdna.com/clients/signup">here</a> to create a new typingDNA account. See <a href="https://github.com/wso2-extensions/identity-conditional-auth-typingdna/blob/main/docs/files/Account%20Creation.pdf">the instructions</a> for more details.</p><p>2. Login to the account and navigate to Authentication API tab. Go to the API settings and enable <em>Auto-enroll</em> and <em>Force initial enrollments</em> as shown in the screenshot below. Fill the other required fields too, according to your requirement.</p><p>Minimum initial enrollments mean the no of times it will initially enroll the pattern automatically without verification, for each unique user. I have set this figure to 3, so that the typing pattern verification will happen from the 4th enrollment onwards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*oX_Ecx0eN47J_-BTk7l8Vg.png" /></figure><h4>TypingDNA configuration in the Identity Server</h4><p>1. As Adaptive Authentication is disabled by default from IS 6.0.0 onwards, enable it by running adaptive.sh script in &lt;IS_home&gt;/bin folder.</p><p>1. Run the below command from the same location to start the WSO2 Identity Server.</p><pre>sh wso2server.sh</pre><p>2. Login to the management console with admin:admin credentials.</p><p>3. Navigate to Identity Providers -&gt; Resident -&gt; Other settings -&gt; TypingDNA Configuration.</p><ul><li>Enable typingDNA.</li><li>Configure the API key and secret which can be copied from the typingDNA account dashboard.</li><li>Enable advance TypingDNA-API Mode if your TypingDNA account is pro or enterprise. Pro/ enterprise account provides access to advanced APIs and allows advanced authentication options.</li><li>Configure the region ( <strong>eu</strong> or <strong>us</strong> ).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Eu6_tmJc2HV4lDjn6Y06Q.png" /></figure><h4><strong>Configure a service provider to use TypingDNA</strong></h4><p>1. Go to Service Providers → Add. Provide a name and click register.</p><p>2. Go to Inbound Authentication Configuration -&gt; OAuth/OpenID Connect Configuration and provide the Callback Url as <a href="https://oidcdebugger.com/debug"><strong>https://oidcdebugger.com/debug</strong></a><strong>.</strong></p><p>3. Navigate to Local &amp; Outbound Authentication Configuration -&gt; Advanced configuration and add <strong>basic</strong> and <strong>totp</strong> as authentication step 1 and 2 , respectively.</p><p>4. Add the Typing DNA adaptive script as shown below.</p><pre>// This script will step up 2FA authentication if the user&#39;s typing behaviour does not match with the enrolled behaviour.<br><br>// You can use the parameters &#39;score&#39; (num 0-100), &#39;result&#39; (boolean), &#39;confidence&#39; (num 0-100), &#39;comparedPatterns&#39; in your <br>// authentication logic to trigger the 2nd step. <br>// Only the &#39;result&#39; parameter has been used in the sample script. <br><br>var onLoginRequest = function(context) {<br>    executeStep(1, {<br>        onSuccess: function (context) {<br>            verifyUserWithTypingDNA(context, {<br>                onSuccess: function(context,data){<br>                    // Change the definition here as required.<br>                    var userVerified = data.result;<br><br>                    // data.isTypingPatternReceived indicates whether a typing pattern is received from the login portal.<br>                    if (data.isTypingPatternReceived &amp;&amp; !userVerified){<br>                        executeStep(2);<br>                    }<br>                },onFail: function(context,data){<br>                    executeStep(2);<br>                }<br>            });<br>        }<br>    });<br>};</pre><p>5. Click update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXBRri-Qa0QDkOFvOEnggA.png" /></figure><p>6. Add a new user tom from Users and Roles -&gt; Add -&gt; Add new user.</p><p>Now all configurations are done. Lets try out the flow.</p><ul><li>Navigate to <a href="https://oidcdebugger.com/">https://oidcdebugger.com/</a> and provide https://&lt;host_name&gt;:&lt;port&gt;/oauth2/authorize as Authorize URI. Provide the client Id of the service provider as well.</li><li>Click Send request and you’ll be redirected to the login page of the application as shown below. Type the username and password of user tom you just created.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*H3eW7_p0ewtFbmf7QrWbow.png" /></figure><ul><li>Observe that the user is prompted with TOTP-based login as a second factor. Scan the QR code using an authenticator app.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*Qu80BH5XvYvo0HbSZDRTAQ.png" /></figure><ul><li>Provide the totp generated from the authenticator app, in the next step.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*K1rgZWx8rpNtzlA_w4wXiw.png" /></figure><ul><li>You will be successfully logged in to the application.</li><li>From a new incognito window, login to the application from the same user for 2 more times. You will be prompted to provide the totp for all these 3 attempts.</li><li>Now try to log into the application for the 4th time. You will be logged in without prompting for the totp due to your typing pattern being verified from the typingDNA saved typing biometrics.</li><li>Try to log in by providing the username and password with a different typing pattern. You will be asked for the totp authentication step.</li></ul><p>Go to your typingDNA account -&gt; logs tabs and you’ll see 1st three login attempts as enrollments and the 4th attempt as a verify &amp; enroll type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i1OYhiyQEeQbYizL_jNMvQ.png" /></figure><p>From IS 6.0.0 onwards, you can also delete the saved typing patterns of tom by logging in to tom’s myaccount.</p><p>Navigate to <a href="https://localhost:9443/myaccount">https://localhost:9443/myaccount</a> , Security tab. Scroll down to Data used to verify your login section where you’ll see the option to delete the saved typingDNA typing patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*CU234hQibmrq_XQ_x2eIsg.png" /></figure><p>Then refresh the Logs tab of your typingDNA account to see the Delete user record there.</p><p>Refer <a href="https://api.typingdna.com/#api-API_Services">TypingDNA documentation</a> to learn more on their API services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*k70IKWVwzeWAEvAjrlG2IA.gif" /></figure><p>Thats it for today. Hope you got an idea on how to simply integrate the typingDNA feature with WSO2 identity server.</p><p>Let’s meet in another blog! Until then, Happy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e55de3582db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Event Hub and Azure Data Explorer -Part II]]></title>
            <link>https://yasarayasawardhana.medium.com/azure-event-hub-and-azure-data-explorer-part-ii-1b687cd41763?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b687cd41763</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[azure-event-hub]]></category>
            <category><![CDATA[azure-data-explorer]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 28 Aug 2022 12:56:18 GMT</pubDate>
            <atom:updated>2022-08-28T12:59:10.119Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s write a simple spring application to publish events to Azure event hub and ADX.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*eXz6dKyOQl6W-yvw5z64og.png" /></figure><p>Welcome to the 2nd one of my blog series on integrating &amp; working with Azure resources. If you are new to Azure eventhub and ADX, I recommend to first read my <a href="https://blog.devgenius.io/getting-started-with-azure-event-hub-and-azure-data-explorer-part-i-aab2a3edd339">previous blog[</a>1] which gives a basic introduction to both those services.</p><p>In this blog lets build a simple spring application to stream events to the Azure event hub and ingest to ADX. Refer blog[2] as a guide on writing simple spring web applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*CetXmzBy9dtbNsDDHZhJ_g.gif" /></figure><ol><li>Follow step 1, 2 and 3 in my previous blog[1] to configure an Azure eventhub, ADX cluster and establish a data connection between them.</li><li>Create a new maven project. You can refer to this <a href="https://github.com/Yasara-Y/event-publish-spring-app/blob/main/pom.xml">pom.xml</a> file for the project from the sample given. I have attached the complete source code for your reference[3].</li></ol><p>3. Create a folder structure as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zr4v-o_UDiBcfIyHfAyf3w.png" /></figure><p>4. Add the main method as follows to make it a stand-alone application.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09d8eff493e4dbc126f2185f98997aa2/href">https://medium.com/media/09d8eff493e4dbc126f2185f98997aa2/href</a></iframe><p>5. Created a model folder and create a new class LoginInfo to include the getters and setters of event payload attributes. Lets have the same set of attributes of the login event payload as in my previous blog regarding azure publishing[1] , namely; userId, eventId, eventType, userstoreDomain, tenantDomain, loginTimestamp and publishTimestamp. You can change them accordingly depending on the requirement.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89c3918e39d6e5408ad1513003237b58/href">https://medium.com/media/89c3918e39d6e5408ad1513003237b58/href</a></iframe><p>6. Create a new class UserLoginController to implement the logic for publishing event batches to Azure event hub.</p><p>Here, the @RequestMapping annotation is used to map publishEvents() method to the http://localhost:8080/login GET request. The publishEvents()method handles the event publishing logic to Azure event hub. For this example, 10 dummy loginInfo objects are created, converted to json strings and those 10 json strings are appended to an array. Then a new producer client is created which initiates the connection to azure event hub when the correct connection string and event hub name is provided. Finally, the producer.send(batch) method sends the event batch to the specified event hub.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb94d462ec83b67e4844fae203a8d14c/href">https://medium.com/media/bb94d462ec83b67e4844fae203a8d14c/href</a></iframe><p>7. When the implementation is done, go to the project home and run the below command.</p><pre>mvn clean install</pre><p>8. Finally, navigate to the war file location, and enter the following command.</p><pre>java -Xms128m -Xmx256m -jar &lt;APP_NAME&gt;-1.0-SNAPSHOT.war</pre><p>Then the sample application will start as shown in the snapshot below. As you can observe in the logs, it implies that your application has started in port 8080 in Tomcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYj-aE9RIj0SUXvFwNSakg.png" /></figure><p>9. Open a new browser tab and navigate to the following url <a href="http://localhost:8080/login"><strong>http://localhost:8080/login</strong></a><strong> .</strong></p><p>Then you will see in the terminal logs events starting to publish. Once all the events are published successfully to event hub, you will see the below message on the browser window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*TOKeOH5RNUq14VAoIm-0aw.png" /></figure><p>10. Navigate to the event hub you created and click on the overview tab. Select the Messages graph and you will observe a spike with a height of 10 that corresponds to the batch of 10 events we just sent.</p><p>10. Go to the created ADX cluster &gt; Data tab &gt; Databases &gt; Database name you created &gt; Query. Then you will see a canvas to execute KQL queries. Type the name of the table you created and click Run. You will notice the login events recorded in a table as shown in below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJnKysgyi3z5tSCfbheeEg.png" /></figure><p>In this way, you can publish any kind of events to the event hub and then directly ingest that data to ADX easily.</p><p>Thank you for reading and lets meet again with another interesting blog.</p><p>[1] <a href="https://blog.devgenius.io/getting-started-with-azure-event-hub-and-azure-data-explorer-part-i-aab2a3edd339">https://blog.devgenius.io/getting-started-with-azure-event-hub-and-azure-data-explorer-part-i-aab2a3edd339</a></p><p>[2] <a href="https://somindagamage.medium.com/writing-a-simple-web-application-with-spring-boot-135aece2f278">https://somindagamage.medium.com/writing-a-simple-web-application-with-spring-boot-135aece2f278</a></p><p>[3] <a href="https://github.com/Yasara-Y/event-publish-spring-app">https://github.com/Yasara-Y/event-publish-spring-app</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b687cd41763" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner’s Guide to Key-stores and Trust-stores]]></title>
            <link>https://yasarayasawardhana.medium.com/beginners-guide-to-key-stores-and-trust-stores-f7fa6d70ca2e?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7fa6d70ca2e</guid>
            <category><![CDATA[keystore]]></category>
            <category><![CDATA[keytool]]></category>
            <category><![CDATA[truststore]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 26 Jun 2022 19:58:15 GMT</pubDate>
            <atom:updated>2022-06-26T19:58:15.337Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Beginner’s guide to Key-stores and Trust-stores</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*MaFe4YoPzq05U4QR.png" /></figure><h3>Overview</h3><p>We come across the 2 terms key-store, and trust-store more often when our applications need to communicate over SSL/TLS.</p><p>In this blog, I will provide an overview of the differences between a Java key-store and a trust-store.</p><p>Usually, these files are password-protected and they reside in the same file system of our application. For example, in WSO2 Identity Server file system if you navigate to &lt;IS_HOME&gt;/repository/resources/security you can see the keystore as wso2carbon.jks and trust-store as client-truststore.jks.</p><h3>KeyStore</h3><p>A Java keystore stores private keys, certificates with public keys, or just secret keys that a specific program should present to both parties (server or client) for verification. It stores each by an alias which is the name for our certificate, for ease of lookup.</p><p>Keystores hold keys that our application owns, which we can use to prove the integrity of a message and the authenticity of the sender, by signing payloads.</p><p>Generally, a keystore is used by a server and if that requires HTTPS. During an SSL handshake, the server looks up the private key from the keystore, and presents its corresponding public key and certificate to the client.</p><p>Similarly, if the client also needs to authenticate itself then the client also has a keystore and also presents its public key and certificate. This is called mutual authentication.</p><p>Apart from those,<strong> </strong>public keys can verify or encrypt data, whereas the private keys can sign or decrypt data. Secret keys can perform these functions as well. A keystore is a place that we can hold onto these keys.</p><h3>TrustStore</h3><p>A truststore is the opposite. While a keystore typically holds onto certificates that identify us, a truststore holds onto certificates that identify others.</p><p>In Java, we use it to trust the third party we’re about to communicate with.</p><p>For example, if a client talks to a Java-based server over HTTPS, the server will look up the associated key from its keyStore and present the public key and certificate to the client.</p><p>Then the client look up the associated certificate in our trustStore. If the certificate or Certificate Authorities presented by the external server isn’t in our truststore, we’ll get an <em>SSLHandshakeException, </em>and the connection won’t be set up successfully.</p><p>In java programming, this concept is used whenever we are trying to communicate with third-party applications. The connection between the client and the server are diagrammatically represented for the keyStore and trustStore, which is as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ehhm6FsIZ0cNaP6aJNjslg.png" /></figure><h3>Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*ltrH9ilYojawkfykZu0TDg.png" /></figure><h3>What is Keytool ?</h3><p>Along with these 2 keystores, another term that we frequently use is the Keytool. It is a utility for to<strong> </strong>managing keys and certificates and store them in a keystore. The <em>keytool</em> command allows us to create self-signed certificates and show information about the keystore. You can also install a software such as Keytool explorer from <a href="https://keystore-explorer.org/downloads.html">here</a>, using which we can perform many keytool commands from it’s GUI itself.</p><p>Below are the most common Java Keytool keystore commands and their usages.</p><ul><li><strong>Generate a Java keystore and key pair</strong></li></ul><pre>keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks  -keysize 2048</pre><ul><li><strong>Import a root or intermediate CA certificate to an existing Java keystore</strong></li></ul><pre>keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks</pre><ul><li><strong>Import a signed primary certificate to an existing Java keystore</strong></li></ul><pre>keytool -import -trustcacerts -alias mydomain -file mydomain.crt -keystore keystore.jks</pre><ul><li><strong>Generate a keystore and self-signed certificate</strong></li></ul><pre>keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validi</pre><ul><li><strong>Export a certificate from a keystore</strong></li></ul><pre>keytool -export -alias mydomain -file mydomain.crt -keystore keystore.jks</pre><ul><li><strong>List Trusted CA Certs</strong></li></ul><pre>keytool -list -v -keystore $JAVA_HOME/jre/lib/security/cacerts</pre><ul><li><strong>Delete a certificate from a Java Keytool keystore</strong></li></ul><pre>keytool -delete -alias mydomain -keystore keystore.jks</pre><h3>Conclusion</h3><p>In this blog, we discussed the main differences between a keystore and a truststore, along with their usages. We also discussed about the keytool command which is frequently used when working with keystores.</p><p>Thank you for reading.</p><h3>References</h3><ul><li><a href="https://www.ibm.com/docs/en/sdk-java-technology/7?topic=keytool-key-certificate-management-tool">keytool - Key and Certificate Management Tool</a></li><li><a href="https://www.java67.com/2012/12/difference-between-truststore-vs.html">Difference between trustStore vs keyStore in Java SSL</a></li><li><a href="https://www.geeksforgeeks.org/difference-between-truststore-and-keystore-in-java/">Difference Between trustStore and keyStore in Java - GeeksforGeeks</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7fa6d70ca2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SAML2 Federated IdP Initiated SLO for Tenanted Scenario in WSO2 Identity Server]]></title>
            <link>https://yasarayasawardhana.medium.com/saml2-federated-idp-initiated-slo-for-tenanted-scenario-in-wso2-identity-server-3ec18eae08e0?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ec18eae08e0</guid>
            <category><![CDATA[saml2]]></category>
            <category><![CDATA[wso2is]]></category>
            <category><![CDATA[slo]]></category>
            <category><![CDATA[identity-federation]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Mon, 28 Mar 2022 03:45:24 GMT</pubDate>
            <atom:updated>2022-03-28T05:12:00.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ilMKfM-1CbZbnwDDTzyNwA.png" /></figure><p>If you are new to SAML identity federation and SLO(single logout) concepts, this blog will take you through a step-by-step guide to try out a similar scenario.</p><p>Anyhow, did you lose track halfway trying to read the title?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ZSqk60QaoOEqdvD2P2b_8g.gif" /></figure><p>Let me break it down into smaller pieces for easy interpretation.</p><p><strong><em>Single logout:</em></strong> Allows you to logout all apps in the current browser session when one application performs a logout. There are two flavors of SAML Single Logout Protocol namely, SP-initiated SLO or IdP-initiated SLO.</p><p><strong><em>IdP initiated single logout:</em></strong> IdP initiated SLO causes the IdP to initiate logout requests to all logged in Service Providers and inform them that the session is ending.</p><p><strong><em>SAML2 Federated IdP initiated single logout:</em></strong> SLO requests are initiated by an external IdP and it terminates the active sessions of applications across multiple domains or organizations which its federated to, using the SAML protocol.</p><p><strong><em>SAML2 Federated IdP initiated single logout for tenanted scenario:</em></strong> External SAML IdP is federated to a tenant of the WSO2 Identity server hence it terminates the active sessions of applications created inside the tenant by sending the SLO request to the tenant qualified slo endpoint.</p><p>WSO2 Identity Server (WSO2 IS) facilitates handling SAML single logout requests from federated identity providers. After the SAML single logout request is received by the federated identity provider, WSO2 IS processes the request, terminates the sessions of the particular user, and then responds to the identity provider. When configuring WSO2 IS for this flow, there are 2 possible scenarios such as configuring the flow in super-tenant and a tenanted flow. I will be elaborating on a special scenario with ‘tenanted’ SAML federated flow. Since it involves some additional configs and things to keep in mind, It will be easier to apply that learning from here to try out any usual SLO scenarios which already have detailed steps explained in <a href="https://is.docs.wso2.com/en/latest/learn/handling-saml-single-logout-requests-from-federated-identity-providers/#scenario">WSO2 documentation</a> and <a href="https://medium.com/identity-beyond-borders/configuring-saml-federated-identity-provider-initiated-logout-in-wso2-identity-server-f1bc7612b270">another blog</a>.</p><h4><strong>Scenario</strong></h4><p>To demonstrate this scenario, I will be using two instances of WSO2 IS, one running on port 9443 (Primary IS) and the other on 9444 (Secondary IS), and a sample SAML web application called “Pickup Manager” and a sample “OIDC debugger” web application. The Secondary IS acts as the external federated identity provider for the Primary IS shown in the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*f2ZMtDqVCBFzg5l_0G0cog.png" /></figure><p>Above diagram shows the SAML federated identity provider initiated logout flow between Primary WSO2 Identity Server (which serves as the primary identity provider) and the Secondary WSO2 IS (which acts as the Federated Identity Provider). OIDC debugger application is a service provider of the Primary WSO2 IS. Pickup Manager application and primary WSO2 IS are service providers of the Federated IdP. The Federated IdP acts as the federated authenticator of the OIDC debugger application.</p><p>When a user attempts to log out from pickup manager app, the service provider sends a logout request to the federated IdP. The IdP determines the session participants using the session index available in the logout request. Since WSO2 IS is a session participant, it receives a logout request from the federated IdP. WSO2 IS handles this request, terminates the session and responds with a valid logout response.</p><p>The following sections will guide you through configuring SAML2 single logout requests handling and trying it out with the sample applications.</p><ul><li>Configuring Secondary IS as an IdP in the Primary IS</li><li>Configuring Primary IS as a Service Provider in the Secondary IS</li><li>Configuring OIDC application in the Primary IS</li><li>Configuring Pickup Manager application in the Secondary IS</li></ul><h4>Section 1: Configuring Secondary IS as an IdP in the Primary IS</h4><ol><li>Download and install the <a href="https://wso2.com/identity-and-access-management/#"><strong>latest WSO2 Identity Server</strong></a>.</li><li>Open the &lt;IS_home&gt;/bin folder and run the below command to start the WSO2 Identity Server on port 9443 (Primary IS)</li></ol><pre>sh wso2server.sh</pre><p>3. Log in to the management console of the Primary IS with admin:admin credentials.</p><p>4. We need to create a tenant since we are going to try out the flow in a tenanted scenario.</p><p>Navigate to the Configure tab and click Add New Tenant. Fill the empty fields as shown below and click save.</p><blockquote>Domain : org1.com</blockquote><blockquote>First Name : abc</blockquote><blockquote>Last Name : abc</blockquote><blockquote>Admin Username : abc</blockquote><blockquote>Admin Password : abc</blockquote><p>5. Logout and re-login with the credentials of the tenant.</p><blockquote>Username: abc@org1.com</blockquote><blockquote>Password: abc</blockquote><p>5. Navigate to <strong>Main</strong>&gt;<strong>Identity</strong>&gt;<strong>Identity Providers</strong> and click <strong>Add</strong>. Provide the name as Secondary.</p><p>6. In the <strong>Federated Authenticators</strong> section, expand the <strong>SAML2 Web SSO Configuration</strong> sub-section. Now set the below configurations.</p><ul><li>Enable SAML2 Web SSO</li><li>Service Provider Entity ID: Primary</li><li>Identity Provider Entity ID: Secondary</li><li>SSO URL: <a href="https://localhost:9444/samlsso">https://test.com:9444/samlsso</a></li><li>Enable check-boxes for <strong>Specifies if logout request must be propagated to the identity provider</strong> and <strong>Specifies if single logout request from the identity provider is accepted</strong>. (Once this is enabled, WSO2 Identity Server accepts and handles the logout requests. This configuration is a must to try this scenario.)</li><li>Logout url: <a href="https://localhost:9444/samlsso">https://test.com:9444/samlsso</a></li><li>Click <strong>Register</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*LAcJosoHoPVo6-8ji8fP-g.png" /></figure><h4><strong>Section 2: Configuring Primary IS as a Service Provider in the Secondary IS</strong></h4><ol><li>Download and install the <a href="https://wso2.com/identity-and-access-management/#"><strong>latest WSO2 Identity Server</strong></a>.</li><li>Since there are 2 instances of WSO2 IS involved with the flow, Lets change the host-name of secondary IS to ‘test.com’ to avoid overriding the commonauth cookie.</li></ol><p>Open the etc/hosts file and add the below entry and save the file.</p><pre>127.0.0.1         test.com</pre><p>Open the &lt;IS_home&gt;/repository/conf/deployment.toml file and change the <strong>host-name</strong> to “test.com”</p><p>3. Open the &lt;IS_home&gt;/bin folder and run the below command to start the WSO2 Identity Server on port 9444 (SecondaryIS)</p><pre>sh wso2server.sh -DportOffset=1</pre><p>4. Log in to the management console of the Secondary IS(<a href="https://localhost:9444/carbon/">https://test.com:9444/carbon/</a>) with admin:admin credentials.</p><p>5. Navigate to <strong>Main</strong>&gt;<strong>Identity</strong>&gt;<strong>Service Providers</strong> and click <strong>Add</strong>. Provide the name as Primary.</p><p>6. In the <strong>Inbound Authentication Configuration</strong> section, click <strong>Configure</strong> under the <strong>SAML2 Web SSO Configuration</strong> section.</p><p>Now provide the configurations as follows:</p><ul><li><strong><em>Issuer : </em></strong><em>Primary</em></li><li><strong><em>Assertion Consumer URL :</em></strong><em> </em><a href="https://localhost:9443/commonauth"><em>https://localhost:9443/commonauth</em></a></li><li><strong><em>SLO Request URL :</em></strong><em> </em><a href="https://localhost:9443/identity/saml/slo"><em>https://localhost:9443/t/org1.com/identity/saml/slo</em></a></li><li>Check the <strong>Enable Single Logout</strong> checkbox.</li><li>Select one of the front channel bindings for the logout method.</li><li>Click <strong>Register</strong>.</li></ul><p><strong>Note</strong>: SLO Request URL should be tenant qualified since we are trying out a tenanted scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*xFXP9Ro9g2NwuV6KyEhKJQ.png" /></figure><h4>Section 3: Configuring OIDC application in the Primary IS</h4><ol><li>Navigate to <strong>Main</strong>&gt;<strong>Identity</strong>&gt;<strong>Service Providers</strong> and click <strong>Add</strong>. Provide the name as OIDCsp9443.</li><li>In the <strong>Inbound Authentication Configuration</strong> section, click <strong>Configure </strong>under the <strong>OAuth/OpenID Connect Configuration</strong> section.</li><li>3. Provide the <strong>Callback Url</strong> as <a href="https://oidcdebugger.com/debug">https://oidcdebugger.com/debug</a> and click <strong>Add</strong>.</li><li>Next, copy the generated OAuth Client Key which will be required in the next step.</li><li>Go to <a href="https://oidcdebugger.com/">https://oidcdebugger.com/</a> and set the below configurations.</li></ol><ul><li>Authorize URI: <a href="https://localhost:9443/oauth2/authorize">https://localhost:9443/oauth2/authorize</a></li><li>Redirect URI: <a href="https://oidcdebugger.com/debug">https://oidcdebugger.com/debug</a></li><li>Client ID: OAuth Client Key copied from step 4 above.</li></ul><p>6. Navigate to <strong>Local &amp; Outbound Authentication Configuration </strong>section and select <strong>Federated Authentication</strong> radio button and select Secondary from the dropdown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3ye4WFr8bSvwGIRh4I_Kw.png" /></figure><h4>Section 4: Configuring Pickup Manager application in the Secondary IS</h4><ol><li>Follow the steps in <a href="https://is.docs.wso2.com/en/5.12.0/learn/deploying-the-sample-app/#deploying-the-saml2-web-app-pickup-manager-webapp"><strong>deploying the saml2-web-app-pickup-manager webapp</strong></a> to download, deploy and register pickup-manager sample.</li><li>Navigate to &lt;tomcat_home&gt;/webapps/&lt;pickup-manager_home&gt;/WEB-INF/classes and open the file sso.properties.</li><li>Modify the configurations mentioned below.</li></ol><ul><li>SAML2.IdPEntityId=test.com</li><li>SAML2.IdPURL=<a href="https://test.com:9444/samlsso">https://test.com:9444/samlsso</a></li></ul><p>4. Restart the tomcat server.</p><h3>Try it out!</h3><p>Yay! Finally we have completed all required configurations in WSO2 IS so let’s try out the flow by running the sample applications.</p><ol><li>Access the following URL on a browser window: <a href="http://localhost.com:8080/saml2-web-app-pickup-manager.com"><strong><em>http://localhost.com:8080/saml2-web-app-pickup-manager.com</em></strong></a> to log into the pickup-manager application.</li><li>Log in using the credentials of any user in the Federated Identity Provider. You will be redirected to the Pickup Manager application home page.</li><li>Now go to the <a href="https://oidcdebugger.com/">https://oidcdebugger.com/</a> site with our pre-configured values in section 2 above, and click <strong>Send Request</strong>. You will be automatically SSO-ed and logged in to the application.</li><li>Now log out from the Pickup Manager application. You will be redirected back to the login page of the application.</li><li>Click <strong>Start Over</strong> in the OIDC application and you’ll notice that you’ve been automatically logged out from this application as well.</li></ol><p>This means you have successfully tried out the SAML2 Federated IdP initiated single logout flow for a tenanted scenario in WSO2 Identity Server.</p><h3>References</h3><ul><li><a href="https://is.docs.wso2.com/en/latest/learn/log-in-to-the-identity-server-using-another-identity-server-saml2/#setting-up-the-wso2-identity-server-instances">Log in to the Identity Server using another Identity Server - SAML2 - WSO2 Identity Server Documentation</a></li><li><a href="https://is.docs.wso2.com/en/latest/learn/handling-saml-single-logout-requests-from-federated-identity-providers/#scenario">Handling SAML Single Logout Requests from Federated identity Providers - WSO2 Identity Server Documentation</a></li><li><a href="https://medium.com/identity-beyond-borders/configuring-saml-federated-identity-provider-initiated-logout-in-wso2-identity-server-f1bc7612b270">Configuring SAML Federated Identity Provider Initiated Logout in WSO2 Identity Server</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ec18eae08e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Azure Event Hub and Azure Data Explorer -Part I]]></title>
            <link>https://blog.devgenius.io/getting-started-with-azure-event-hub-and-azure-data-explorer-part-i-aab2a3edd339?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/aab2a3edd339</guid>
            <category><![CDATA[azure-event-hub]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[data-ingestion]]></category>
            <category><![CDATA[azure-data-explorer]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 13 Feb 2022 18:21:57 GMT</pubDate>
            <atom:updated>2022-02-15T13:48:17.051Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting started with Azure Event Hub and Azure Data Explorer -Part I</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*h8L42t6YttSoyqYi5uvIcg.png" /></figure><h4>What is Azure Event Hub?</h4><blockquote>In short, Azure Event Hub is a big data streaming platform which can receive and process millions of events per second.</blockquote><p>It has the following characteristics.</p><ul><li>Partitioned — to support highly-available data sending and parallel readers. Order of data is preserved within each partition.</li><li>Reliable — agnostic to failures, zero data loss and low latency.</li><li>Decoupled system to process the data — event hub sits between event publishers and event consumers to decouple the production of an event stream from the consumption of those events.</li><li>Real time data processing — Ability to ingest, buffer, store, and process data streams in real time for time-critical decision making.</li></ul><p>There are a few key concepts to understand in event hubs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*qi6ikZubQ16hpD8nVD-sNw.png" /><figcaption>Azure event hubs architecture</figcaption></figure><p><strong>Event producers</strong>: Any entity that sends event data to an event hub.</p><p><strong>Event receivers</strong>: Any entity that reads event data from an event hub. ADX can act as an event receiver which I will be explaining more later in this blog.</p><p><strong>Partitions</strong>: Each consumer only reads a specific subset, or partition of the message stream. Partition count has to be defined at the creation of the event hub and cannot be modified later.</p><p><strong>Consumer groups</strong>: A specific view of an entire event hub. Receivers can have their own separate view of the event stream. They read the stream independently at their own pace and with their own offsets. Hence this allows for consumers to scale independently<strong> </strong>to meet the requirements.</p><p>If you are interested in reading more on event hubs, <a href="https://docs.microsoft.com/en-us/azure/event-hubs/">azure documentation</a> is surely a good starting point.</p><h4>What is Azure Data Explorer (ADX)?</h4><blockquote>Azure Data Explorer is a big data analytics platform that takes care of everything required to ensure <em>near real </em>time decision making. This includes data ingestion, data querying, data visualization and data management.</blockquote><p>Following are some key features in ADX.</p><ul><li>ADX can ingest different types of data such as structured, semi-structured and unstructured, very quickly.</li><li>It uses Kusto Query Language (KQL), which is optimized for big data exploration. An important fact to note is that unlike other query languages like SQL, KQL is for querying only and cannot update or delete data using KQL.</li><li>Has built-in dashboarding tools such as Power BI useful for data visualization and it also has the support for Tableau, Qlik, Kibana, Grafana etc.</li></ul><p>You may refer <a href="https://docs.microsoft.com/en-us/azure/data-explorer/">azure documentation</a> for more information on ADX.</p><p>I hope by now you have got some basic idea about event hubs and ADX. Now let’s proceed to the interesting part of trying out a simple flow with usages of above-mentioned azure resources ;)</p><p>Let’s try out a simple scenario of publishing a dummy user login event to azure event hub followed by ingesting the event data to an ADX database. Here, the event producer/publisher is simply an http request with the login event data from Postman. The event receiver/consumer is the ADX.</p><p><strong>Step 1: Create and configure an Azure event hub.</strong></p><p>Follow <a href="https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create#create-an-event-hub">this step-by-step guide</a> to create an event hub and a namespace from the Azure portal. I have given the default values for partition count(2) and message retention(1) when creating the event hub.</p><p>Once you have successfully created an event hub, you will see the event hub overview page as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJ-7WoIV1We1vg-fbYMTLw.png" /></figure><p><strong>Step 2: Create and configure an ADX cluster and database.</strong></p><p>Follow <a href="https://docs.microsoft.com/en-us/azure/data-explorer/create-cluster-database-portal">this guide</a> to create an ADX cluster and database from the azure portal.</p><p>Note down the ADX cluster name and the database name.</p><p>2.1 Navigate to the created ADX database and select Query on the Overview tab in the left control plane. Create a table named TestTable in the DB you just created, by executing the following Kusto query with the Run button.</p><pre>.create table TestTable (publishTimestamp: datetime ,eventType: string , loginTimestamp: datetime, userId: string, eventId: string, userstoreDomain: string, tenantDomain: string )</pre><p>2.2 In the same manner, create a mapping named TestTableMapping to map the JSON root path to the respective column name.</p><pre>.create table TestTable ingestion json mapping &#39;TestTableMapping&#39; &#39;[{&quot;column&quot;:&quot;publishTimestamp&quot;, &quot;Properties&quot;: {&quot;Path&quot;: &quot;$.publishTimestamp&quot;}}, {&quot;column&quot;:&quot;eventType&quot;, &quot;Properties&quot;: {&quot;Path&quot;:&quot;$.eventType&quot;}},{&quot;column&quot;:&quot;loginTimestamp&quot;, &quot;Properties&quot;: {&quot;Path&quot;: &quot;$.loginTimestamp&quot;}}, {&quot;column&quot;:&quot;userId&quot;, &quot;Properties&quot;: {&quot;Path&quot;: &quot;$.userId&quot;}} ,{&quot;column&quot;:&quot;eventId&quot;, &quot;Properties&quot;: {&quot;Path&quot;:&quot;$.eventId&quot;}}, {&quot;column&quot;:&quot;userstoreDomain&quot;, &quot;Properties&quot;: {&quot;Path&quot;:&quot;$.userstoreDomain&quot;}}, {&quot;column&quot;:&quot;tenantDomain&quot;, &quot;Properties&quot;: {&quot;Path&quot;:&quot;$.tenantDomain&quot;}}]&#39;</pre><p>Once you have created the table successfully you’ll be able to see your table listed on the left as shown in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QzqV-qWNmdJcDagnxvBfJQ.png" /></figure><p><strong>Step 3: Create a data connection in ADX DB to ingest event data from the event hub.</strong></p><p>Navigate to the created DB and go to Data connections the under Settings tab. Click on Add data connection and select Event Hub from the drop-down menu.</p><p>Fill out the form with the following information, and then select <strong>Create</strong>.</p><blockquote>Data connection name- Any name for the connection you want to create in Azure Data Explorer. Eg: test-conn-1</blockquote><blockquote>Subscription- Select the subscription ID from the drop down.</blockquote><blockquote>event hub namespace- Select the namespace you created in step 1, from the drop down.</blockquote><blockquote>event hub- Select the event hub name you created.</blockquote><blockquote>Consumer group- Select the consumer group defined in the event hub you created.</blockquote><blockquote>Compression- Select None from the drop down.</blockquote><blockquote>Assign Managed Identity- Select System-assigned</blockquote><blockquote>Table name- Provide the name of the table created. It’s TestTable in our scenario.</blockquote><blockquote>Data format- Select <em>JSON from the drop down.</em></blockquote><blockquote>Mapping- Provide the name of the mapping created in the database. I have given it as TestTableMapping</blockquote><p><strong>Step 4: Call Azure REST APIs with an HTTP request to replicate a dummy user login event.</strong></p><p>4.1 Create a Shared Access Signature token from the below code snippet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c8841211204851c620896ffbcef1d79/href">https://medium.com/media/5c8841211204851c620896ffbcef1d79/href</a></iframe><p>For the &lt;key_name&gt;, give the value RootManageSharedAccessKey</p><p>For the &lt;policy_primary_key&gt;, navigate to your event hub namespace → Settings → Shared access policies → RootManageSharedAccessKey and copy the Primary key.</p><p>Note down the Shared_Access_Signature_token you obtain which will look similar to this;</p><p>SharedAccessSignature sr=your-namespace.servicebus.windows.net&amp;sig=your-sas-key&amp;se=1403736877&amp;skn=RootManageSharedAccessKey</p><p>4.2 Send an HTTP request to azure event hub as shown in the below example.</p><p>I will be using Postman to call azure REST APIs to send a dummy user login event. Provide the Shared_Access_Signature_token obtained in the previous step as the Authorization header value.</p><pre>POST https://your-namespace.servicebus.windows.net/your-event-hub/messages?timeout=60  <br>Authorization: &lt;Shared_Access_Signature_token&gt; <br>Content-Type: application/json  <br>Host: your-namespace.servicebus.windows.net</pre><pre>{ &quot;publishTimestamp&quot;: &quot;2022-02-13T21:09:21Z&quot;, &quot;eventType&quot;: &quot;UserLogin&quot;, &quot;loginTimestamp&quot;: &quot;2022-02-13T21:09:21Z&quot;, &quot;userId&quot;: &quot;abcd123&quot;, &quot;eventId&quot;: &quot;efgh456&quot;, &quot;userstoreDomain&quot;: &quot;PRIMARY&quot;, &quot;tenantDomain&quot;: &quot;carbon.super&quot;<br> }</pre><p>If you have correctly done all the above steps, you will get a <em>201 Created</em> success status response code as in the below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*-q4JbNL_csiajgS_WIe9ew.png" /></figure><p>Now let’s see whether the login event has been recorded in the event hub we created.</p><p>Navigate to the event hub you created and click on the overview tab. Select the Messages graph and you will observe a spike that corresponds to the event we just sent as an HTTP request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*Iepu7l5ChZ5Tg4al70TRBw.png" /></figure><p>Since we have already configured a data connection in ADX, go to the created database and execute the TestTable command to list down the table with the above login data entry.</p><p>You have reached the end of part I of my blog series on Azure resources. In the next blog, I will elaborate more on writing a simple spring application to stream a batch of events to the Azure event hub and ingest to ADX.</p><p>Hope you find this blog useful! and thank you for reading.</p><h3><strong>References</strong></h3><ul><li><a href="https://docs.microsoft.com/en-us/azure/event-hubs/">Azure Event Hubs documentation</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-explorer/">Azure Data Explorer documentation</a></li><li><a href="https://medium.com/analytics-vidhya/azure-data-explorer-7d44e48d39a6">Azure Data Explorer</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aab2a3edd339" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/getting-started-with-azure-event-hub-and-azure-data-explorer-part-i-aab2a3edd339">Getting Started with Azure Event Hub and Azure Data Explorer -Part I</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to enable Email as Username in WSO2 Identity Server]]></title>
            <link>https://yasarayasawardhana.medium.com/how-to-enable-email-as-username-in-wso2-identity-server-48725c53cec5?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/48725c53cec5</guid>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sat, 28 Aug 2021 21:07:22 GMT</pubDate>
            <atom:updated>2021-08-29T08:33:28.584Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Try self-registration flow with email as username feature enabled in </em>WSO2 Identity <em>Server.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yOcFwT2YAGMS0RliGHulyw.png" /></figure><p>Nowadays most people prefer to use their email as the username when logging into any application because it is easier to remember the email than many non-email usernames, and you won’t perhaps need to try typing several usernames until a unique one is accepted.</p><p>WSO2 Identity Server also allows user authentication with the email address. In this blog post, I will be elaborating on how to enable this email-as-username feature and will be trying out the whole flow using self registration with email as username feature enabled.</p><h4>It is not possible to use the email username feature ‘by default’ in WSO2 IS !! Why?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*NMLngFTTiqLsaEEMuSRaUw.gif" /></figure><p>As WSO2 IS supports multi-tenancy, we can create users either in the default super tenant which is ‘carbon.super’ or in any other tenant domain. Here, the ‘@’ mark is used to distinguish the tenant-aware username from the tenant-domain.</p><p>When you try to register a user in the default super tenant in WSO2 IS having default configurations, with an email username tom@zyx.com, Identity Server will consider zyx.com as the tenant domain that the user needs to be registered in. Hence it will first check whether there is a tenant domain called ‘zyx.com’ configured in the server. If so, the user will be registered to that particular tenant, not to the super tenant.</p><p>If in case such a tenant is not available, an error message is displayed saying that the tenant domain is invalid.</p><p>The reason for this behavior is WSO2 IS does not support the email username feature by default. Therefore, this feature has to be enabled if needed. So let’s get started!</p><h4>Prerequisites</h4><p>As I mentioned earlier, I will be demonstrating the user self-registration flow with email username feature enabled. Therefore, first of all you need to configure WSO2 Identity Server to enable self-registration. For detailed instructions on how to do this check <a href="https://is.docs.wso2.com/en/latest/learn/self-registration/">here</a>.</p><h4>Step 1</h4><p>Open the &lt;IS_HOME&gt;/repository/conf/deployment.toml file. Add the following configuration in order to enable the email username feature.</p><pre>[tenant_mgt]<br>enable_email_domain= true</pre><h4>Step 2</h4><p>Just the above configuration is not enough. You need to add a couple of user-store configurations as well. If you are having the default LDAP user-store, add the below configurations in the same deployment.toml file.</p><pre>user_name_attribute = “mail”<br>user_name_search_filter = “(&amp;amp;(objectClass=person)(mail=?))”<br>username_java_script_regex = ‘^[a-zA-Z0–9.-]+@[a-zA-Z0–9.-]+\.[a-zA-Z]{2,4}$’<br>username_java_regex = ‘^[a-zA-Z0–9.-]+@[a-zA-Z0–9.-]+\.[a-zA-Z]{2,4}’</pre><p>If you have a different user-store, you may refer <a href="https://is.docs.wso2.com/en/latest/learn/using-email-address-as-the-username/">here</a> for more information on configurations.</p><h4>Step 3</h4><p>Add the following configuration in deployment.toml file to include the email attribute in admin username.</p><pre>[super_admin]<br>username = &quot;admin@wso2.com&quot;<br>password = &quot;admin&quot;</pre><h4>Step 4</h4><p>Enable cors to avoid any cross-origin errors when trying out the self-registration flow.</p><pre>[cors]<br>allow_generic_http_requests = true<br>allow_any_origin = true</pre><h4>Step 5</h4><p>Now start WSO2 IS from the <strong><em>bin</em></strong> directory of the product.</p><pre>sh wso2server.sh</pre><p>Login to the management console with admin@wso2.com:admin credentials. Go to Claims → Lists and select http://wso2.org/claims</p><p>Click edit on the local claim username from the list of local claims and change the mapped attribute from uid to mail</p><p>Now we have configured all that is needed to try out the self-registration flow with email username. So let’s proceed to the interesting part!</p><h4>Step 6</h4><p>Go to My Account from <a href="https://localhost:9443/myaccount">https://localhost:9443/myaccount</a></p><p>Click on Create Account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*ed9bf-l2bydPCwrgUXB4BQ.png" /></figure><h4>Step 7</h4><p>Let’s register tom with his email tom@zyx.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*styGRld_4Cl2cH-AJ9tv-Q.png" /></figure><p>Then proceed to self register and provide the required details.</p><p>Once you click on Register, a message box like below will appear, indicating successful setting up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*p9-wuotY9odCyD0fY6c37w.png" /></figure><p>An email requesting to confirm the user account creation will be sent to the given email address. Click Confirm Account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*Lo0mOzba3SP2MFaSJYnrew.png" /></figure><h4>Step 8</h4><p>Next, try logging in to My Account with Tom’s credentials upon successful account confirmation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*J9l99IRpQ2F7jL_BNg_rUw.png" /></figure><p>You will be redirected to the home page of Tom’s My Account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bKueTDeMR4WbkF8w6pcesA.png" /></figure><p><strong>We are done!!!!</strong>! We have now completed the self-registration flow with email as username feature enabled in WSO2 IS.</p><p>Also, you can clearly observe the user has been correctly registered in the super tenant ‘carbon.super’ instead of a tenant ‘zyx.com’ since we have already configured the email username feature!</p><p>If you need to register Tom in a tenant ‘abc.com’ , you need to give the username as tom@zyx.xom@abc.com</p><blockquote>In summary,</blockquote><blockquote>If tom is in super tenant &amp; email username enabled → tom@zyx.com</blockquote><blockquote>If tom is in super tenant &amp; email username disabled → tom</blockquote><blockquote>If tom is in tenant ‘abc.com’ &amp; email username enabled→ tom@zyx.com@abc.com</blockquote><blockquote>If tom is in tenant ‘abc.com’ &amp; email username disabled→ tom@abc.com</blockquote><p>Before wrapping up, one more important point to keep in mind!</p><p>If you have hosted the Authentication Endpoint and Recovery Endpoint of WSO2 IS in a different server, you need to add an additional configuration in the web.xmlfile located in the path &lt;APP&gt;/WEB-INF</p><pre>&lt;context-param&gt;<br>        &lt;param-name&gt;EnableEmailUserName&lt;/param-name&gt;<br>        &lt;param-value&gt;true&lt;/param-value&gt;<br>&lt;/context-param&gt;</pre><p>The reason for this additional configuration is since the app is now hosted on an external sever, the ‘enable email username’ feature configured in deployment.toml file is no longer recognized by the app. Hence the above configuration added in the web.xml file which resides inside the app will help resolve the issue!</p><p>For configuration information on hosting authentication/ recovery endpoints on a different server, check <a href="https://is.docs.wso2.com/en/latest/develop/hosting-authentication-endpoint-on-a-different-server/#running-the-sample">here</a>.</p><p>Let’s meet in another blog! Until then, Happy reading! Happy learning!</p><h4>References</h4><ul><li><a href="https://is.docs.wso2.com/en/latest/learn/self-registration/">Self-Registration - WSO2 Identity Server Documentation</a></li><li><a href="https://is.docs.wso2.com/en/latest/setup/configuring-email-sending/">Configuring the Identity Server to Send Emails - WSO2 Identity Server Documentation</a></li><li><a href="https://is.docs.wso2.com/en/latest/learn/using-email-address-as-the-username/">Using Email Address as the Username - WSO2 Identity Server Documentation</a></li><li><a href="https://xacmlinfo.org/2014/10/07/email-username-with-identity-server/">Email Username with WSO2 Identity Server</a></li><li><a href="https://tharika.medium.com/how-to-enable-email-username-with-wso2-api-manager-889c03161f81">How to enable Email Username with WSO2 API Manager?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48725c53cec5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A step-by-step guide to WSO2 IS worker-manager clustering with load balancing.]]></title>
            <link>https://medium.com/codex/a-step-by-step-guide-to-wso2-is-worker-manager-clustering-with-load-balancing-63e11d9e7946?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/63e11d9e7946</guid>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[workermanagernodes]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[wso2is]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 22 Aug 2021 11:12:50 GMT</pubDate>
            <atom:updated>2021-08-26T00:55:57.038Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*NQ_XOXRuFvQKztqnWRUC1Q.jpeg" /></figure><p>Multiple nodes of WSO2 products can be deployed in a cluster mode, in order to achieve greater scalability, increased resource availability, strategic resource usage and simplified management. Using this approach in production environments helps improve performance by seamlessly distributing requests across nodes while logically handling the traffic, thus achieving high cluster throughput. Simply stated, if one server in a cluster fails, the other servers configured in the cluster can pick up the workload. A load balancer is used to distribute requests among the nodes in the cluster. In this blog, I will be using NGINX load balancer for this purpose.</p><h4>What is a worker-manager cluster setup?</h4><p>Worker-manager cluster is a deployment model that consist of ‘worker’ nodes and ‘management’ nodes. Basically, a worker node is used to serve requests received by clients, whereas a management node is responsible for management related tasks such as to deploying and configuring artifacts.</p><p>In the following section, I will be guiding you through setting up a 2-node worker-manager cluster environment with load-balancing using MYSQL databases.</p><h3>1. Setting up 2 nodes of WSO2 IS</h3><p><strong>1.1</strong> Download the latest WSO2 Identity Server from <a href="https://wso2.com/identity-server/">here</a>. For details on running the Identity Server, see <a href="https://is.docs.wso2.com/en/latest/setup/running-the-product/">Running the Product</a>. I will refer to it as ‘manager’ node hereon.</p><p><strong>1.2</strong> Get a copy of the downloaded WSO2 IS pack, referred to as the ‘worker’ node here onwards.</p><p><strong>1.3 </strong>Add the following configurations to deployment.toml files in both nodes in path &lt;IS_HOME&gt;/repository/conf in order to enable clustering between them. I have used Well-Known Address (WKA) membership scheme for clustering.</p><p>You need to specify the IP Address and port that is used to communicate cluster messages. Port number should be unique to each node.</p><pre>[clustering]<br>membership_scheme = &quot;wka&quot;<br>local_member_host = &quot;&lt;IP_Address_of_the_editing_node&gt;&quot;<br>local_member_port = &quot;&lt;Port_number&gt;&quot;<br>members = [&quot;&lt;IP_Address_of_the_editing_node&gt;:&lt;Port_number&gt;&quot;, &quot;&lt;IP_Address_of_the_other_node&gt;:&lt;Port_number&gt;&quot;]</pre><p>For example, below are my configurations.</p><pre><strong>For manager node, </strong></pre><pre>[clustering]<br>membership_scheme = &quot;wka&quot;<br>local_member_host = &quot;127.0.0.1&quot;<br>local_member_port = &quot;4001&quot;<br>members = [&quot;127.0.0.1:4000&quot;, &quot;127.0.0.1:4001&quot;]</pre><pre><strong>For worker node,</strong></pre><pre>[clustering]<br>membership_scheme = &quot;wka&quot;<br>local_member_host = &quot;127.0.0.1&quot;<br>local_member_port = &quot;4000&quot;<br>members = [&quot;127.0.0.1:4000&quot;, &quot;127.0.0.1:4001&quot;]</pre><p>You can learn more about clustering membership schemes to decide on the best scheme suitable for your requirements from <a href="https://is.docs.wso2.com/en/latest/administer/clustering-overview/#about-membership-schemes">here</a>.</p><p><strong>1.4</strong> Change the &lt;IS_HOME&gt;/repository/conf/deployment.toml file to access the servers using a hostname instead of the raw IP. The hostName should be resolved to the Load Balancer front-end IP address.</p><pre>[server]<br>hostname = &quot;wso2.is&quot;</pre><p>Add this hostname mapping to etc/hosts file too.</p><p><strong>1.5</strong> We need to set a different port offset value for one IS node since both nodes will be running on the same machine Thus, add the following configuration to worker node only in the &lt;IS_HOME&gt;/conf/deployment.toml file.</p><pre>[server]<br>offset = &quot;1&quot;</pre><p><strong>1.6</strong> Navigate to the &lt;IS_HOME&gt;/repository/conf/deployment.toml file and set the proxy port as 443as shown below. This is the Load Balancer frontend port.</p><pre>[transport.http.properties]<br>proxyPort = 80<br>[transport.https.properties]<br>proxyPort = 443</pre><h3>2. Configuring Databases</h3><p><strong>2.1</strong> Navigate to &lt;IS_HOME&gt;/repository/conf in your 2 nodes and configure both deployment.toml files to point to the database.</p><p>Following is a sample configuration.</p><pre>[user_store]<br>type = &quot;database&quot;</pre><pre>[database.identity_db]<br>type = &quot;mysql&quot;<br>hostname = &quot;localhost&quot;<br>name = &quot;regdb?verifyServerCertificate=false&amp;amp;useSSL=false&amp;amp;requireSSL=false&quot;<br>username = &quot;root&quot;<br>password = &quot;root&quot;<br>port = &quot;3306&quot;</pre><pre>[database.shared_db]<br>type = &quot;mysql&quot;<br>hostname = &quot;localhost&quot;<br>name = &quot;regdb?verifyServerCertificate=false&amp;amp;useSSL=false&amp;amp;requireSSL=false&quot;<br>username = &quot;root&quot;<br>password = &quot;root&quot;<br>port = &quot;3306&quot;</pre><p>Refer this <a href="https://is.docs.wso2.com/en/latest/setup/working-with-databases/">documentation</a> for more information on working with databases in WSO2IS.</p><p><strong>2.2</strong> Next, add the MySQL JDBC driver to &lt;PRODUCT_HOME&gt;/repository/component/lib directory.</p><p><strong>2.3</strong> Finally you need to execute the DB scripts in order to create the database locally. This can be done either automatically during server startup using the -Dsetup option or manually running the scripts using MySQL workbench, DBeaver etc.</p><h3>3. Configuring NGINX load balancer</h3><p>Now that we have finished setting up the cluster, let’s start fronting it with an NGINX load balancer.</p><p><strong>3.1</strong> First you need to install NGINX to your local machine. There are 2 versions of NGINX as plus and community version where I have used the community version in this demonstration.</p><p><strong>3.2</strong> Navigate to /etc/nginx/conf.d directory and create a VHost file and name it as is.http.conf</p><p>Add the following configurations and save the file. By this configuration, Nginx will direct the HTTP requests to the two IS nodes via the HTTP 80 port using the http://is.wso2.com/ .</p><pre>upstream wso2.is.com {<br>    server 127.0.0.1:9443;<br>    server 127.0.0.1:9444;<br>}</pre><pre>server {<br>listen 80;<br>    server_name is.wso2.com;<br>    location / {<br>            proxy_set_header X-Forwarded-Host $host;<br>            proxy_set_header X-Forwarded-Server $host;<br>            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>            proxy_set_header Host $http_host;<br>            proxy_read_timeout 5m;<br>            proxy_send_timeout 5m;<br>            proxy_pass <a href="http://wso2.is.com/">http://wso2.is.com</a>;</pre><pre>proxy_http_version 1.1;<br>            proxy_set_header Upgrade $http_upgrade;<br>            proxy_set_header Connection &quot;upgrade&quot;;<br>        }<br>}</pre><p>3.3 In the same manner, let’s configure NGINX to direct HTTPS requests too, via the HTTPS 443 port using https://is.wso2.com/</p><p>Create another VHost file and save it as is.https.conf in the same /etc/nginx/conf.d directory. Add the following configurations into it.</p><pre>upstream ssl.wso2.is.com {<br>    server 127.0.0.1:9443;<br>    server 127.0.0.1:9444;<br>}</pre><pre>server {<br>listen 443;<br>    server_name is.wso2.com;<br>    ssl on;<br>    ssl_certificate /usr/local/etc/nginx/ssl/wso2.com.crt;<br>    ssl_certificate_key /usr/local/etc/nginx/ssl/wso2.com.key;<br>    location / {<br>            proxy_set_header X-Forwarded-Host $host;<br>            proxy_set_header X-Forwarded-Server $host;<br>            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>            proxy_set_header Host $http_host;<br>            proxy_read_timeout 5m;<br>            proxy_send_timeout 5m;<br>            proxy_pass <a href="https://ssl.wso2.is.com/">https://ssl.wso2.is.com</a>;</pre><pre>proxy_http_version 1.1;<br>            proxy_set_header Upgrade $http_upgrade;<br>            proxy_set_header Connection &quot;upgrade&quot;;<br>        }<br>}</pre><p>Tip: Add the ip_hash configuration to the file and reload nginx when trying to access the Management Console.</p><pre>upstream ssl.wso2.is.com {<br>    server 127.0.0.1:9443;<br>    server 127.0.0.1:9444;<br>    ip_hash;<br>}</pre><p>3.3 Open a terminal and run the below command to reload the NGINX server after adding the above 2 configurations for HTTP and HTTPS requests.</p><pre>$sudo service nginx reload</pre><p>To read further about load-balancing capabilities and more configurations, visit <a href="https://is.docs.wso2.com/en/latest/setup/fronting-with-the-nginx-load-balancer/">here</a>.</p><p>Now that we have finished setting up the necessary configurations, let’s start the Manager and Worker node servers.</p><ul><li>Navigate to &lt;IS_HOME&gt;/bin folder of Manager node, open a terminal and run the following command.</li></ul><pre>sh wso2server.sh</pre><p>Once the server starts, you’ll see a log in the terminal as below.</p><pre>INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Elected this member [xxxxx-xxxxx-xxxxx-xxxxx] as the Coordinator node</pre><ul><li>Similarly, navigate to &lt;IS_HOME&gt;/bin folder of Worker node, and run the same command in a terminal.</li></ul><pre>sh wso2server.sh</pre><p>After starting the Worker node, a log similar to the following will be printed for the Manager node which is acting as the Hazelcast Coordinator, indicating that the Worker node has successfully joined the cluster.</p><pre>INFO {org.wso2.carbon.core.clustering.hazelcast.wka.WKABasedMembershipScheme} - Member joined [xxxxx-xxxxx-xxxxx-xxxxx]: /127.0.0.1:4000</pre><ul><li>Also, try shutting down the Manager node where you’ll see the remaining worker node elected as the new coordinator of the cluster, as shown below.</li></ul><pre>INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} — Elected this member [xxxxx-xxxxx-xxxxx-xxxxx] as the Coordinator node</pre><pre>INFO {org.wso2.carbon.core.clustering.hazelcast.wka.WKABasedMembershipScheme} — Member left [xxxxx-xxxxx-xxxxx-xxxxx]: /127.0.0.1:4001</pre><p>If you can observe the above behaviors, that means you have successfully set up a worker-manager cluster. Congratulations :)</p><p>Hope now you have a more comprehensive idea on how the reliability and availability issues can be easily solved by adapting to a worker/manager clustering mode without totally relying on a single instance of a product.</p><p>For further information, do visit WSO2 Identity Server <a href="https://is.docs.wso2.com/en/latest/setup/deployment-guide/">Documentation</a>.</p><p>and Thank you for reading!</p><h4>References</h4><ul><li><a href="https://is.docs.wso2.com/en/latest/">WSO2 Identity Server Documentation</a></li><li><a href="https://doc-archives.microstrategy.com/producthelp/10.11/SystemAdmin/WebHelp/Lang_1033/Content/Clustering.htm">Clustering Multiple MicroStrategy Servers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63e11d9e7946" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/a-step-by-step-guide-to-wso2-is-worker-manager-clustering-with-load-balancing-63e11d9e7946">A step-by-step guide to WSO2 IS worker-manager clustering with load balancing.</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying mysql NDB cluster using Docker and Integrating it with WSO2 IS.]]></title>
            <link>https://yasarayasawardhana.medium.com/deploying-mysql-ndb-cluster-using-docker-and-integrating-it-with-wso2-is-8105e43f3a61?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8105e43f3a61</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[wso2is]]></category>
            <category><![CDATA[mysql-ndb-cluster]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Sun, 15 Aug 2021 17:11:13 GMT</pubDate>
            <atom:updated>2021-08-22T06:09:39.341Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploying MySQL NDB cluster using Docker and Integrating with WSO2 IS.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*79CUjVDVF8mgjqv4EN0Nlw.png" /></figure><p>Welcome to my new blog post on medium in awhile:) In this blog, i’m hoping to help you get started with setting up and using a MySQL NDB cluster with WSO2 IS.</p><h4>What is MySQL NDB cluster?</h4><p>When a database is created, one of the most overlooked factors is the storage engine that we use, which can lead to performance and data integrity issues. MySQL uses an architecture that allows for a range of pluggable storage engines, out of which InnoDB and NDB are the most notable ones.</p><p>NDB engine is used when your database is in a cluster environment, which will cater high-availability, distributed computing, high-redundancy and highest possible up-times.</p><blockquote>In summary,<em> MySQL NDB Cluster</em> is the standard MySQL server integrated with an in-memory clustered NDB storage engine.</blockquote><p>Refer this <a href="https://dev.mysql.com/doc/mysql-cluster-excerpt/8.0/en/">documentation</a> to learn more about MySQL NDB cluster.</p><h4>Architecture of a NDB cluster</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/261/1*Ofi467Y67QlDzFNjl04kjw.png" /><figcaption>A simple NDB cluster setup</figcaption></figure><p>There are three types of cluster nodes in a NDB cluster:</p><ul><li>Management node: The role of this type of node is to manage the other nodes within the NDB Cluster, performing functions such as providing configuration data and, starting and stopping nodes.</li><li>Data node: These nodes store all the cluster data.</li><li>SQL node: This type of nodes access the cluster data. In the case of NDB Cluster, an SQL node is a traditional MySQL server that uses the NDB storage engine.</li></ul><p>Every MySQL Server has access to the data in all of the data nodes. If one MySQL server changes a piece of data then it is instantly visible to all of the other MySQL Servers. Having more than 1 data nodes and sql nodes is recommended to benefit from the NDB Cluster’s high-availability features.</p><p>Now, lets see how we can configure a MySQL NDB cluster environment using Docker, in our local machine.</p><h4>Configuring NDB cluster with Docker.</h4><p><strong>Pre-requisites:</strong></p><p>Before starting off, you need to install docker to your local machine. You can refer this <a href="https://docs.docker.com/engine/install/">documentation</a> as the installation guide.</p><p>In this blog, I’m going to show you how to configure a NDB cluster with 1 management node, 2 data nodes and 2 SQL nodes.</p><p>Generally, the cluster nodes are running on separate hosts in a network. So first of all, we need to create a network in docker and connect the containers to the network. Let’s get started.</p><p><strong>Step 1: Create the docker network by running the following command on a terminal.</strong></p><pre>docker network create cluster --subnet=10.100.0.0/16</pre><p><strong>Step 2: Get the MySQL docker repository.</strong></p><ul><li>First, clone the MySQL docker repository from <a href="https://github.com/mysql/mysql-docker">here</a>.</li><li>Checkout the ‘mysql-cluster’ branch.</li><li>Configure the cnf files of your prefered version. Here I am using NDB 8.0 version. Open the mysql-cluster.cnf file in the mysql-docker/8.0/cnf path.</li></ul><p>By default mysql-cluster.cnf is configured to use a single mysql node and the ip addresses are already configured. Hence you need to configure the IP-addresses of all 5 nodes to match your subnet, as shown below.</p><pre>[ndb_mgmd]<br>NodeId=1<br>hostname=10.100.0.2<br>datadir=/var/lib/mysql</pre><pre>[ndbd]<br>NodeId=2<br>hostname=10.100.0.3<br>datadir=/var/lib/mysql<br>MaxNoOfAttributes=8192<br>MaxNoOfOrderedIndexes=512<br>MaxNoOfTables=256</pre><pre>[ndbd]<br>NodeId=3<br>hostname=10.100.0.4<br>datadir=/var/lib/mysql<br>MaxNoOfAttributes=8192<br>MaxNoOfOrderedIndexes=512<br>MaxNoOfTables=256</pre><pre>[mysqld]<br>NodeId=4<br>hostname=10.100.0.10</pre><pre>[mysqld]<br>NodeId=5<br>hostname=10.100.0.11</pre><p>Note that in the 2 data nodes of the above configuration, additional 3 parameters are used, which is required when configuring NDB cluster with WSO2 products.</p><pre>MaxNoOfAttributes=8192<br>MaxNoOfOrderedIndexes=512<br>MaxNoOfTables=256</pre><ul><li>Open mysql-docker/8.0/cnf/my.cnf and modify the ndb-connectstring to match the ndb_mgmd node.</li></ul><pre>[mysqld]<br>ndbcluster<br>ndb-connectstring=10.100.0.2<br>user=mysql</pre><pre>[mysql_cluster]<br>ndb-connectstring=10.100.0.2</pre><ul><li>Build the docker image after completing the above configurations.</li></ul><pre>docker build -t &lt;image_name&gt; &lt;Path_to_docker_file&gt;</pre><pre>eg:<br>docker build -t mysql-cluster mysql-docker/8.0</pre><p>As the next step, let’s create the nodes in the cluster.</p><p><strong>Step 3: Create the manager node.</strong></p><p>Create a manager node with the name ‘management1’ and IP-address ‘10.100.0.2’.</p><pre>docker run -d --net=cluster --name=management1 --ip=10.100.0.2 mysql-cluster ndb_mgmd</pre><p><strong>Step 4: Create the 2 data nodes, ndb1 and ndb2.</strong></p><pre>docker run -d --net=cluster --name=ndb1 --ip=10.100.0.3 mysql-cluster ndbd</pre><pre>docker run -d --net=cluster --name=ndb2 --ip=10.100.0.4 mysql-cluster ndbd</pre><p><strong>Step 5: Create the 2 SQL nodes, mysql1 and mysql2.</strong></p><pre>docker run -d --net=cluster --name=mysql1 --ip=10.100.0.10 -e MYSQL_RANDOM_ROOT_PASSWORD=true mysql-cluster mysqld</pre><pre>docker run -d --net=cluster --name=mysql2 --ip=10.100.0.11 -e MYSQL_RANDOM_ROOT_PASSWORD=true mysql/mysql-cluster mysqld</pre><p>Now we are done with creating all the nodes in the NDB cluster. Run the below command to verify whether the cluster setup is working fine.</p><pre>docker run -it --net=cluster mysql-cluster ndb_mgm</pre><p>Then you will see the cluster management console as follows.</p><pre>[Entrypoint] MySQL Docker Image 8.0.23-1.1.19-cluster<br>[Entrypoint] Starting ndb_mgm<br>-- NDB Cluster -- Management Client --<br>ndb_mgm&gt;</pre><p>Run the ‘show’ command to see the following result.</p><pre>ndb_mgm&gt; show<br>Connected to Management Server at: 10.100.0.2:1186<br>Cluster Configuration<br>---------------------<br>[ndbd(NDB)] 2 node(s)<br>id=2 <a href="http://twitter.com/10">@10</a>.100.0.3  (mysql-8.0.23 ndb-8.0.23, Nodegroup: 0, *)<br>id=3 <a href="http://twitter.com/10">@10</a>.100.0.4  (mysql-8.0.23 ndb-8.0.23, Nodegroup: 0)</pre><pre>[ndb_mgmd(MGM)] 1 node(s)<br>id=1 <a href="http://twitter.com/10">@10</a>.100.0.2  (mysql-8.0.23 ndb-8.0.23)</pre><pre>[mysqld(API)] 2 node(s)<br>id=4 <a href="http://twitter.com/10">@10</a>.100.0.10  (mysql-8.0.23 ndb-8.0.23)<br>id=5 <a href="http://twitter.com/10">@10</a>.100.0.11  (mysql-8.0.23 ndb-8.0.23)</pre><p>If you get an output similar to the above, that means your NDB cluster setup is working fine :)</p><p>Moving on, let’s configure our 2 mysql nodes, in order to access them remotely and create databases.(Basically, mysql nodes are the access points to the whole cluster externally.)</p><p><strong>Step 6: Change the default passwords of sql nodes.</strong></p><ul><li>When we created the mysql nodes in step 5, default random passwords are set. You can retrieve those default passwords from the following command.</li></ul><p>For mysql1 node:</p><pre>docker logs mysql1 2&gt;&amp;1 | grep PASSWORD</pre><p>For mysql2 node:</p><pre>docker logs mysql2 2&gt;&amp;1 | grep PASSWORD</pre><ul><li>Run the following command to change the password for the mysql1 node.</li></ul><pre>docker exec -it mysql1 mysql -uroot -p</pre><p>Then paste the default password for this node you got from the previous step and press enter. You will then be logged into mysql1 node.</p><p>Enter the below commands to change the password of the root user.</p><pre>ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘root’;<br>CREATE USER &#39;root&#39;@&#39;%&#39; IDENTIFIED BY &#39;root&#39;;    <br>GRANT ALL PRIVILEGES ON *.* TO &#39;root&#39;@&#39;%&#39;  WITH GRANT OPTION;<br>FLUSH PRIVILEGES;</pre><ul><li>Repeat the same process to change the password of the mysql2 node too.</li></ul><pre>docker exec -it mysql2 mysql -uroot -p</pre><p>Paste the previous password and proceed to execute the same SQL commands to change the password.</p><pre>ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘root’;<br>CREATE USER &#39;root&#39;@&#39;%&#39; IDENTIFIED BY &#39;root&#39;;    <br>GRANT ALL PRIVILEGES ON *.* TO &#39;root&#39;@&#39;%&#39;  WITH GRANT OPTION;<br>FLUSH PRIVILEGES;</pre><p><strong>Step 7: Login to the mysql nodes and create databases.</strong></p><p>Run the below command in a terminal with the relevant IP-address, username and give the password(‘root’ in our case) given in step 6, when asked for.</p><pre>mysql -h10.100.0.10 -uroot -p</pre><p>Exit from the sql window using the ‘exit’ command.</p><pre>mysql&gt; exit</pre><p>Try logging in to the 2nd mysql node in the same manner.</p><pre>mysql -h10.100.0.11 -uroot -p</pre><p>As I mentioned in the beginning of this blog, sql nodes of the NDB cluster replicate the exact same data. Henceforth, once we create the databases in one sql node, that can be seen from the other sql nodes too.</p><p>Let’s create 2 databases ‘test_db’ and ‘test_db_shared’ in the mysql nodes. First you need to log in to mysql1 node. Then execute the following SQL queries.(You can use any character set and collation based on the requirement.)</p><pre>mysql&gt; CREATE DATABASE test_db CHARACTER SET latin1 COLLATE latin1_swedish_ci;</pre><pre>mysql&gt; CREATE DATABASE test_db_shared CHARACTER SET latin1 COLLATE latin1_swedish_ci;</pre><p>Log in to the 2nd mysql node and run the below command where you’ll see the same 2 tables there as well.</p><pre>mysql&gt; SHOW DATABASES;<br>+--------------------+<br>| Database           |<br>+--------------------+<br>| information_schema |<br>| mysql              |<br>| ndbinfo            |<br>| performance_schema |<br>| sys                |<br>| test_db            |<br>| test_db_shared     |<br>+--------------------+<br>7 rows in set (0.03 sec)</pre><p>We’ve now come to the final part of this blog, which is integrating our NDB cluster with WSO2 IS product.</p><h4>How to integrate WSO2 IS with the newly created database…</h4><ol><li>Download the latest WSO2 Identity Server from <a href="https://wso2.com/identity-server/">here</a>. For details on running the Identity Server, see <a href="https://is.docs.wso2.com/en/latest/setup/running-the-product/">Running the Product</a>.</li></ol><p>2. Navigate to &lt;PRODUCT_HOME&gt;/repository/conf in your downloaded IS pack and open the deployment.toml file to configure the database. I’m going to use ‘test_db’ as my identity DB and ‘test_db_shared’ as the shared DB.</p><pre>[user_store]<br>type = &quot;database_unique_id&quot;</pre><pre>[database.identity_db]<br>type = &quot;mysql&quot;<br>url = &quot;jdbc:mysql://10.100.0.10:3306/test_db?autoReconnect=true&amp;amp;relaxAutoCommit=true&amp;amp;useSSL=false&amp;amp;failOverReadOnly=false&quot;<br>username = &quot;root&quot;<br>password = &quot;root&quot;</pre><pre>[database.shared_db]<br>type = &quot;mysql&quot;<br>url = &quot;jdbc:mysql://10.100.0.10:3306/test_db_shared?autoReconnect=true&amp;amp;relaxAutoCommit=true&amp;amp;useSSL=false&amp;amp;failOverReadOnly=false&quot;<br>username = &quot;root&quot;<br>password = &quot;root&quot;</pre><p>Make sure to pass the follwing parameters “autoReconnect=true”, “relaxAutoCommit=true”, “useSSL=false” and “failOverReadOnly=false” with the connection URL to establish the connection successfully between the product and the MySQL servers. Refer this <a href="https://is.docs.wso2.com/en/latest/setup/changing-to-mysql/">documentation</a> for more information on configuring a MySQL DB in WSO2IS.</p><p>3. Next, add the MySQL JDBC driver to &lt;PRODUCT_HOME&gt;/repository/component/lib directory.</p><p>4.Final step is to create the WSO2 identity DB and WSO2 shared DB. I used MySQL Workbench for this purpose.</p><p>Open a connection with the relevant hostname, port number, username and password. There you will see the created 2 databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*K9__TdMR093LWY8ArpP4oQ.png" /></figure><p>5. Execute the database scripts.</p><p>Select the ‘test_db’ in MySQL workbench and execute the DB scripts in the following paths.</p><ul><li>&lt;IS-HOME&gt;/dbscripts/identity/mysql-cluster.sql</li><li>&lt;IS-HOME&gt;/dbscripts/identity/uma/mysql-cluster.sql</li><li>&lt;IS-HOME&gt;/dbscripts/consent/mysql-cluster.sql</li></ul><p>Select the ‘test_db_shared’ and execute the DB script the following path.</p><ul><li>&lt;IS-HOME&gt;/dbscripts/mysql-cluster.sql</li></ul><p>You have reached the end of this blog post. In summary, I have guided you on configuring a MySQL NDB cluster with 5 nodes using docker and finally integrating it with WSO2 IS.</p><p>Hope you find this blog post useful!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8105e43f3a61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Future of Biometrics in Identity and Access Management.]]></title>
            <link>https://yasarayasawardhana.medium.com/future-of-biometrics-in-identity-and-access-management-15ef5896189?source=rss-c72789a6081f------2</link>
            <guid isPermaLink="false">https://medium.com/p/15ef5896189</guid>
            <category><![CDATA[biometric-authentication]]></category>
            <category><![CDATA[multifactorauthentication]]></category>
            <dc:creator><![CDATA[Yasara Yasawardhana]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 04:59:51 GMT</pubDate>
            <atom:updated>2021-08-21T13:25:39.315Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*PeNjtg95aNL_ILcOpppZFQ.jpeg" /></figure><p>Identity and Access Management is now in a new era of authentication; moving beyond passwords which is already quite common on many devices. In fact password-less authentication is a verification process that determines whether someone is who they say they are without the need for the person to enter his/her credentials manually.</p><h3>Why Go Password-less In The First Place?</h3><p>Passwords and credential theft are a huge concern on cybersecurity and fraud is an issue for both consumers and employers alike. Apparently any alternative to passwords will be met with suspicion and will take some time for the consumers to adopt to a new technology. But integrating a password-less solution should be simpler and faster where it can reduce the risk of phishing and password spray and replay attacks by switching to a password-less authentication.</p><p>Unlike passwords or token-based authentication, Biometric authentication uses biological characteristics unique to an individual to verify the identity. It’s harder to spoof and more convenient for users since they don’t have to remember passwords or carry a physical token that can easily be lost or stolen where the authenticator is part of the individual.</p><p>The biometrics market is constantly evolving. The market is dominated by 4 technologies: fingerprint, face, iris and voice recognition. By 2019, an upward trend for the usage of biometric authentication is prominent. Moreover, a study conducted by ‘Spiceworks’ shows that 62% of organizations currently use biometric technology for authentication. And, the same study also predicts that there will be nearly 90% of businesses using it by the year 2020.</p><p>Yet there are several concerns of improvements in using biometrics for authentication. Hackers are finding new ways to subvert biometrics. For example a team of researchers has recently developed a fingerprint template using machine learning algorithms, which could trick an iPhone into unlocking.Continuous authentication using biometrics like fingerprint will continue to gain traction.Much of this relates to continuous authentication, which calculates an ‘authentication score’ on a rolling basis that reflects the likelihood of a user being exactly who they say they are. In these cases, the score takes into account how a user behaves in the app and any personal details they entered. Hence regulators are tightening rules around the collection of biometric data.</p><p>However, a survey conducted by Visa found that 86% of consumers actually want to use biometrics to verify their identity, as opposed to traditional passwords.</p><p><strong>Voice recognition and Iris scanning, the future of Biometrics…</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*8mqv3J_HaS34EGgYfhNNAQ.png" /></figure><p>Voice recognition (also called speaker recognition or voice authentication) analyses a person’s voice to verify their identity. Airways and soft-tissue cavities, as well as the shape and movement of the mouth and jaw, influence voice patterns to create a unique “Voice-print”. A high-performance tool that can be applied in any industry, this biometric solution simplifies procedures and makes the user’s life easier: just talk to sign in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*J68cRRtwb7XdOc2h5sLjZQ.jpeg" /></figure><p>In terms of user experience, a more convenient biometric authentication technology for desktops is the Iris scanning which is supported by Microsoft and it has a few benefits over the alternatives. Since it should be more reliable and convenient than fingerprint scanning, Microsoft will be launching a combination of special hardware and software without letting to be handled by our webcams or phone cameras to make sure the system can’t be beaten.</p><p>Provided that fingerprint and face recognition are already prominent as authentication technologies in identity and access management, voice recognition and iris scanning is going to be super cool implementations in biometrics in the near future. Isn’t it so fascinating that in order to simply authenticate yourself, you just need to stare at the webcam or just talk!</p><p>Hence its obvious that biometrics are already changing the game, and they will continue to do so.</p><p><em>Originally published at </em><a href="https://medium.com/@yasaray_67601/future-of-biometrics-in-identity-and-access-management-a88ee9204911"><em>https://medium.com</em></a><em> on September 9, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15ef5896189" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>