<?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 Sanjula Madurapperuma on Medium]]></title>
        <description><![CDATA[Stories by Sanjula Madurapperuma on Medium]]></description>
        <link>https://medium.com/@sanjulamadurapperuma?source=rss-24ab1eb53a65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lf8-Z-eTCxv1MZEndqXM9g.jpeg</url>
            <title>Stories by Sanjula Madurapperuma on Medium</title>
            <link>https://medium.com/@sanjulamadurapperuma?source=rss-24ab1eb53a65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 11:19:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanjulamadurapperuma/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[Testing out WSO2 Identity Server sample apps]]></title>
            <link>https://medium.com/@sanjulamadurapperuma/testing-out-wso2-identity-server-sample-apps-53af60f642ed?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/53af60f642ed</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[identity]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Mon, 20 Dec 2021 04:34:41 GMT</pubDate>
            <atom:updated>2021-12-20T07:38:33.056Z</atom:updated>
            <content:encoded><![CDATA[<h3>Testing Out WSO2 Identity Server Sample Apps</h3><h4>With Signature Validation and Custom Host Names</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbCkKoJZu9aHMbMAFoFprw.png" /><figcaption>Cover Image by Author</figcaption></figure><p><a href="https://wso2.com/identity-server/">WSO2 Identity Server</a> is an API-driven, completely open-source, cloud-native Identity and Access Management (IAM) product.</p><p>Anyone willing to get started with this product can refer to their official documentation, but what if you want to get a hands-on experience of how WSO2 Identity Server will work with an application?</p><p>Fear not, since the wonderful open-source developer community has come up with not one, but several sample applications for you to play with! This collection is available in GitHub as the <a href="https://github.com/wso2/samples-is"><strong>samples-is</strong></a> repository. Let’s see how we can test these apps out along with signature validation and custom host names, which helps to simulate a realistic secure production environment.</p><p>For the purpose of this guide, we will utilize the <strong><em>saml2-webapp-pickup-manager.com</em></strong> sample app.</p><h3>1 — Prerequisites</h3><p>1.Download and install <a href="https://tomcat.apache.org/download-80.cgi">Apache Tomcat</a></p><p><em>Note:</em> The root folder of the Apache Tomcat installation will be called &lt;TOMCAT_HOME&gt; throughout the rest of this article.</p><p>2.Download and install <a href="https://wso2.com/identity-server/">WSO2 Identity Server</a>.</p><h3>2 — Setting up the sample app</h3><p>There are two options available to retrieve the sample app.</p><p>1.<strong>Direct download</strong></p><p>The saml2-webapp-pickup-manager.com web app used in this guide can be downloaded directly from <a href="https://github.com/wso2/samples-is/releases/download/v4.3.0/saml2-web-app-pickup-manager.com.war">here</a>. Any other sample app can be downloaded from <a href="https://github.com/wso2/samples-is/releases">here</a>.</p><p>2.<strong>Build from source</strong></p><ul><li>Fork and clone the <a href="https://github.com/wso2/samples-is">WSO2 samples-is</a> GitHub repository.</li><li>Run the command mvn clean install to build the artifacts.</li><li>Copy the sample application from the respective folder. In this case, it is: &lt;SAMPLES_IS_HOME&gt;/sso-samples/saml2-sso-sample/saml2-web-app-pickup-manager/target/saml2-web-app-pickup-manager.com.war , where &lt;SAMPLES_IS_HOME&gt; is the root folder where the GitHub repository was cloned.</li></ul><p>After downloading or building up from the source, follow the given steps to set up the sample app.</p><ul><li>The sample application which was copied should now be placed in the &lt;TOMCAT_HOME&gt;/webapps folder.</li><li>Start the Tomcat Server.</li><li>After Tomcat has started up, you will notice the extracted folder of the .war file containing the sample app. This would be referred to as &lt;sample-app-home&gt; throughout the rest of this article.</li></ul><h3>3 — Configure WSO2 Identity Server to facilitate the app</h3><p>This section would be divided into two approaches. One would use the carbon management console in WSO2 Identity Server (available at the /carbon endpoint) and the other would use the new WSO2 Identity Server console, which is still in beta as of the time of this writing (available at the /console endpoint).</p><blockquote><strong>Note: </strong>The inclusion of steps to follow in the new WSO2 Identity Server console (section 3.2) in this guide is to allow future-proofing the guidelines provided in this article, even though it is still in an experimental stage and <strong>not recommended</strong> for use in production environments until it moves out of beta.</blockquote><h4>3.1 — Using carbon management console</h4><p>1.Navigate to Main &gt; Service Providers &gt; Add .</p><p>2.Enter a suitable name for the service provider and click Register.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*Fkn15zDL1dTWpsEQbaSSbg.png" /></figure><p>3.Go to Inbound Authentication Configuration &gt; SAML2 Web SSO Configuration &gt; Configure .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*C46dnYnampDRuCMJal9Ufw.png" /></figure><p>4.Enter the Assertion Consumer URL of the sample web app that was configured in Apache Tomcat in section 2 and click on Add. In this case the Assertion Consumer URL would be:</p><pre>http://&lt;hostname_and_or_port&gt;/&lt;name_of_application&gt;/home.jsp</pre><p>5.Make sure to enable the following options and then click on Update:</p><pre>Enable Response Signing</pre><pre>Enable Signature Validation in Authentication Requests and Logout Requests</pre><pre>Enable Single Logout</pre><p>Since this article assumes that a custom domain is being used to host WSO2 Identity Server and/or Apache Tomcat and not the default localhost and the fact that we are enabling signature validation, we need to build a trust between WSO2 Identity Server and the sample application.</p><p>This can be done by exchanging the public certificates of both of them.</p><p>Provided that the steps provided in the official documentation to <a href="https://is.docs.wso2.com/en/latest/setup/changing-the-hostname/">change host names</a> have been followed, the .pem certificate file has been exported and then imported into the client_truststore.jks file, we will import the public certificate from WSO2 Identity Server into the sample application’s keystore.</p><p>6.Open a new terminal window and navigate to the &lt;sample-app-home&gt;/WEB_INF/classes folder, where &lt;sample-app-home&gt; refers to the location where the sample application is installed in.</p><p>7.Run the following command:</p><pre>keytool -import -alias &lt;alias_name_of_the_certificate&gt; -file &lt;public_key_of_wso2_identity_server&#39;s keystore&gt; -keystore &lt;keystore_name_of_sample_application&gt;</pre><p>Type in yes when a prompt requests you to confirm adding this certificate to the keystore.</p><p>8.Now we need to export the public certificate of the sample application. It can be done using the following command:</p><pre>keytool -export -alias wso2carbon -keystore &lt;keystore_of_sample_application&gt; -rfc -file &lt;output_certificate.pem&gt;</pre><p>9. Since custom host names are being used, it is essential that we edit the sso.properties file (located at &lt;sample-app-home&gt;/WEB_INF/classes) and rename the respective occurrences of localhost to the desired host name, be it of the sample app or WSO2 Identity Server.</p><p>Now we can upload the exported certificate into WSO2 Identity Server.</p><p>10. Navigate to Service Providers&gt; List &gt; &lt;service_provider_of_sample_app&gt; and click on Edit .</p><p>11.Click on Upload SP Certificate .</p><p>12. Once done, click on Update to save the changes.</p><p><strong>Note</strong>: If tenants other than the default are being used, add the following property in the sso.properties file of the pickup manager application.</p><pre>QueryParams=tenantDomain=&lt;tenant_name&gt;</pre><h4>3.2 — Using the new console (Experimental)</h4><p>1.Navigate to Develop &gt; Applications &gt; + New Application</p><p>2.Select Custom Application from the page shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_jAO1ToOPSeytUozSVPcQ.png" /></figure><p>3. Enter a suitable name for the new application in the dialog box shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*VgdcgbDThyp4HJIiWxoFDA.png" /></figure><p>4. Once the new application has been created, select the Access tab on the home page of the application. Then click on + New Protocol .</p><p>5.Scroll down in the dialog box shown, select SAML from the Manual Setup section and click Next.</p><p>6. While in the mode of Manual Configuration enter a suitable name for the issuer and add the following Assertion Consumer URL:</p><pre>http://&lt;hostname_and_or_port&gt;/&lt;name_of_application&gt;<a href="http://localhost.com:8080/saml2-web-app-pickup-dispatch.com/home.jsp">/home.jsp</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*iUhE-nFrbM3VzZuZCcgIog.png" /></figure><p>7. After clicking Next , confirm the entered properties and click Finish .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*POUcUzjJNEAXkJfR1ITuIQ.png" /></figure><p>8.In the Access tab, enable the following options and click on Update:</p><pre>Sign SAML responses</pre><pre>Enable request signature validation</pre><pre>Single Logout Profile</pre><p>9.Follow steps 6–9 in section 3.1 in order to exchange the public certificates of both WSO2 Identity Server and the sample application.</p><p>10.Navigate to the General tab in the Application view of the sample application and select Provide Certificate under the Certificate section and provide the certificate value in PEM format before clicking Update.</p><p>Voila! Now you will be able to log in to the sample app successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C3WVLDgMJ1W-Fqbkw4vNLg.gif" /><figcaption>Successfully logging in to the sample application using WSO2 Identity Server</figcaption></figure><p>Feel free to reach out to me on <a href="https://www.linkedin.com/in/sanjula-madurapperuma/">LinkedIn</a>, follow me on <a href="https://github.com/sanjulamadurapperuma">GitHub</a> and also subscribe to me on Medium!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53af60f642ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 3]]></title>
            <link>https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-3-51b65c4ff27f?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/51b65c4ff27f</guid>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[api-development]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Thu, 10 Sep 2020 17:08:16 GMT</pubDate>
            <atom:updated>2020-09-19T13:32:20.328Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 3</h3><h4>Broken Function Level Authorization, Mass Assignment, and Security Misconfiguration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wuEUDAkSJw0qIIAOK4qoiw.jpeg" /><figcaption>Figure 1: It is critical to configure security of your APIs correctly to avoid leaving gaping back-doors for attackers to feast on</figcaption></figure><p>This article is part of a series aimed at bringing awareness to OWASP Top 10 Security Threats and how they can easily be mitigated using a good API Gateway.</p><p>Read <a href="https://bit.ly/owasp-part-1">Part 1</a> and <a href="https://bit.ly/owasp-part-2">Part 2</a> if you missed it.</p><p>Here we will focus on another 3 threats from the list: <em>Broken Function Level Authorization</em>, <em>Mass Assignment</em>, and <em>Security Misconfiguration</em>.</p><h3>5 — Broken Function Level Authorization</h3><p>Many modern API-based applications have APIs with multiple resources to perform various tasks, thereby increasing the need for proper authorization checks while taking into account the user hierarchy. Lack thereof will result in attackers being able to access important and sensitive functionality and information only available for authorized users. Administrative functions are the key targets for this type of attack.</p><p>An example of the exploitation of such a vulnerability could involve an application that uses the endpoint:</p><pre>/company/v1/users/{user_id}</pre><p>where {user_id} is replaced with the respective user’s ID and by using the GET method, returns a JSON with details about that particular user’s profile.</p><p>However, if an attacker notices a pattern in the way the APIs in the application is structured, the attacker may be able to duplicate the request and manipulate the <em>HTTP</em> method to <em>DELETE </em>which is the endpoint for deleting existing users. In this application, that specific endpoint does not implement function-level authorization / access privilege checks, therefore the attacker is able to delete an existing user profile and carry out potentially harmful actions on the system as illustrated below (Figure 2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7znE83c-bp3fdn2LiAqFg.jpeg" /><figcaption>Figure 2: Attacker deletes an existing user account</figcaption></figure><p>In other words, the attacker is able to send legitimate API calls to existing API endpoints that they must not have access to.</p><p>Most of the time, the main targets of this type of attack are API endpoints that perform administrative functions, which further signifies the importance of implementing proper authorization mechanisms in any application.</p><p><strong>How can this be mitigated?</strong></p><p>First, it is essential to review and perform a comprehensive analysis of the current authorization mechanism in an application if any while taking into account the user hierarchy and all the different roles, permissions and groups in the application.</p><p>It would be ideal if the following 3 questions can be answered in order to clearly distinguish the pitfalls of the current authorization mechanism:</p><ol><li>Is it possible for a regular user with basic permissions to access administrative APIs or functions?</li><li>Does changing the HTTP method of an endpoint allow a user with basic permissions to perform sensitive actions (i.e. administrative actions like creation, modification and deletion of data)?</li><li>Can a user from one user group access a functionality that must only be exposed to users from another user group, by just guessing the endpoint URL and parameters?</li></ol><p>OAuth scope-based access control functionality in an API Gateway can be used to easily mitigate this vulnerability. Once the OAuth token is received from the user, the Gateway can validate it against a Security Token Service (STS) before allowing the request to pass through to the backend as shown below (Figure 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*En8Au1xt-RmtLhlGnbgaCA.jpeg" /><figcaption>Figure 3: Attacker attempts to call the POST endpoint with an OAuth token that has a mismatching scope but the API Gateway thwarts it easily</figcaption></figure><p>In this case, an attacker is trying to access the DELETE endpoint <strong>/company/v1/users/10</strong> to delete an existing user with user id 10 by using an OAuth token <strong>Nhtifireofghewl34jd43i</strong> which has the scope of <strong>misc-staff</strong> (i.e. a normal user without administrative privileges) in this application. However, the Gateway placed in between the attacker and the backend will validate the OAuth token with the Security Token Service to identify whether the scope is of an administrator. Since it isn’t the Gateway will abort the request being sent to the backend and return a 403 Forbidden error.</p><p>On the other hand, this will be how a legitimate request would look like with the API Gateway in place:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LClzoZIAc4-vnQyEDPa7fA.jpeg" /><figcaption>Figure 4: A legitimate client attempts to call the same POST endpoint but with an OAuth token which has the right scope</figcaption></figure><p>The client will access the same POST endpoint but this time with the OAuth token <strong>T842m0wnfsliewqieew</strong> which has the scope of admin (user with administrative privileges). Since the Security Token Service validates and confirms that this token has a scope of admin, the Gateway will allow the request to pass through to the backend and the respective response will be given back to the client successfully.</p><h3>6 — Mass Assignment</h3><p>Many modern API-based applications contain objects that have a large number of properties, of which only a few should be updated directly by a client, such as a user’s first name, last name, and address in the case of a user profile. However, there are also properties that should not be edited by a client, such as permission-related properties that are set only by admins, and internal properties that should only be set internally, such as the creation time of an item. If these properties are identified by an attacker, it could lead to privilege escalation, data tampering and even worse, bypassing stringent security mechanisms.</p><p>An example of exploitation of this type of vulnerability could involve an online payment application allowing the user to edit basic information for their profile. The API endpoint:</p><pre>application/v1/users/{user_id}</pre><p>with the <em>HTTP</em> method <em>PUT</em> allows for this and the attacker could send the usual payload like the one below for example:</p><pre>{ “first_name”: “Allan”, “last_name”: “Trousdale”, “DOB”: “1/12/1979” }</pre><p>It will return the updated user profile along with an additional property to signify the balance of the particular user in the <em>JSONObject </em>(shown in Figure 5).</p><pre>{ “username”: “allant01”, “first_name”: “Allan”, “last_name”: “Trousdale”, “DOB”: “1/12/1979”, “balance”: 0 }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_u8Ma9IGOiQicvG9i3Uug.jpeg" /><figcaption>Figure 5: An attacker running a normal API call to the PUT endpoint and finding out that a property that signifies the balance of the user is accessible by this API</figcaption></figure><p>By just replaying the <em>PUT</em> request with the following payload, the attacker is then able to mass assign properties that should not be edited, which in this case is the balance property:</p><pre>{ “first_name”: “Allan”, “last_name”: “Trousdale”, “DOB”: “1/12/1979”, “balance”: 9999999999 }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xcNYihGYnxa5X-8On2EZA.jpeg" /><figcaption>Figure 6: The attacker taking advantage of the vulnerability in the API that allows anyone to change the balance amount of a user.</figcaption></figure><p><strong>How can this be mitigated?</strong></p><p>Firstly, it is essential to identify and assess the existing APIs in an application which allows properties to be updated directly by the client by automatically converting client parameters to internal object parameters without taking into account the sensitivity of those properties.</p><p>Examples of these properties include:</p><ul><li><em>internal properties</em> like created time or updated time</li><li><em>process-dependent properties</em> like credit balance</li><li><em>permission related properties</em> like is_admin</li></ul><p>Once this process is completed an API Gateway will mitigate this vulnerability by screening all API requests that contain parameters that are defined as sensitive and should only be changed internally from the application and bounce back those requests with a meaningful error message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPOKBQCWehDHd16pmP-VTA.jpeg" /><figcaption>Figure 7: API Gateway rejecting an attempt by the attacker to change the sensitive parameter of balance</figcaption></figure><p>Furthermore, an API Gateway is also capable of screening parameters passed in an API request by scope. For example, a member of the security team could require whitelisting a device for Allan. This is made possible via a PUT request to the endpoint /application/v1/users/{user-id}/activities, and a property called whitelist_ip_address. However, with an API Gateway in place, it would accept requests containing that property in the payload only if the scope is either security_team or admin (shown in Figure 8).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9byjmukAHqWkX2OvTDgIlg.jpeg" /><figcaption>Figure 8: Scope-based Access Control in an API Gateway being used to screen API request payload</figcaption></figure><h3>7 — Security Misconfiguration</h3><p>Prying attackers will often try to find <em>unpatched flaws</em>, <em>hidden endpoints</em>, or <em>inadequately protected files or directories</em> to obtain unauthorized access or gain insight into the inner workings of the system. The main issue with this type of vulnerability is that it could occur at any point in the API stack.</p><p>This type of vulnerability could occur due to the following main weaknesses:</p><ul><li>The latest <em>security patches</em> are missing.</li><li>Unused features are enabled.</li><li>The <em>Transport Layer Security</em> is missing.</li><li><em>Security Headers</em> are not sent to clients.</li><li>The <em>CORS policy</em> is improperly set or does not exist.</li><li>Error messages with <em>stack traces</em> that include sensitive information.</li></ul><p>A scenario where this type of vulnerability could be exploited is when Cross-Origin Resource Sharing (CORS) is not configured in the most optimal way. For example, the GET endpoint /company/v1/users/12 does not restrict invocations to any specific domain (Access-Control-Allow-Origin: * — which is usually the default value). Therefore, keeping some hacker back-doors such as around Cross-Site Request Forgery (CSRF) open for attackers to take advantage of (shown in Figure 9).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-KAAJ9vOLX6oAogRL_nEiQ.jpeg" /><figcaption>Figure 9: Attacker exploiting ability to invoke API from a suspicious domain due to improper configuration of CORS policy</figcaption></figure><p><strong>How can this be mitigated?</strong></p><p>Modern API Gateway solutions are already well equipped to deal with this type of vulnerability. Make sure the solution being used allows for extensive customization of properties such as:</p><ul><li>CORS configuration (including setting up the Access Control Allow headers and methods).</li><li>Transport Level Security (especially HTTPS, TLS and SSL)</li><li>Application Level Security (OAuth 2.0, Basic Authentication, API Key)</li><li>Response Caching</li></ul><p>In-depth explanation of what these properties are and different ways they can be configured is out of the scope of this article and best left to be discussed separately.</p><p><em>Let me know in the comments below if you would like to see articles on the same :).</em></p><p>However, having as many configuration options as possible in an API Gateway and using them correctly will go a long way in pro-actively preventing exploitation of this vulnerability.</p><p>Taking CORS configuration as an example, it could be configured in an API Gateway such that only approved domains are allowed to access the API instead of allowing all domains (i.e. <strong>Access-Control-Allow-Origin: *</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*03e8I1EgX24UNA05fzc95Q.jpeg" /><figcaption>Figure 10: Correct configuration of CORS policy in API Gateway will restrict API invocations to trusted applications</figcaption></figure><p>As shown by Figure 10, an attacker trying to invoke the API from the domain pentesting.com will be denied access to the resource by the API Gateway after it validates the configured list of allowed origins and the origin of any given invocation.</p><p>In this article you went through an in-depth analysis of the 5th, 6th and 7th threat on the OWASP Top 10 Threats list and how they can easily be mitigated using an API Gateway.</p><p>Stay tuned for 4th and final part of the <em>Mitigating OWASP Top 10 Threats with an API Gateway article series </em>by following <a href="https://medium.com/@sanjulamadurapperuma">me</a> and the <a href="https://medium.com/api-integration-essentials">API Integration Essentials publication</a> here on Medium where you can learn about the rest of the threats on the list and see how an API Gateway can help you eliminate them for good!</p><p><strong><em>Update</em></strong>: You can now read Part 4 over <a href="https://bit.ly/owasp-4">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51b65c4ff27f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-3-51b65c4ff27f">Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 3</a> was originally published in <a href="https://medium.com/api-integration-essentials">API Integration Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 4]]></title>
            <link>https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-4-48bd60b9459f?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/48bd60b9459f</guid>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[api-management]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Thu, 10 Sep 2020 17:07:59 GMT</pubDate>
            <atom:updated>2020-09-19T13:33:41.269Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 4</h3><h4>Injection, Improper Access Management and Insufficient Logging and Monitoring</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VwANy2bkIeEUbCvxaMQ4aQ.jpeg" /><figcaption>Figure 1: Logging and Monitoring API Traffic is more important than you think</figcaption></figure><p>This article is the 4th and final part of a series aimed at bringing awareness to OWASP Top 10 Security Threats and how they can easily be mitigated using a good API Gateway.</p><p>Read <a href="https://bit.ly/owasp-part-1">Part 1</a>, <a href="https://bit.ly/owasp-part-2">Part 2</a> and <a href="https://bit.ly/owasp-3">Part 3</a> if you missed it.</p><p>This article will focus on the final 3 threats from the list: <em>Injection</em>, <em>Improper Access Management</em>, and <em>Insufficient Logging and Monitoring</em>.</p><h3>8 — Injection</h3><p>Injection attacks occur when untrusted data is passed on to an interpreter via a data submission method such as a form that the API or backend blindly executes. This can have harmful consequences on the application and its data.</p><p>Interpreters that are targeted by attackers may include:</p><ul><li>SQL</li><li>NoSQL</li><li>LDAP</li><li>OS commands</li><li>ORM (Object-Relational Mapping)</li><li>XML Parsers</li></ul><p>For example, let’s assume there was an SQL statement such as the following:</p><pre>&quot;SELECT * FROM users WHERE id=&#39;1012&#39;&quot;</pre><p>This would successfully return the details of the user with id 1012 (see Figure 2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rL4AZlMe_G7yxReSAohNQQ.jpeg" /><figcaption>Figure 2: The normal API request flow for the GET endpoint</figcaption></figure><p>An attacker could easily perform an SQL injection attack by just altering the inputs that are submitted.</p><p>By just filling the password field with the text “<em>password’ OR 1=1”</em> the SQL statement will be transformed as shown below.</p><pre>&quot;SELECT * FROM users WHERE id=&#39; or &#39;1&#39;=1&quot;</pre><p>The <em>OR 1=1</em> statement causes the <em>WHERE</em> clause to return the first id from the users table no matter what the username and password are. As the very first user id of a database is most likely the administrator, the attacker can bypass authentication and possibly gain administrator privileges, which will be devastating based on what the attacker’s intentions are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CjxsTvWOF_375CM4XpxPCw.jpeg" /><figcaption>Figure 3: Allan Trousdale exploiting an SQL injection attack on the application</figcaption></figure><p>In this case, Allan Trousdale alters the GET request query parameter id to &#39; or &#39;1&#39;=1. Since the backend directly converts the API call into the SQL statement, this altered parameter is appended to the SQL statement and executed, which will return all records in the database table users .</p><p>Further control of the database can also be taken by commenting out the rest of the SQL statement. <em>Query Parameterization</em> is the first step to prevent SQL injection attacks but is not without its drawbacks.</p><p><strong>How can this be mitigated?</strong></p><p>An API Gateway will act as the secure interface to the API and also identify for and reject API calls that contain malicious data in:</p><ul><li>HTTP headers</li><li>Query parameters</li><li>URI paths</li><li>Request payloads.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxy2rZ9aWeyKP8u6hcWYCg.jpeg" /><figcaption>Figure 4: An API Gateway will easily thwart injection attacks</figcaption></figure><p>In this case, with an API Gateway in place, Allan Trousdale will not be able to exploit an SQL injection attack and will receive an error message instead.</p><p>Many modern API Gateway solutions go a step further in providing additional protection against different types of injection related attacks, such as <strong>Regular Expression Threat Protection</strong> and <strong>Message Mediation</strong> both of which allows for maximum customization of how an API Gateway should react in the event of such an attack.</p><h3>9 — Improper Assets Management</h3><p>Older versions of APIs are extremely vulnerable since they are often not patched and leaving them unattended could mean that an attacker could easily compromise the system without having to worry about complex security mechanisms to bypass.</p><p>In addition, outdated documentation makes it even more difficult to identify and fix vulnerabilities. An inadequate retirement plan for each API version is also another major cause of this vulnerability.</p><p>An example of this type of vulnerability is when major changes have been made after a redesign of an application including some security enhancements, a new version of the API has been created at /v2/customer-info (see Figure 5) to fix issues that allowed the former version of the API to expose too much data while the old API at<em> </em>/v1/customer-info is still kept running, unattended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_wJMKGAhkaNPHbNiNNSZLw.jpeg" /><figcaption>Figure 5: Response from version 2 of the API</figcaption></figure><p>However, if an attacker finds that version 1 of the API address is still active and exploits the vulnerabilities of the old API (i.e. exposing sensitive information like credit card numbers and social security numbers), which is still connected to the same database as the new API, it could result in a major data breach or data loss.</p><p><strong>How can this be mitigated?</strong></p><p>API Gateways can easily thwart this type of vulnerability by allowing to manage the life-cycle of APIs efficiently. For example, an API Gateway can be configured to automatically deprecate the older version of an API once a new one becomes available. In this case, since version 1 of the API is replaced by version 2, version 1 will be deprecated. This will allow existing legacy applications using API version 1 to continue using that version but will not allow any new applications to subscribe and use it (shown in Figure 6).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7lvsuPj3E33v7YW-p_FLKw.jpeg" /><figcaption>Figure 6: An attempt to access the old and deprecated API being rejected by the API Gateway</figcaption></figure><p>When there is no requirement to allow access to an API, even existing legacy applications that use that API, an API Gateway will allow retiring the old API version, which will completely remove it from the API Gateway, thereby making sure that no applications will be able to access it anymore (shown in Figure 7).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f66NCkGs1CNbAV5ptubVew.jpeg" /><figcaption>Figure 7: An attempt to access a retired API being thwarted by the API Gateway</figcaption></figure><h3>10 — Insufficient Logging and Monitoring</h3><p>The best-case scenario for an attacker is if attacks on an application can go unnoticed as this would give the confidence to carry out consecutive attacks on the same application which could provide enough time for the attacker to fully compromise the system. This would be possible if an application has insufficient logging and monitoring of suspicious activities and fails to alert the necessary parties on time.</p><p>An example of the exploitation of this type of vulnerability could include an application that has been attacked using a large-scale <strong><em>credential stuffing</em></strong><em> </em>attack and millions of user credentials have leaked. Since there was little logging in the application, the administrators did not receive alerts of any suspicious activity, nor were they able to track down exactly what records have been a victim to the attack.</p><p>Another example would be a scenario where an access token with administrative privileges has been stolen and has been used to perform potentially harmful activities by an attacker (see Figure 8).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAE1mrk-13jws5G7YrB9hA.jpeg" /><figcaption>Figure 8: An attacker changing user role with the stolen access token</figcaption></figure><p>The owner of the access token, who finds out that the client has been breached suspects that access token might have been stolen and alerts the system administrator who immediately revokes the compromised token and issues the owner a new one.</p><p>However, it is now necessary to identify what activities have been carried out during the time the breach was not reported since the extent of the damage done to the system must be approximated. This would not be possible in this scenario since there has not been proper logging and monitoring mechanisms in place.</p><p><strong>How can this be mitigated?</strong></p><p>When API traffic is exposed via an API Gateway, API requests and response meta-data can be logged centrally and can be investigated to review any suspicious activity from the stolen access token which reveals the extent of damage and data altered by the attacker (shown in Figure 9).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2h2aopJyHnpZdVAaIyQnww.jpeg" /><figcaption>Figure 9: An API Gateway is able to centrally log any activity from API Traffic</figcaption></figure><p>Real-time monitoring is also possible when exposing API traffic using an API Gateway. For example, in this case, Kate lives in the UK and the API Gateway is able to identify that primarily traffic from Kate usually comes from the UK based on the IP address of the device that is being used to run the application. Thereby allowing the API Gateway to recognize any anomalies by monitoring the changes in access patterns.</p><p>Assuming an attacker residing in Russia was able to steal the access token used by Kate and invokes the API, the API Gateway will instantly identify the change in the access pattern and flags the API request coming from Russia as suspicious activity, block that request and inform an administrator to take the appropriate action (to continue blocking calls from that IP address or to allow it if the IP address is validated to be from a legitimate user).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3IVP3mI8jflzQaAd3S-03Q.jpeg" /><figcaption>Figure 10: Suspicious activity being recognized and rejected by an API Gateway</figcaption></figure><p>The best API Gateway solutions also offer <em>Bot Detection</em> functionality and <em>detailed logging and monitoring mechanisms</em>, which further enhances protection against this type of vulnerability. Thereby emphasizing the importance of the role played by API Gateway solutions to overcome many modern day vulnerabilities and pro-actively protect your applications from them.</p><h3>Conclusion</h3><p>This article covered the OWASP Top 10 Threats, showed the magnitude of impact that each of those threats can have on modern API-based applications and how these threats can easily be mitigated with existing technology, specifically taking WSO2 API Manager as an example, in order to enforce better security measures for vulnerable APIs.</p><p>If you enjoyed this article series feel free to leave some claps, explore more articles from fellow writers in <a href="https://medium.com/api-integration-essentials">API Integration Essentials publication,</a> follow <a href="https://medium.com/@sanjulamadurapperuma">me</a> here on Medium and provide any suggestions in the comments down below on what content you would like to be covered in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48bd60b9459f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-4-48bd60b9459f">Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 4</a> was originally published in <a href="https://medium.com/api-integration-essentials">API Integration Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 2]]></title>
            <link>https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-2-f69fec01868e?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/f69fec01868e</guid>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Tue, 21 Apr 2020 05:46:30 GMT</pubDate>
            <atom:updated>2020-09-19T13:31:20.567Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 2</h3><h4>Broken User Authentication, Excessive Data Exposure, Lack of Resources and Rate Limiting</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-F1Pg9M2IQE4XiTOiZsL6g.jpeg" /><figcaption>Figure 1 — API calls account for around 83% of all web traffic</figcaption></figure><p>In <a href="https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-1-59638e7fa540">Part 1</a> of this series, you learned about what OWASP is, why we need to worry about the OWASP Top 10, what an API Gateway is, and detailed analysis about the first threat defined in the OWASP Top 10 list: <strong>Broken Object Level Authorization (BOLA)</strong>.</p><p>This article will continue from there and go on to describe 3 more threats defined in the OWASP Top 10 list: <strong>Broken User Authentication</strong>, <strong>Excessive Data Exposure</strong> and <strong>Lack of Resources and Rate Limiting</strong>.</p><p>If you haven’t read Part 1 of this series yet, please do so <a href="https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-1-59638e7fa540">here</a>.</p><h3>2 — Broken User Authentication</h3><p>Authentication is a critical part of any application, but even seemingly solid authentication mechanisms suffer problems at the basic credential management functions including password change, account profile update, and other related functions.</p><p>Authentication vulnerabilities may exist if an application lacks proper protection mechanisms (i.e. API endpoints that handle authentication must be protected with extra layers of security than regular API Endpoints) and if there is an incorrect implementation of the authentication mechanism (i.e. the authentication mechanism is used without considering any of the possible attack vectors or the implementation has been made for the wrong use case).</p><p>The danger of such vulnerabilities is that the attackers are able to gain access to users’ accounts, their data, perform potentially harmful actions such as placing orders or withdrawing money or using account privileges to gain access to confidential information in a system.</p><p>One example of an application with broken or weak authentication mechanisms would be when the client username and password are being passed on as parameters in the URL. This would mean that the user credentials are stored in the browser’s history even after the user has signed out. Should an attacker come across this client’s browser history, he would be able to gain access to the application via the exposed credentials. This scenario is explained diagrammatically below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0w2O0rztXB20S2G4LpaoA.jpeg" /><figcaption>Figure 2 — An attacker exploiting a client by replaying a request from the browser’s history</figcaption></figure><p>Another example would be if an application allows attackers to perform <em>credential stuffing</em> attacks without being detected. Credential stuffing attacks involve injecting large amounts of breached username/password pairs until they are matched to an existing account in the system, which the attackers can then use to perform potentially destructive activities within the system. Credential stuffing attacks have risen dramatically over the last year after a collection of credentials (known as <strong>Collections #1–5</strong>) from prior breaches was released in plain-text format for free. To bring the scale of the breach to context, the first release contained around <strong>773 million unique emails</strong> and <strong>21 million passwords</strong> while the other four collections had around<strong> 2.2 billion emails</strong>. Thereby highlighting the importance of preventing credential stuffing attacks.</p><p>Another important authentication vulnerability is not having proper session timeout mechanisms. It will increase the risk of attackers being able to break into an application that exposes an active session of a user. This can be performed using<em> session sniffing</em>, <em>client-side attacks</em> such as <em>XSS</em>, <em>JavaScript codes</em>, and <em>Trojans</em>, <em>man-in-the-middle</em> and <em>man-in-the-browser</em> attacks.</p><p><strong>How can this be mitigated?</strong></p><p>To be safe against exploitation of Broken User Authentication vulnerabilities it is recommended to bring in a <em>middleman</em> such as a Gateway between the client and the back-end. This would effectively thwart off any targeted attacks by adding a second layer of security in between the client and the back-end.</p><p>Take for example the scenario of a simple <em>e-commerce application</em>, where the client and back-end interact directly with each other, which uses the <em>username</em> and <em>password</em> of a user to authenticate a request to the <em>/order</em> endpoint as shown below (<strong><em>Figure 3</em></strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ioaRIjxE77e3chPtmjphDQ.jpeg" /><figcaption>Figure 3 — Client interacting with back-end directly</figcaption></figure><p>This would mean that the username and password required for the <em>basic authentication</em> for the back-end are stored on the client. Given that there are many clients for a particular back-end, having credentials saved on those clients pose a severe security vulnerability.</p><p>What makes this even more evident is that if one of those clients are hacked or hijacked, as shown below (<strong><em>Figure 4</em></strong>), the credentials saved on it are also exposed, which in turn could mean that the back-end will be easily penetrable until the attack on the client is identified and necessary measures are taken to revoke the credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pnPbJdIOoXFGyw5thK1ZtQ.png" /><figcaption>Figure 4 — Attacker using credentials from a hacked client to exploit application</figcaption></figure><p>A good solution to this problem will be bringing a Gateway between the clients and the back-end. Let’s take a look at how this would work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GNSB_k_4JUuYeg84CF8gLQ.jpeg" /><figcaption>Figure 5 — Using a Gateway to add another layer of security</figcaption></figure><p>As shown in the diagram above, the client will first send a POST request to the <em>/order</em> endpoint with an <em>OAuth2 token</em> provided by the Gateway. If the provided OAuth2 token is valid, then the <em>username</em> and <em>password</em> credentials stored within the Gateway will be retrieved and the intended request will be passed on to the back-end with a <em>basic authentication </em>header. The back-end will then process the request and return an API response which the Gateway will pass on to the client. This way it is always ensured that the back-end credentials are never exposed to clients as they are only stored on the Gateway.</p><h3>3 — Excessive Data Exposure</h3><p>Excessive data exposure is more prevalent with modern API-based applications since APIs return vast amounts of data back to the client for filtration. This allows attackers to sniff API traffic and analyze the responses for any sensitive information.</p><p>Many APIs rely on the clients to perform data filtering as developers tend to implement them in a very generic manner while disregarding the sensitivity of the data being transmitted. As a result of excessive data exposure, irrelevant but sensitive data may also be uncovered. This type of vulnerability is difficult to mitigate via automated tools as it is hard to distinguish between sensitive data and data that is actually needed given the nature of the API.</p><p>A scenario of exploitation of this vulnerability would be when an attacker identifies the API endpoint that is used as a data source for a comments section of an application:</p><pre>/{object-id}/comments</pre><p>This also returns sensitive data about the authors of the comments, such as their passwords and addresses. Such a situation can occur if the endpoint implementation returns the User objects containing the comments to be filtered on the client-side instead of just returning the comments as demonstrated diagrammatically below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lVas9NWZk7hu95gfsQ6IA.jpeg" /><figcaption>Figure 6 — Attacker exploiting the excessive data exposure vulnerability</figcaption></figure><p><strong>How can this be mitigated?</strong></p><p>An effective way to mitigate this threat is to enforce message mediation policies at the API Gateway level to filter any data that is being returned from an API call, which will ensure that unnecessary, sensitive data will not be exposed to the client.</p><p>These mediation policies will contain rules or references to code that should be executed while having access to all parts of a message being passed through the Gateway.</p><p>Fully-fledged API Management solutions would allow users to configure policies for incoming, outgoing and fault messages being passed through the Gateway.</p><p>Let’s take an example of an outgoing message mediation policy (also known as a sequence) and see how it would work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csQMw1XrKgmMZNDNEMl-yg.jpeg" /><figcaption>Figure 7 — Using mediation policies to overcome excessive data exposure</figcaption></figure><p>First, the client intends to send a GET request to the <em>/comments</em> endpoint. This is processed by the Gateway and the back-end.</p><p>However, the back-end returns a response containing sensitive information about the author of a comment (<em>email, password, </em>and<em> address</em>) in addition to information about the comment itself. It poses a high-security risk if returned to the client as sensitive information could be leaked if the client happens to be compromised.</p><p>This can be eliminated by configuring a mediation policy at the Gateway level, which filters the response returned from the back-end according to predefined rules and returns the filtered data to the client. In this case, all the sensitive data about the author of a comment is removed before sending the response to the client. Thereby making sure that sensitive or excess data never leave the Gateway.</p><p>Another way to get rid of this vulnerability is to allow the Gateway to do certain processes where it is not feasible to change the back-end implementation.</p><p>For example, let’s assume that there is an application that must know whether the user is <strong>over 18 years of age</strong>. The current implementation (shown below in <strong>Figure 8</strong>) is such that the client sends a GET request to /age endpoint for a particular user, and then runs a client-side process to check if the user is over 18 or not based on the age returned from the back-end. This method is inefficient and would also mean that unnecessary data is being leaked from the back-end since what the application actually needs is a <em>boolean value</em> to know whether the user is over 18 or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OqIWndbe2NNNjo6qJUjOA.jpeg" /><figcaption>Figure 8 — Exposing unnecessary data is both inefficient and dangerous</figcaption></figure><p>This can be mitigated by placing a Gateway in between the client and back-end (shown below in <strong>Figure 9</strong>), in cases where it is not feasible to change the back-end implementation, so that the client sends the request for the boolean value while the Gateway sends the request to the age endpoint, does the required processing to calculate the boolean value and return that boolean value to the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YZdFrK_JpbrsibxDqscEGA.jpeg" /><figcaption>Figure 9 — Using a Gateway to run certain processes instead of clients</figcaption></figure><p>Offloading of such a process to the Gateway instead of the client would mean that there would be minimal exposure of any unnecessary data.</p><h4>4 — Lack of Resources and Rate Limiting</h4><p>API requests consume finite resources such as <em>network</em>, <em>memory</em>, <em>CPU</em>, and <em>storage</em>. Thereby, if there are little or no limits imposed on the usage of such resources, those APIs are vulnerable to attacks such as denial-of-service attacks which in turn lead to endpoint outages.</p><p>A simple scenario would be when an attacker exploits vulnerable queries that retrieve data from the server. Let’s say an application has a UI with a limit of 200 users per page uses the query:</p><pre>/api/users?page=1&amp;size=100</pre><p>If the attacker changes the <strong>size</strong> parameter to <em>200 000</em>, it will cause performance issues on the database and the API will become totally unresponsive resulting in a crash of the application, especially if the hosting servers cannot handle such a large request at once.</p><p><strong>How can this be mitigated?</strong></p><p>It is recommended that r<em>ate-limiting (or throttling)</em> is properly enforced on a Gateway to prevent the misuse of precious resources required for API services to run smoothly. Throttling allows API Developers to limit the number of successful hits to a particular API during a <em>given time period</em>.</p><p>Let’s take a look at how enforcing throttling policies on a Gateway works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhBHO5Tp_MXuNDwuZ6ArJg.jpeg" /><figcaption>Figure 10 — Throttling policy at work</figcaption></figure><p>As shown above, there are four clients, each looking to execute <strong>50 requests per minute</strong>. However, a throttling policy has been enforced in the Gateway which limits the number of incoming requests to <strong>150 requests per minute</strong>. Given that <em>Client 1, 2 and 3 </em>execute their requests simultaneously, <em>Client 4 </em>will experience failing requests within the same minute due to the limit enforced by the throttling policy. This protective measure, in turn, ensures that valuable back-end resources such as <em>CPU</em> and <em>memory</em> <em>usage</em> are not misused.</p><p>In this article, you went through an analysis of the second, third and fourth threats on the OWASP Top 10 list and how you can easily mitigate them with some precautionary action and help from an API Gateway.</p><p>If you want to know more about the first 5 OWASP Threats, then watch this video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLInFNbhrTwQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLInFNbhrTwQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLInFNbhrTwQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/20fbe03cb88268660abc7481d06c6d6d/href">https://medium.com/media/20fbe03cb88268660abc7481d06c6d6d/href</a></iframe><p>Stay tuned for <strong>Part 3 </strong>of <em>Mitigating OWASP Top 10 API Security Threats with an API Gateway</em> where you would learn about some more threats on the list and how to mitigate them using an API Gateway!</p><p><strong><em>Update</em></strong>: You can now read Part 3 over <a href="https://bit.ly/owasp-3">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f69fec01868e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-2-f69fec01868e">Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 2</a> was originally published in <a href="https://medium.com/api-integration-essentials">API Integration Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performing Security Audits on API Definitions]]></title>
            <link>https://medium.com/api-integration-essentials/performing-security-audits-on-api-definitions-ac1ef295185c?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac1ef295185c</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[42crunch]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Wed, 08 Apr 2020 06:38:43 GMT</pubDate>
            <atom:updated>2020-04-08T06:38:43.784Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to be pro-active with API Security</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aNCH6c7blDAA6wBot01rLw.jpeg" /><figcaption>Figure 1 — Put your API Definitions under the magnifying glass ;)</figcaption></figure><p>The use of APIs is continuously rising, especially due to the move towards a microservices architecture. This is made evident by the fact that, according to a recent <a href="https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/state-of-the-internet-security-retail-attacks-and-api-traffic-report-2019.pdf">report</a> published by <em>Akamai</em>, 83% of all web traffic is now API traffic compared to the mere 17% taken up by HTML traffic. This shift in the traffic types means that many security tools in use today are not capable of dealing with the security threats and loopholes API traffic bring about with them. This is further emphasized by the <em>Gartner</em> research report which stated that APIs will be the <strong><em>“most frequently attacked vector for enterprise web application data breaches”</em></strong> by 2022.</p><blockquote>A recent example would be <strong>Hostinger</strong>, the web hosting platform, which experienced a major breach into its internal system API by an unauthorized third party in late 2019. The server had contained an authorization token that was used by a public API to gain further access via escalated privileges to the internal RESTful API Server, which was used to query the details about Hostinger’s clients and their accounts.</blockquote><blockquote>The database accessed by the unauthorized third party included client usernames, emails, hashed passwords, first names and IP addresses of approximately 14 million Hostinger users.</blockquote><blockquote>The news of this breach spread overnight and resulted in a lot of negative publicity to Hostinger, especially with customers accusing Hostinger of misleading them about the scope of the breach and not being clear on the security of their financial data.</blockquote><p>A lot of the data breaches like the above that occur could easily be mitigated using rigid API Definitions.</p><h3>How can we make rigid API Definitions?</h3><p>The first step that can be taken towards maintaining solid API Definitions is to make sure the API Definitions conform to the OpenAPI Specification (OAS), previously known as the Swagger Specification.</p><p>OAS defines a standard, language-insensitive interface for RESTful APIs that are both human and machine-readable. It is a common standard with a large set of community-developed tools to support developers using OpenAPI. Since the OpenAPI Specification contains a set of rules and best practices, ensuring an API Definition follows OAS will help eliminate well-known issues and loop-holes of APIs.</p><p><em>However, having API Definitions that conforms to OAS is not sufficient to make sure APIs are secure. This is where taking the extra step of auditing the API Definition for any security loop-holes help.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*eOUriu-dn2Cw7tBJQJLHOg.jpeg" /><figcaption>Figure 2 — WSO2 API Manager partnership with 42Crunch</figcaption></figure><p>This is why <strong>WSO2 API Manager</strong> has partnered with <strong>42Crunch</strong>, an enterprise API security platform, to bring in the ability to conduct a <strong>security audit </strong>on the API Definition and to obtain a <strong>detailed audit report</strong> in order to guide users to identify and eliminate any existing security loopholes in an API. This feature is available in <strong>API Manager v3.1.0</strong> onward.</p><p>The following is an example of the report that will be generated for an API inside WSO2 API Manager after a security audit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fvghPhd_Y_gLZJle.png" /><figcaption>Figure 3— API Security Audit Report in WSO2 API Manager</figcaption></figure><p>This report is divided into 4 sections:</p><ol><li><strong>Audit Score and Summary</strong></li><li><strong>OpenAPI Format Requirements</strong></li><li><strong>Security</strong></li><li><strong>Data Validation</strong></li></ol><h4>Audit Score and Summary</h4><p>This section provides an overall score out of 100 for the API Definition that was audited. The recommended score for an API is above 70 out of 100. If it is lower than that then there are some serious issues in the API Definition that has to be fixed as soon as possible!</p><p>The summary also provides the total number of errors, the overall severity of the vulnerabilities present in the API Definition and the scores given to the Security and Data Validation sections.</p><blockquote><strong>Note:</strong> The issues present in the OpenAPI Format Requirements section is not taken into account when calculating the score for the Security Audit Report. The Security section has a maximum score of 30 and the Data Validation section has a maximum score of 70, making up a maximum score of 100.</blockquote><h4>OpenAPI Format Requirements</h4><p>This section presents any issues that arise when the API Definition does not adhere to the OpenAPI Specification. The issues found here are divided into three categories:</p><ol><li><strong>Structural Errors</strong></li></ol><p>Errors under this category occur when the API’s structure does not comply with the OpenAPI Format. Since these errors are critical, the API Security Audit will not take place until these errors are resolved.</p><p>2. <strong>Semantic Errors</strong></p><p>OpenAPI contracts that are structurally correct may have issues with the semantics of the fields in them. For example, more than one parameter could have the same name + in combination and invalid email and URL formats.</p><p>3. <strong>Best Practices Issues</strong></p><p>The OpenAPI Specification includes some requirements that are not mandatory but are highly recommended to maintain the level of standard and ethics with regards to the API Definition. If these types of requirements are not met, they will be shown under this category.</p><h4>Security</h4><p>This section focuses on finding security issues laden in the API Definition.</p><p>If the API Definition already has security loopholes it makes no sense to apply other security measures on top of that since it will be only a matter of time before the API is breached. Thereby, the first step to take against this from happening is to make sure that an API conforms to the security best practices.</p><p>There are 3 areas where problems in Security are checked by the audit, namely: <em>Authentication</em>, <em>Authorization</em>, and <em>Transport</em>.</p><h4>Data Validation</h4><p>The Data Validation section checks whether there is inadequate validation of input and output in the API Definition. The most common errors in API Definitions occur here so it is as important as the other 2 sections when it comes to securing an API Definition.</p><p>If what the API accepts as input is not defined, then it allows for attacks like SQL injections and buffer overflow, both of which can cause catastrophe within an organization.</p><p>On the other hand, if what the API can include in the responses it sends out is not defined, then the API could leak information (possibly sensitive) that could either be used to carry out more severe targeted attacks or they could be exposed on the dark web for other hackers to exploit.</p><p>There are 4 areas where problems in Data Validation are checked by the audit, namely: <em>Parameters</em>, <em>Response Headers</em>, <em>Response Definition</em>, and <em>Schema</em>.</p><p>In addition to displaying a list of all the issues found, you are also able to view the exact place in the API Definition where each issue can be fixed and also visit the Encyclopedia offered by <em>APISecurity.io</em> (by 42Crunch) for a theoretical breakdown of the issue and how it can be fixed, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jKHfEKA_hG2k0vfr79CMxQ.png" /><figcaption>Figure 4— Viewing details about an issue found</figcaption></figure><h3>What are the benefits of this Security Audit Report?</h3><p>The Security Audit Report that is generated allows API Developers to check for issues in various aspects of an API Definition, including but not limited to API Security and Best Practices, at the design stage of an API.</p><p>If any issues persist, detailed information is provided to resolve such issues and what consequences they would pose if not fixed and the API Developers are able to use the built-in Swagger Editor in WSO2 API Manager to edit the API Definition. Upon saving the edited API Definition, developers are provided the option to run the Security Audit again on the API in order to see any improvements in the score.</p><p>Moreover, the fact that the report showcases the impact that each of the issues has on the overall score of the report and the severity level of each issue allows developers to easily prioritize what issues need to be addressed first. If this feature is used to its full potential, then it will make sure that pro-active measures are taken to ensure that APIs are secure even before being deployed to a run-time environment. Thereby helping to mitigate a significant amount of potential vulnerabilities in an API at its design stage.</p><p>In this article, you learned why we need to think more about securing APIs by taking an example and looking at the consequences of not doing so and why making rigid API Definitions is an important way you can secure APIs before they are even deployed in a run-time environment.</p><p>You were then introduced to the integration between WSO2 API Manager and 42Crunch to bring in the ability to perform a Security Audit on an API Definition and the features of the report it generates.</p><p>Finally, you learned how this Security Audit Report could benefit in maintaining rigid API Definitions, thereby tightening the security of APIs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac1ef295185c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-integration-essentials/performing-security-audits-on-api-definitions-ac1ef295185c">Performing Security Audits on API Definitions</a> was originally published in <a href="https://medium.com/api-integration-essentials">API Integration Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with AWS EC2]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/sanjulas-dev-notes/getting-started-with-aws-ec2-860559ef456f?source=rss-24ab1eb53a65------2"><img src="https://cdn-images-1.medium.com/max/1200/1*tFl-8wQUENETYLjX5mYWuA.png" width="1200"></a></p><p class="medium-feed-snippet">Amazon Elastic Compute Cloud (EC2) enables highly scalable computing in AWS cloud and is a cost-effective way to develop and deploy&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/sanjulas-dev-notes/getting-started-with-aws-ec2-860559ef456f?source=rss-24ab1eb53a65------2">Continue reading on Sanjula’s Dev Notes »</a></p></div>]]></description>
            <link>https://medium.com/sanjulas-dev-notes/getting-started-with-aws-ec2-860559ef456f?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/860559ef456f</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Mon, 06 Apr 2020 14:17:16 GMT</pubDate>
            <atom:updated>2020-04-06T14:17:16.347Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 1]]></title>
            <link>https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-1-59638e7fa540?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/59638e7fa540</guid>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[owasp]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Fri, 14 Feb 2020 04:50:52 GMT</pubDate>
            <atom:updated>2020-06-04T06:19:44.584Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*BPQecjgt_MHux0O8" /><figcaption>Fig. 1 — Protecting your APIs are more important than you might think</figcaption></figure><h3>What is OWASP?</h3><p>The Open Web Application Security Project (OWASP) is an international non-profit organization focused on Web Application Security. The OWASP Top 10 is a regularly updated report that details the most important security concerns for web applications, which is put together by security experts from around the world. The Top 10 is widely referred to as an ‘awareness document’ and encourages organizations to take into account and apply fixes for them to avoid the consequences should those risks be exploited.</p><h3>Why do we need to worry about the OWASP Top 10 now?</h3><p>The rudimentary technology and architecture of applications have changed dramatically over the past few years and microservices are replacing the traditional, inflexible applications, bringing with them security concerns that are becoming more and more challenging to overcome.</p><p>Furthermore, sensitive information that never saw the light of the day are now just sitting behind an API, waiting to be consumed. The continued rise in popularity of JavaScript frameworks such as Angular and React means that there are a lot of applications out there performing a lot of client-side processing and rendering, which continues to weaken the security of important information.</p><p>As a result of the arguments stated above, one may think “How can we prevent security vulnerabilities of APIs being executed?”. This is where implementing an API Gateway in a web application can help to limit, or even eradicate the threats put out by the OWASP Top 10 2019 report.</p><h3>What is an API Gateway?</h3><p>Simply put, an API Gateway is a program that conceals an API and acts as the entry point for its microservices as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*IV7TdP_r0qewfTAt" /><figcaption>Fig. 2 — High-level architecture of how an API Gateway works</figcaption></figure><p>API Gateways provide the benefit of being able to monitor the inbound and outbound traffic, use advanced data caching mechanisms to improve response times and define common security protocols and policies to improve security.</p><p>There are many API Gateway vendors out there, including <em>WSO2, Mulesoft</em>, <em>Apigee</em>, <em>IBM</em>, <em>AWS</em> and <em>Kong</em>, all providing impressive API Management software.</p><h3>1 — Broken Object Level Authorization (BOLA)</h3><p>In this type of vulnerability, an attacker is able to exploit endpoints by manipulating the ID of the object that is being sent in the request. This, in turn, can allow unauthorized access to sensitive data. This issue is prevalent in many API-based applications where the server component does not keep track of the client’s state but relies on parameters like Object IDs sent by clients to do so.</p><p>Examples of this would be REST APIs such as:</p><ol><li><strong>GET /profile/{user-id} </strong>— where the <em>user-id</em> is the object identifier.</li><li><strong>PUT /cars/{id}</strong> — where <em>id</em> is the object identifier.</li></ol><p>Taking the <em>GET</em> API for example, if a request for <em>/profile/8734</em> gets intercepted by an attacker and the attacker identifies that the next profile could be retrieved using the next incremental object id by sending a request to <em>/profile/8735</em>, then an attack could be carried out to retrieve records of all profiles from the API.</p><h4><strong>How can this be mitigated?</strong></h4><p>To be safe against BOLA attacks, it is recommended to use <em>non-guessable random IDs</em> for your objects. If your API is already implemented and vulnerable to a BOLA, then an API Gateway can be useful to protect your APIs from BOLA in the following ways.</p><p><strong>1.</strong> Instead of exposing the {user-id} to the client, an alternate, more opaque endpoint could be exposed, such as <em>/me</em>. Once a request for <em>/me</em> is received, the API Gateway would identify the corresponding <em>{user-id}</em> by introspecting an <strong>access token</strong> sent by the user and then append that <em>{user-id}</em> to the request that is sent to the actual API.</p><p><strong>a)</strong> The client sends a request to the <em>/me</em> endpoint with a token.</p><p><strong>b)</strong> The gateway introspects the token and identifies the corresponding <em>{user-id}</em>.</p><p><strong>c)</strong> The Gateway appends the {user-id} to the actual API request and sends it to <em>/profile/{user-id}</em>.</p><p><strong>2.</strong> Another way is to maintain a <strong>mapping</strong> of <em>random IDs</em> to <em>actual</em> <em>IDs</em> at the API Gateway level. This way, the <em>actual IDs</em> will not be exposed to the clients as they would only see the <em>random IDs</em>.</p><p>For example, when sending a <em>PUT</em> request to the <em>/cars/42</em>, the ID <strong>‘42’</strong> will only be the <em>random ID</em> that will be seen by the user. In the mapping of the random and actual IDs, the <em>random ID</em> <strong>‘42’</strong> will correspond to the <em>actual ID</em> of <strong>‘21etq’</strong>, which will be appended to the actual API request in the backend of an application.</p><p>In this article you learned why we need to worry about the OWASP Top 10 list, what is an API Gateway, an analysis on the first threat on the OWASP Top 10 list and how you can easily mitigate it with the help of an API Gateway.</p><p>Stay tuned for <strong>Part 2 </strong>of <em>Mitigating OWASP Top 10 API Security Threats with an API Gateway</em> where you would learn about a few more threats and how to mitigate them using an API Gateway!</p><p><strong><em>Update</em></strong>: You can now read <strong>Part 2</strong> over <a href="https://bit.ly/owasp-part-2">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59638e7fa540" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-integration-essentials/mitigating-owasp-top-10-api-security-threats-with-an-api-gateway-part-1-59638e7fa540">Mitigating OWASP Top 10 API Security Threats with an API Gateway — Part 1</a> was originally published in <a href="https://medium.com/api-integration-essentials">API Integration Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everything you need to know about Insertion Sort algorithm]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/sanjulas-dev-notes/everything-you-need-to-know-about-insertion-sort-algorithm-6dfb2c7a86e?source=rss-24ab1eb53a65------2"><img src="https://cdn-images-1.medium.com/max/1000/0*MwBLgTLt9BhWot7w" width="1000"></a></p><p class="medium-feed-snippet">What is Insertion sort?</p><p class="medium-feed-link"><a href="https://medium.com/sanjulas-dev-notes/everything-you-need-to-know-about-insertion-sort-algorithm-6dfb2c7a86e?source=rss-24ab1eb53a65------2">Continue reading on Sanjula’s Dev Notes »</a></p></div>]]></description>
            <link>https://medium.com/sanjulas-dev-notes/everything-you-need-to-know-about-insertion-sort-algorithm-6dfb2c7a86e?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dfb2c7a86e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[blogger]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Sun, 07 Jul 2019 13:36:54 GMT</pubDate>
            <atom:updated>2019-07-07T15:29:47.632Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to install sbt on Linux]]></title>
            <link>https://medium.com/sanjulas-dev-notes/how-to-install-sbt-on-linux-71664df2d480?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/71664df2d480</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Thu, 30 May 2019 14:30:35 GMT</pubDate>
            <atom:updated>2019-05-30T16:07:16.033Z</atom:updated>
            <content:encoded><![CDATA[<h4>A short and sweet guide</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yN0WFkgL2gRsMSrf.png" /><figcaption>Figure-1: sbt logo</figcaption></figure><h3>Introduction</h3><p>Hi! I am <a href="https://www.linkedin.com/in/sanjula-madurapperuma/">Sanjula</a>, and in this guide I hope to teach you how to install sbt on Linux.</p><p>Let’s get started!</p><h3>What is sbt?</h3><p>sbt is an open-source, cross-platform build tool for Scala and Java projects.</p><p>Some of its main features are:</p><ul><li>Support for continuous compilation, testing and deployment.</li><li>Native support for compiling Scala code.</li><li>Dependency management using Ivy.</li><li>Ability to build descriptions written in Scala using a DSL (Domain-Specific Language).</li></ul><h3>Steps to install sbt</h3><ul><li>First you have to make sure that a JDK is installed. sbt recommends the Oracle JDK 8 or OpenJDK 8.</li><li>Open up a terminal and type in the following command, which will point to the debian distribution of sbt and add sbt to the sources list.</li></ul><pre>echo &quot;deb https://dl.bintray.com/sbt/debian /&quot; | sudo tee -a /etc/apt/sources.list.d/sbt.list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*KgNADEh4KyRZf98H4d0T4g.png" /><figcaption>Figure-2: Adding sbt URL to sources list</figcaption></figure><ul><li>Next, enter the command below, which adds the key of scala to the key list used by apt to authenticate packages.</li></ul><pre>sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*JNJINkN6aWH64wi7aIyBsw.png" /><figcaption>Figure-3: Adding sbt to key list used by apt</figcaption></figure><ul><li>Now download the package lists from the repositories to ensure that the list of information on the newest version of packages and their dependencies are updated locally.</li></ul><pre>sudo apt-get update</pre><ul><li>Finally run the following command to install sbt.</li></ul><pre>sudo apt-get install sbt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*R8eFHroAfiqfwjLTbwB4kQ.png" /><figcaption>Figure-4: I already have sbt installed :)</figcaption></figure><p><strong>Congratulations!!!</strong> You have now installed the sbt build tool on your Linux PC! Now you can easily work with Scala and Java projects.</p><p><strong>In the meantime, you can give as many claps as you like to this article if you liked it, or comment down below for any concerns. Also please checkout my profile at </strong><a href="https://www.linkedin.com/in/sanjula-madurapperuma/"><strong>LinkedIn</strong></a><strong> and follow me on </strong><a href="https://medium.com/@sanjulamadurapperuma"><strong>Medium</strong></a><strong> for more awesome articles!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71664df2d480" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sanjulas-dev-notes/how-to-install-sbt-on-linux-71664df2d480">How to install sbt on Linux</a> was originally published in <a href="https://medium.com/sanjulas-dev-notes">Sanjula’s Dev Notes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Essential Git Handbook]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/free-code-camp/the-essential-git-handbook-a1cf77ed11b5?source=rss-24ab1eb53a65------2"><img src="https://cdn-images-1.medium.com/max/2600/1*AhGSZ1spetb37qk_bZd9XA.png" width="6016"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/free-code-camp/the-essential-git-handbook-a1cf77ed11b5?source=rss-24ab1eb53a65------2">Continue reading on We’ve moved to freeCodeCamp.org/news »</a></p></div>]]></description>
            <link>https://medium.com/free-code-camp/the-essential-git-handbook-a1cf77ed11b5?source=rss-24ab1eb53a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1cf77ed11b5</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Sanjula Madurapperuma]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 17:16:29 GMT</pubDate>
            <atom:updated>2019-05-01T01:52:20.779Z</atom:updated>
        </item>
    </channel>
</rss>