<?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 Rashmini Naranpanawa on Medium]]></title>
        <description><![CDATA[Stories by Rashmini Naranpanawa on Medium]]></description>
        <link>https://medium.com/@rashmini?source=rss-f1be9f1c3a63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cVg7w3sKlJoZCj7FpgNdiw.jpeg</url>
            <title>Stories by Rashmini Naranpanawa on Medium</title>
            <link>https://medium.com/@rashmini?source=rss-f1be9f1c3a63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 21:04:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rashmini/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[Password Recovery via User Preferred Notification Channel in WSO2 Identity Server]]></title>
            <link>https://rashmini.medium.com/password-recovery-via-user-preferred-notification-channel-in-wso2-identity-server-0b9b92016dcf?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b9b92016dcf</guid>
            <category><![CDATA[user-management]]></category>
            <category><![CDATA[account-recovery]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[wso2is]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Mon, 13 May 2024 03:06:20 GMT</pubDate>
            <atom:updated>2024-05-13T03:06:20.194Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HHMmTgvV4lqt2HGg.png" /><figcaption>Figure 1 (<a href="https://www.wired.com/story/best-password-managers/">https://www.wired.com/story/best-password-managers/</a>)</figcaption></figure><p>This blog explains how to recover the password of a user account using a user preferred notification channel using WSO2 Identity Server 7.0.0. Here, we have the capability to recover the account using the reset link received to the users’ email address as well as to recover the account using a One Time Password (OTP) received to the user’s registered mobile number. This guide explores how to achieve this via the API in the Identity Server.</p><h4>Password Recovery Flow</h4><p>This is how the password recovery flow works.</p><ol><li>User initiated a password recovery request by providing a set of unique claims to identify the user account.</li><li>The user needs to select a channel from the available notification channels to receive the password recovery notification.</li><li>The server sends the recovery notification to the user via the preferred notification channel.</li><li>If the preferred channel is email, a reset link will be sent to the registered email address and user can click it to reset the password. If the preferred channel is SMS, a One-Time Password (OTP) will be sent and the user can provide it to reset the password.</li></ol><h4>Configure Password Recovery</h4><p>Let’s now follow the below steps to configure password recovery via user-preferred channel.</p><ol><li>To send email notifications to the users, we need to configure the email sending module. You need to add the following properties to the deployment.toml file in the IS_HOME/repository/conf folder to configure WSO2 Identity Server to send emails. (Refer the <a href="https://is.docs.wso2.com/en/latest/deploy/configure/email-sending-module/">documentation</a> for more information.)</li></ol><pre>[output_adapter.email] <br>from_address= &quot;wso2iamtest@gmail.com&quot; <br>username= &quot;wso2iamtest&quot; <br>password= &quot;Wso2@iam70&quot;<br>hostname= &quot;smtp.gmail.com&quot; <br>port= 587 <br>enable_start_tls= true <br>enable_authentication= true</pre><p>2. To send SMS notifications to the users, we need to update the SMS Provider configurations. First, navigate to the <strong><em>Email &amp; SMS</em></strong> page in the Identity Server Console and select <em>SMS Provider</em>. Following are sample values to configure a SMS Provider.</p><pre>SMS Provider URL: https://webhook.site/18e56355-69ee-42ac-b3d0-08cbba7cc0b1<br>Content Type: JSON<br>HTTP Method: POST<br>Payload Template: { &quot;content&quot;:{{body}}, &quot;to&quot;:{{mobile}} }</pre><p><em>SMS Provider URL</em> is the REST endpoint of the service that sends SMS. In the <em>Payload Template</em> of the API request, {{body}} represents the generated SMS body and {{mobile}} represents the mobile number. For testing purposes, we can use a unique URL generated from <a href="https://webhook.site/">https://webhook.site/</a> as shown in the sample.</p><p>3. Go to Identity Server Console and navigate to <strong><em>Login &amp; Registration</em></strong> page. Select <em>Password Recovery</em> under <em>Account Recovery</em> section and enable Password Recovery.</p><h4>Notification Management</h4><p>WSO2 Identity Server allows to receive the account recovery notifications internally or externally. To enable/disable internal notification management, go to <strong><em>Server</em></strong> page in the Identity Server Console and select <em>Internal Notification Sending</em>. There, you can enable or disable the config. If it’s enabled, notification sending will be managed by the WSO2 Identity Server. If not, the client application needs to handle notification sending.</p><h4>Try out Password Recovery</h4><p>To try out the password recovery flow, first you need to create a user with and email and mobile number. You can add a user by navigating to the <strong><em>Users</em></strong> page in the console. For more information, refer to the WSO2 Identity Server documentation [1].</p><p>Once you have a user created, you can use the following steps to recover the password of the account.</p><ol><li>Use the following command to create a password recovery request.</li></ol><pre>curl --location &#39;https://localhost:9443/api/users/v2/recovery/password/init&#39; \<br>--header &#39;accept: application/json&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Basic YWRtaW46YWRtaW4=&#39; \<br>--data &#39;{<br>  &quot;claims&quot;: [<br>    {<br>      &quot;uri&quot;: &quot;http://wso2.org/claims/givenName&quot;,<br>      &quot;value&quot;: &quot;Rashmini&quot;<br>    }<br>  ],<br>  &quot;properties&quot;: [<br>    {<br>      &quot;key&quot;: &quot;key&quot;,<br>      &quot;value&quot;: &quot;value&quot;<br>    }<br>  ]<br>}&#39;</pre><p>Following response will be returned by the API.</p><pre>[<br>    {<br>        &quot;mode&quot;: &quot;recoverWithNotifications&quot;,<br>        &quot;flowConfirmationCode&quot;: &quot;eb43b5b2-1a67-4f2c-82dd-9914e94bc52e&quot;,<br>        &quot;channelInfo&quot;: {<br>            &quot;recoveryCode&quot;: &quot;d582f192-c890-4b32-ba12-cc9c1472c599&quot;,<br>            &quot;channels&quot;: [<br>                {<br>                    &quot;id&quot;: &quot;1&quot;,<br>                    &quot;type&quot;: &quot;EMAIL&quot;,<br>                    &quot;value&quot;: &quot;d*********@g***l.com&quot;,<br>                    &quot;preferred&quot;: false<br>                },<br>                {<br>                    &quot;id&quot;: &quot;2&quot;,<br>                    &quot;type&quot;: &quot;SMS&quot;,<br>                    &quot;value&quot;: &quot;********7590&quot;,<br>                    &quot;preferred&quot;: false<br>                }<br>            ]<br>        },<br>        &quot;links&quot;: [<br>            {<br>                &quot;rel&quot;: &quot;next&quot;,<br>                &quot;href&quot;: &quot;/api/users/v2/recovery/password/recover&quot;,<br>                &quot;type&quot;: &quot;POST&quot;<br>            }<br>        ]<br>    }<br>]</pre><p>2. Use the <em>recoveryCode</em> and a preferred channel <em>id</em> to get notifications via that channel.</p><pre>curl --location &#39;https://localhost:9443/api/users/v2/recovery/password/recover&#39; \<br>--header &#39;accept: application/json&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Basic YWRtaW46YWRtaW4=&#39; \<br>--data &#39;{<br>  &quot;recoveryCode&quot;: &quot;d582f192-c890-4b32-ba12-cc9c1472c599&quot;,<br>  &quot;channelId&quot;: &quot;2&quot;,<br>  &quot;properties&quot;: [<br>    {<br>      &quot;key&quot;: &quot;key&quot;,<br>      &quot;value&quot;: &quot;value&quot;<br>    }<br>  ]<br>}&#39;</pre><p>The API will return the following response upon successful recovery and the user will be notified via the selected channel.</p><pre>{<br>    &quot;code&quot;: &quot;PWR-02001&quot;,<br>    &quot;message&quot;: &quot;Password recovery information sent via user preferred notification channel.&quot;,<br>    &quot;flowConfirmationCode&quot;: &quot;eb43b5b2-1a67-4f2c-82dd-9914e94bc52e&quot;,<br>    &quot;notificationChannel&quot;: &quot;SMS&quot;,<br>    &quot;resendCode&quot;: &quot;ef44178c-62ca-4281-a6a4-075e1a473123&quot;,<br>    &quot;links&quot;: [<br>        {<br>            &quot;rel&quot;: &quot;next&quot;,<br>            &quot;href&quot;: &quot;/api/users/v2/recovery/password/confirm&quot;,<br>            &quot;type&quot;: &quot;POST&quot;<br>        },<br>        {<br>            &quot;rel&quot;: &quot;resend&quot;,<br>            &quot;href&quot;: &quot;/api/users/v2/recovery/password/resend&quot;,<br>            &quot;type&quot;: &quot;POST&quot;<br>        }<br>    ]<br>}</pre><p>3. If you want to resend the notifications to the user via the previously notified channel, use the <em>resendCode</em> with the resend notifications API.</p><pre>curl --location &#39;https://localhost:9443/api/users/v2/recovery/password/resend&#39; \<br>--header &#39;accept: application/json&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Basic YWRtaW46YWRtaW4=&#39; \<br>--data &#39;{<br>  &quot;resendCode&quot;: &quot;ef44178c-62ca-4281-a6a4-075e1a473123&quot;,<br>  &quot;properties&quot;: [<br>    {<br>      &quot;key&quot;: &quot;key&quot;,<br>      &quot;value&quot;: &quot;value&quot;<br>    }<br>  ]<br>}&#39;</pre><p>The API will send the following response upon successful notification.</p><pre>{<br>    &quot;code&quot;: &quot;UAR-02001&quot;,<br>    &quot;message&quot;: &quot;Confirmation code resent to the user.&quot;,<br>    &quot;flowConfirmationCode&quot;: &quot;e5465c93-a096-4536-bee5-6e1438cd070b&quot;,<br>    &quot;notificationChannel&quot;: &quot;SMS&quot;,<br>    &quot;resendCode&quot;: &quot;d2822033-4623-4d34-bb1e-51e12ce2b2ec&quot;,<br>    &quot;links&quot;: [<br>        {<br>            &quot;rel&quot;: &quot;next&quot;,<br>            &quot;href&quot;: &quot;/api/users/v2/recovery/password/confirm&quot;,<br>            &quot;type&quot;: &quot;POST&quot;<br>        },<br>        {<br>            &quot;rel&quot;: &quot;resend&quot;,<br>            &quot;href&quot;: &quot;/api/users/v2/recovery/password/resend&quot;,<br>            &quot;type&quot;: &quot;POST&quot;<br>        }<br>    ]<br>}</pre><p>4. Use the confirmation code received by the user to verify the confirmation code.</p><pre>curl --location &#39;https://localhost:9443/api/users/v2/recovery/password/confirm&#39; \<br>--header &#39;accept: application/json&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Basic YWRtaW46YWRtaW4=&#39; \<br>--data &#39;{<br>  &quot;confirmationCode&quot;: &quot;eb43b5b2-1a67-4f2c-82dd-9914e94bc52e&quot;,<br>  &quot;otp&quot;: &quot;abc123&quot;,<br>  &quot;properties&quot;: [<br>    {<br>      &quot;key&quot;: &quot;key&quot;,<br>      &quot;value&quot;: &quot;value&quot;<br>    }<br>  ]<br>}&#39;</pre><blockquote>The ‘otp’ parameter is required only for OTP based password recovery. The <em>flowConfirmationCode</em> returned from the password recovery request should be set as the ‘confirmationCode&#39; for this.</blockquote><p>The API will return the following response.</p><pre>{<br>    &quot;resetCode&quot;: &quot;1234-1234-1234&quot;,<br>    &quot;links&quot;: [<br>        {<br>            &quot;rel&quot;: &quot;next&quot;,<br>            &quot;href&quot;: &quot;/api/users/v2/recovery/password/reset&quot;,<br>            &quot;type&quot;: &quot;POST&quot;<br>        }<br>    ]<br>}</pre><blockquote>If you have selected to send notifications externally, the confirmation code will be sent in the API response in ‘/recover’ and ‘/resend’ requests. In that case, the client application needs to handle it.</blockquote><p>5. Use the <em>resetCode, flowConfirmationCode </em>and the new password to update the existing password and recover the account.</p><pre>curl --location &#39;https://localhost:9443/api/users/v2/recovery/password/reset&#39; \<br>--header &#39;accept: application/json&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Basic YWRtaW46YWRtaW4=&#39; \<br>--data &#39;{<br>  &quot;resetCode&quot;: &quot;1234-1234-1234&quot;,<br>  &quot;flowConfirmationCode&quot;: &quot;eb43b5b2-1a67-4f2c-82dd-9914e94bc52e&quot;,<br>  &quot;password&quot;: &quot;String123#&quot;,<br>  &quot;properties&quot;: [<br>    {<br>      &quot;key&quot;: &quot;key&quot;,<br>      &quot;value&quot;: &quot;value&quot;<br>    }<br>  ]<br>}&#39;</pre><p>The API will return the following response upon successful password reset.</p><pre>{<br>    &quot;code&quot;: &quot;PWR-02005&quot;,<br>    &quot;message&quot;: &quot;Successful password reset.&quot;<br>}</pre><p>Congratulations! 🎉 Now you are done with recovering the password of a user account using the Account Recovery API. Try out the flow and see whether you can update the password and recover the account. For more information on using APIs in Identity Server, refer to the <a href="https://is.docs.wso2.com/en/latest/">WSO2 Identity Server official documentation</a>.</p><h4>References</h4><p>[1] <a href="https://is.docs.wso2.com/en/latest/guides/users/manage-users/">https://is.docs.wso2.com/en/latest/guides/users/manage-users/</a></p><p>[2] <a href="https://is.docs.wso2.com/en/latest/apis/user-account-recovery-v2-rest-api/#tag/Password-Recovery">https://is.docs.wso2.com/en/latest/apis/user-account-recovery-v2-rest-api/#tag/Password-Recovery</a></p><p>[3] <a href="https://medium.com/identity-beyond-borders/account-recovery-configurations-in-wso2-identity-server-33fe17fa45ae">https://medium.com/identity-beyond-borders/account-recovery-configurations-in-wso2-identity-server-33fe17fa45ae</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b9b92016dcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to JSON Web Tokens (JWTs)]]></title>
            <link>https://medium.com/identity-beyond-borders/introduction-to-json-web-tokens-jwts-cefa10d43b63?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/cefa10d43b63</guid>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[identity-server]]></category>
            <category><![CDATA[json-web-token]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Tue, 20 Dec 2022 14:12:01 GMT</pubDate>
            <atom:updated>2023-01-25T03:27:58.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*eGXGIOX9ns1D7MohR5kUTQ.png" /><figcaption>Sample JSON Web Token from <a href="http://jwt.io/">jwt.io</a></figcaption></figure><p>JSON Web Token (JWT) is a compact claims representation format intended for space constrained environments such as HTTP Authorization headers and URI query parameters. It represents a set of claims as a JSON object. This JSON object is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.</p><h4>JWT Structure</h4><p>A JWT is represented as a sequence of three parts separated by dots, where each part contains a base64url-encoded value. The three parts are,</p><ul><li>Header</li><li>Payload</li><li>Signature</li></ul><p>Following is a sample JWT and let’s explore how each part is generated.</p><blockquote>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c</blockquote><p><strong>Header</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*3PtIK0UGn8fldn2OjmQKhA.png" /></figure><p>The header of JWT usually contains two parts. “typ” represents the type of the token which is JWT, and “alg” represents the algorithm used in the signing process such as HMAC, SHA256 or RSA. The base64Url encoded value of the above payload is set as the first part of the JWT.</p><p><strong>Payload</strong></p><p>Following is the decoded value of the second part of the sample JWT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*qYu4-8WBsvMrY7Rvm6kkaA.png" /></figure><p>This payload contains the claims. A claim is a piece of information about an entity such as the user. These claims can be of three types: registered, public and private claims.</p><p><em>Registered claims</em>: These are predefined claims which are not mandatory, but recommended to use which provides useful information. Following are some of the registered claims.</p><ul><li>“iss”: This represents the principal that issued the JWT. This is an optional claim which is a case-sensitive string containing a StringOrURI<br> value.</li><li>“sub”: This is the principal that is the subject of the JWT. This is an optional claim which is a case-sensitive string containing a StringOrURI<br> value.</li><li>“aud”: This represents the recipients that the JWT is intended for. Each principal processing the JWT must identify itself with a value in the “aud” claim. This can be a array of case-sensitive StringOrURI values or a string containing a case-sensitive StringOrURI value. This is generally application specific.</li><li>“exp”: This identifies the expiration time of the JWT.</li><li>“nbf”: This identifies the time before which the JWT MUST NOT be accepted for processing.</li><li>“iat”: This identifies the time at which the JWT was issued.</li><li>“jti”: This claim provides a unique identifier for the JWT.</li></ul><p><em>Public claims</em>: These are the claims that are defined at will by who use JWTs. To avoid collisions, it should be defined in the IANA JSON Web Token Registry or should be defined as a URI which contains a collision resistant namespace.</p><p><em>Private claims</em>: These are custom claims, which are not registered claims or public claims. These claim names should be used with caution since it’s subjected to collisions.</p><p><strong>Signature</strong></p><p>Following is the decoded value of the third part of the sample JWT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*FC6-wTF-Z47U_Pm_ipeE8w.png" /></figure><p>The signature is used to verify that the message is not changed along the way. If it’s signed with a private key, the sender also can be verified. This is calculated using the base64Url encoded header, payload, a secret and the algorithm specified in the header.</p><h4>When to use JWTs?</h4><p>JWTs are used mostly in following two scenarios.</p><ul><li>Authorization: This allows a logged in user to access resources, services and routes which are allowed with the JWT. Therefore, each subsequent request should be sent along with the JWT. Nowadays, JWTs are widely used for Single-Sign-On feature due to its small overhead and ability to be used across different domains easily.</li><li>Information Exchange: JWTs are used for secure information transmission between parties. Since JWTs are signed, we can ensure the sender is correct. Further, since the signature is calculated using the header and the payload, it is ensured that the information is not tampered.</li></ul><h4>How JWTs work?</h4><p>In the authentication flow, when a user is successfully logged into his/her account using credentials, a JWT is issued. This JSON Web Token should be handled with care since it contains credentials. The token should not be kept longer than required. In signed tokens, we shouldn’t put secret information since the other parties can read the information even though they can’t change.</p><p>When the user needs to access a protected resource, the JWT should be sent in the request, typically in the Authorization header using the Bearer schema. Following is a sample content of the header.</p><pre>Authorization: Bearer &lt;token&gt;</pre><p>The protected server route will check the validity of the JWT and if valid, the user is allowed to access the protected resource. If the token is sent through HTTP headers, we should prevent getting them bigger.</p><p>Following is a simple diagram which shows how a JWT is obtained and used to access resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*tX9i1E_e4b271VNwJOQt8A.png" /></figure><ol><li>The client requests authorization to the authorization server.</li><li>When the authorization is granted, the authorization server returns an access token to the application.</li><li>The application uses the access token to access a protected resource.</li></ol><h4>Why JWTs?</h4><p>Following are some of the advantages of using JWTs.</p><ul><li>JWT is better to be used in HTML and HTTP environments since the encoded size is smaller.</li><li>The difficulty of signing a JSON using a public/private key pair is less compared to signing an XML.</li><li>Since the JSON parsers are common in various programming languages, it’s easy to work with JWT.</li><li>Client-side processing of JWTs on multiple platforms is easy.</li></ul><p>Hope this blog provided a basic idea on JSON Web Tokens. For more information on JWTs, please refer <a href="https://datatracker.ietf.org/doc/html/rfc7519">RFC7519</a>. Happy reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cefa10d43b63" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/introduction-to-json-web-tokens-jwts-cefa10d43b63">Introduction to JSON Web Tokens (JWTs)</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Updating email templates in Asgardeo using APIs]]></title>
            <link>https://medium.com/identity-beyond-borders/updating-email-templates-in-asgardeo-using-apis-1f8fa6f4ac84?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f8fa6f4ac84</guid>
            <category><![CDATA[asgardeo]]></category>
            <category><![CDATA[ami]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Sun, 26 Jun 2022 13:46:45 GMT</pubDate>
            <atom:updated>2022-06-27T02:08:15.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AzL_qPAAzQ5utbjRTzObfw.png" /></figure><p>With the increased security threats in the digital world, providing a secure authentication and authorization mechanism has become an essential requirement. Due to that, managing a large user base while providing security has become a burden for the developers. <a href="https://wso2.com/asgardeo/">Asgardeo</a> was introduced to help developers implement secure authentication flows to apps or websites in a few simple steps. It is the modern IDaaS (Identity as a Service) solution introduced by WSO2 by improving the developer experience.</p><p>Asgardeo is available for everyone to tryout. If you haven’t already registered, go to <a href="https://asgardeo.io/signup">https://asgardeo.io/signup</a> and create your own account. You can refer <a href="https://wso2.com/asgardeo/docs/">Asgardeo documentation</a> for more information. When you create an asgardeo account, an organization will be created for you and it will be set as the default. If you need to have multiple organizations, that can be achieved through the <a href="https://console.asgardeo.io/">Asgardeo console</a>.</p><p>If you have some experience with Asgardeo, you should have observed that there are multiple emails send for the users in your organization when trying out user related flows such as user registration, password reset, account lock etc. By default, the styles of those email templates are similar to Asgardeo theme.</p><p>So, let me explain the issue we are addressing here and how we are doing that.</p><h4>The Problem</h4><p>When you want someone to register in your organization or consume the applications provided by your organization, the user needs to create an account or you can invite the user to register. Here, the user will receive an email containing information on how to get them registered. If this email looks different compared to the organization brand (i.e colour palette, fonts, logo etc.), it will be a bad experience for the users and they will get an insecure feeling. This will be the same for other scenarios as well like password reset, account lock/unlock etc.</p><h4>The Solution</h4><p>As a solution for the above problem, you can update the email templates as you wish or according to your organization brand, which will give a sense of security and a good user experience to the users.</p><p>This blog explores on how to achieve this in Asgardeo using the Email Templates Management API.</p><h3>Update email templates using API</h3><p>For the ease of explanation, I will separate this task into two steps as follows.</p><ol><li>Generate access tokens</li><li>Update email templates</li></ol><h4>Generate access tokens</h4><p>To view and update email templates using APIs, the first requirement is to have an access token with required permissions. In Asgardeo, if you need to configure organization settings using any management API, you have to create an access token. It can be done by providing the client credentials and the required scopes.</p><p>Since we are going to use the email templates management API, we need to provide following scopes when requesting for a access token in order to view and update email templates.</p><ul><li>To view email templates — “internal_email_mgt_view”</li><li>To update email templates — “internal_email_mgt_update”</li></ul><p>Follow the below steps to create an access token, which will be used to invoke the API.</p><ol><li>Go to the Asgardeo console and navigate to Develop -&gt; Applications.</li><li>Click new application and select Standard-Based Application.</li><li>Provide a name for the application, select “OAuth2.0 OpenID Connect” as the protocol, select the Management Application checkbox and click on Register.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0rN6DaF5AKOUTYgC.png" /></figure><p>4. Once you successfully create the application, you can see the Client ID and the Client Secret in the protocol tab of your application. Make a note of those.</p><p>5. Make sure that Client Credential is selected as the Allowed grant type.</p><p><em>Note: Client ID and Client Secret are sensitive information that should be protected. Anyone with those information can generate access tokens with the access level of the admin of the organization.</em></p><p>6. Now you can generate the access token using the below CURL command.</p><pre>curl -X POST \<br>https://api.asgardeo.io/t/&lt;org_name&gt;/oauth2/token \<br>-u  &#39;&lt;client_id&gt;:&lt;client_secret&gt;&#39; \<br>-H &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>-d &#39;grant_type=client_credentials&amp;scope=&lt;scope&gt;&#39;</pre><p>Replace the &lt;client_id&gt; and the &lt;client_secret&gt; with the values you obtained in above steps and &lt;org_name&gt; with your organization name. Provide the &lt;scope&gt; as “internal_email_mgt_view” and “internal_email_mgt_update”.</p><p>Sample request:</p><pre>curl -X POST \<br>https://api.asgardeo.io/t/myorg/oauth2/token \<br>-u  &#39;tOym9SimOJEIDOSNpI0OSAfHZwgaYi:tOym9SimJDYWICMApI0MYfHZwgYUa&#39; \<br>-H &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>-d &#39;grant_type=client_credentials&amp;scope=internal_email_mgt_view internal_email_mgt_update&#39;</pre><p>Following is a sample response you get which consists of the access token.</p><pre>{<br>“access_token”: “4e12kee8–4782–3er5–972a-rw13vf35e630”,<br>“scope”: “internal_email_mgt_update internal_email_mgt_view”,<br>“token_type”: “Bearer”,<br>“expires_in”: 3600<br>}</pre><p>If you are sharing this access token with another developer, you can mitigate the risk of misuse by giving only the required scopes for the specific task as above. Further, you can reduce the expiry time of the access token by updating the “Application access token expiry time” in your application (protocol tab) through the Asgardeo console before generating the token.</p><h4>Update email templates</h4><p>You can use the generated access token as the Authorization bearer header to invoke the Email Template Management API. You can use the following CURL commands to update the email templates.</p><ol><li>Get all email template types</li></ol><pre>curl — location — request GET ‘https://api.asgardeo.io/t/&lt;org_name&gt;/api/server/v1/email/template-types&#39; \<br> — header ‘Authorization: Bearer &lt;access_token&gt;’</pre><p>Using the response, you can locate the endpoint of the email template type to be used in the next request.</p><p>Sample response:</p><pre>{<br>“id”: “QXNrUGFzc3dvcmQ”,<br>“displayName”: “AskPassword”,<br>“self”: “/t/&lt;org_name&gt;/api/server/v1/email/template-types/QXNrUGFzc3dvcmQ”<br>}</pre><p>To give a clear explanation, I will consider “AskPassword” as the email template that I need to update.</p><p>2. Get the list of email templates for the template type you need to update.</p><pre>curl — location — request GET ‘https://api.asgardeo.io/t/&lt;org_name&gt;/api/server/v1/email/template-types/{template-type-id}/templates&#39; \<br> — header ‘Authorization: Bearer &lt;access_token&gt;’</pre><p>Since I’m using “AskPassword” as the template type, {template-type-id} should be “QXNrUGFzc3dvcmQ” according to the above response.</p><p>Sample response:</p><pre>[<br>{<br>“id”: “en_US”,<br>“self”: “/t/&lt;org_name&gt;/api/server/v1/email/template-types/QXNrUGFzc3dvcmQ/templates/en_US”<br>}<br>]</pre><p>3. Get the full template for the template id retrieved above.</p><pre>curl — location — request GET ‘https://api.asgardeo.io/t/&lt;org_name&gt;/api/server/v1/email/template-types/{template-type-id}/templates/{template-id}&#39; \<br> — header ‘Authorization: Bearer &lt;access_token&gt;’</pre><p>According to the above response, {template-id} should be “en_US”.</p><p>Sample response:</p><pre>{<br>“contentType”: “text/html; charset=UTF-8”,<br>“subject”: “Here is your new account in the organization {{tenant-domain}}”,<br>“body”: “HTML BODY”,<br>“footer”: “---”,<br>“id”: “en_US”<br>}</pre><p>4. With the above request, you received the current body of the email template that you need to update. Change it according to your requirements. Use following request to update the email template.</p><pre>curl — location — request PUT ‘https://api.asgardeo.io/t/&lt;org_name&gt;/api/server/v1/email/template-types/{template-type-id}/templates/{template-id}&#39; \<br> — header ‘Authorization: Bearer &lt;access_token&gt;’ \<br> — header ‘Content-Type: application/json’ \<br> — data-raw ‘{<br> “contentType”: “text/html; charset=UTF-8”,<br> “subject”: “Here is your new account in the organization {{tenant-domain}}”,<br> “body”: “Updated HTML BODY”,<br> “footer”: “ — -”,<br> “id”: “en_US”<br>}’</pre><p>Congratulations! 🎉 Now you are done with updating the email template according to your requirements. Try out the related flow and see whether you get the emails with the updated styles. You can find the postman collection for the above requests <a href="https://www.getpostman.com/collections/b87141e25d9a68915a03">here</a>. For more information on using Email Templates API, refer to the <a href="https://wso2.com/asgardeo/docs/apis/email-template/">Asgardeo official documentation</a>.</p><p>There are more Asgardeo features and improvements on the way. Stay tuned! 😍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f8fa6f4ac84" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/updating-email-templates-in-asgardeo-using-apis-1f8fa6f4ac84">Updating email templates in Asgardeo using APIs</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring Asgardeo as an External IDP using OIDC]]></title>
            <link>https://medium.com/identity-beyond-borders/configuring-asgardeo-as-an-external-idp-using-oidc-4785ec4bf0b?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/4785ec4bf0b</guid>
            <category><![CDATA[asgardeo]]></category>
            <category><![CDATA[oidc]]></category>
            <category><![CDATA[identity-provider]]></category>
            <category><![CDATA[ami]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Wed, 01 Jun 2022 18:00:13 GMT</pubDate>
            <atom:updated>2022-06-07T11:39:20.546Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFY12Z_RpPUlWu05724-rQ.png" /></figure><p>Have you ever used social login options such as Google sign-in, Facebook login and GitHub sign-in to log in to any application you used? If so, you are already aware of how easy it is to sign in to an application using an existing social account. Similarly, we can use an external OpenID Connect (OIDC) identity provider to add standard OpenID Connect login to your application. It will allow users registered in the external identity provider to log in to your application using their existing accounts created in that external IdP.</p><p>This blog mainly focuses on how to configure <strong>Asgardeo as the external OIDC identity provider,</strong> which will be configured in your application login flow.</p><h4>Configure the external identity provider</h4><p>Since we are configuring Asgardeo as our external IDP, you should have an account in <a href="https://wso2.com/asgardeo/">Asgardeo</a>. To give a better explanation, let’s consider the tenant name as “externalidp”. You need to register an OIDC application in externalidp.</p><ol><li>Log into the <a href="http://console.asgardeo.io/">Asgardeo console</a>.</li><li>Navigate to Develop -&gt; Applications</li><li>Click New Application and select Traditional Web Application.</li><li>Register the application providing the required details. You should provide a unique name for the app and select OpenID Connect as the protocol. Authorized Redirect URL should be the URL to which the authorization code is sent to upon authentication and where the user is redirected to upon logout.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hd9hJMxfL6orZhB23FsgqQ.png" /></figure><p>5. Once the application is registered, make a note of the following,</p><ul><li>Client ID — can be obtained from the Protocol tab</li><li>Client secret — can be obtained from the Protocol tab</li><li>Authorization endpoint URL — can be obtained from the Info tab</li><li>Token endpoint URL — can be obtained from the Info tab</li><li>JWKS endpoint URL — can be obtained from the Info tab</li></ul><p>6. Create a user by navigating to Manage -&gt; Users. (eg: testidp@gmail.com)</p><p>Now it should be possible to add standard OIDC login to your application using the configured external IDP and the user <em>testidp@gmail.com</em> should be able to log in.</p><p>To test the external IDP, I will be using a sample app provided by Asgardeo itself. Hence, let’s create a new tenant in Asgardeo (Let’s call it as “myorg”) and configure an application with standard OpenID Connect login.</p><h4>Test the external identity provider</h4><p>You have to create an OIDC IdP and an application in the tenant “myorg” to test the external IdP.</p><p><strong>To create an OIDC IdP,</strong></p><ol><li>Navigate to Develop -&gt; Connections</li><li>Click Create Connection and select Standard-Based IdP.</li><li>Provide a unique name for the IdP, select OpenID Connect as the protocol and click Next.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7jNY5PvU3hhqsK18njrjw.png" /></figure><p>4. Provide the Client ID, Client secret, Authorization endpoint URL and the Token endpoint URL obtained from the external Idp configured above and click Next.</p><p>5. Provide the JWKS endpoint URL and click Finish.</p><blockquote>NOTE: From the Settings tab of the IdP, you can obtain the <strong>Authorized redirect URL </strong>which should be added to the external IdP in order to configure it in the new application. You can add it in the protocol tab of the OIDC app created above (in the tenant “externalidp”).</blockquote><p><strong>To enable OIDC IdP in the application login,</strong></p><ol><li>Navigate to Develop -&gt; Applications and create an application. You can refer the <a href="https://wso2.com/asgardeo/docs/guides/applications/">documentation</a> and configure any type of application depending on your requirements.</li><li>Navigate to Sign-in Method tab and select “Start with default configuration”.</li><li>There click “Add Authentication” and select the OIDC IdP configured, and click Add.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_TLGSgCHrmn-4Xqt9-62UQ.png" /></figure><p>4. Finally click Update.</p><p>Now you are done with all the configurations. Let’s see whether the external IdP is working as expected.</p><ol><li>Access the application URL.</li><li>Select Sign In With the created IdP.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*M0drvpU9LS0kdY__tRVQJA.png" /></figure><p>3. Sign in with the created user “<em>testidp@gmail.com”.</em></p><p>Congratulations! You have successfully configured Asgardeo as an external identity provider.</p><p>Hope this blog helped to get an understanding on configuring Asgardeo as an external identity provider using OIDC. If you face any issues while doing the configurations, feel free to add them in the comments section.</p><p>Happy reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4785ec4bf0b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/configuring-asgardeo-as-an-external-idp-using-oidc-4785ec4bf0b">Configuring Asgardeo as an External IDP using OIDC</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate Facebook login to an application using Asgardeo]]></title>
            <link>https://medium.com/identity-beyond-borders/integrate-facebook-login-to-an-application-using-asgardeo-9acf4f0b52e3?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/9acf4f0b52e3</guid>
            <category><![CDATA[social-login]]></category>
            <category><![CDATA[identity-provider]]></category>
            <category><![CDATA[ami]]></category>
            <category><![CDATA[asgardeo]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Tue, 31 May 2022 18:22:24 GMT</pubDate>
            <atom:updated>2022-06-07T11:39:57.233Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fvWfnukMM2-is8F5VxKzkA.png" /></figure><p>Due to the rapid growth of applications and systems in the world, it has become arduous to create user accounts and mange the credentials separately for each application. Addressing this concern, Social Login has become one of the most widely adopted login options. Social Login is a simple process where the user can select a social network provider. Then the login request will be sent to that provider and once the user identity is confirmed, the user will get access to the application.</p><p><a href="https://wso2.com/asgardeo/">Asgardeo</a> is an IDaaS that helps developers implement secure authentication flows to applications in a few simple steps. It provides the capability to integrate social login such as Google, Facebook, GitHub with your applications. In this blog, I will describe how easy it is to integrate Facebook login into your application using Asgardeo. Once it is enabled, the users will be able to log in with their Facebook accounts.</p><p>This can be done in the following 3 steps.</p><ol><li>Register Asgardeo as an app through the Facebook developer portal</li><li>Register Facebook IDP</li><li>Enable Facebook login in your application</li></ol><p>Each of these steps is described under the below sub topics.</p><p>The only prerequisite to completing this guide is to have an Asgardeo account and a Facebook account.</p><h4>Register Asgardeo as an app through the Facebook developer portal</h4><p>As the first step, you need to configure Facebook and obtain the client ID and the secret. You can follow the below steps to create an app and obtain those configurations.</p><ol><li>Log in to the <a href="https://developers.facebook.com/">Facebook developer portal</a>.</li><li>Navigate to “My Apps” and click Create App.</li><li>Select “Consumer” as the app type and continue.</li><li>Then you can provide the display name for your application and create the application.</li><li>Then you’ll be directed to a page where you can add products to your app. There, click “Set up” on the Facebook login card.</li><li>Then select “Web” as the platform for the app and provide the site URL as https://api.asgardeo.io/t/{organization_name} . Then save the changes and continue.</li><li>On the left panel, go to Settings under Facebook Login.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*255OnHyA8Us4i6Hfjo9ggQ.png" /></figure><p>9. Add https://api.asgardeo.io/t/{organization_name}/commonauth as the Valid OAuth Redirect URI.</p><p>10. Enable Client OAuth Login and Web OAuth Login and click Save Changes.</p><p>11. Now you can obtain the App ID and the App Secret from Settings -&gt; Basic on the main side panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1d2nQ-QJQJnbh-K2LmRj8A.png" /></figure><h4>Register Facebook IDP</h4><p>The 2nd step is to register the Facebook IDP in your Asgardeo organization.</p><ol><li>On <a href="https://console.asgardeo.io/">Asgardeo console</a>, navigate to Develop -&gt; Connections.</li><li>Click Create Connection and select Facebook.</li><li>Enter a unique name for the Facebook IDP, add the app ID and the app secret obtained from Facebook, and click Finish.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fb6jUlBh-db9CdbLw2Gn7w.png" /></figure><h4>Enable Facebook login in your application</h4><p>Now this is the final step where you can enable Facebook login in your application. If you don’t have an application registered in Asgardeo, you can refer the <a href="https://wso2.com/asgardeo/docs/guides/applications/">documentation</a> and configure an application.</p><ol><li>On <a href="https://console.asgardeo.io/">Asgardeo console</a>, navigate to Develop -&gt; Applications.</li><li>Select your application and navigate to the Sign-in Method tab.</li><li>Click on “Start with default configuration”.</li><li>There click on “Add Authentication” and select the Facebook IDP configured before, and click Add.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_nOYhV4qcPaMQQVuLrDKg.png" /></figure><p>5. Finally click Update.</p><p>Now all the configurations are done. It’s time to test your application login. Access your application URL and click Login. In the Asgardeo login page, “Sign In With Facebook” option should be shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_szcLkdq5YjnWBs5T3TAw.png" /></figure><p>With that option, now you can access the application by signing in using an existing Facebook account.</p><h4>References</h4><p>[1] <a href="https://developers.facebook.com/docs/development/create-an-app">https://developers.facebook.com/docs/development/create-an-app</a></p><p>[2] <a href="https://wso2.com/asgardeo/docs/guides/authentication/social-login/add-facebook-login/#register-asgardeo-on-facebook">https://wso2.com/asgardeo/docs/guides/authentication/social-login/add-facebook-login/#register-asgardeo-on-facebook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9acf4f0b52e3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/integrate-facebook-login-to-an-application-using-asgardeo-9acf4f0b52e3">Integrate Facebook login to an application using Asgardeo</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CIAM and EIAM]]></title>
            <link>https://medium.com/identity-beyond-borders/ciam-and-eiam-bbb8f80712d4?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbb8f80712d4</guid>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[eiam]]></category>
            <category><![CDATA[ciam]]></category>
            <category><![CDATA[identity-management]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Mon, 16 May 2022 17:31:23 GMT</pubDate>
            <atom:updated>2022-05-19T13:54:56.379Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lhU2bKxI0vbxod_7.png" /><figcaption>Figure 1 (<a href="https://cisomag.eccouncil.org/why-businesses-should-be-invested-in-digital-identity-in-2021/">https://cisomag.eccouncil.org/why-businesses-should-be-invested-in-digital-identity-in-2021/</a>)</figcaption></figure><p>Identity and Access Management (IAM) is a framework of processes, policies and tools which defines and manages digital identities and their access privileges to applications and services. It should be capable of storing identity data securely, and should share only necessary and relevant data. These IAM systems can be deployed on premises, provided as a cloud based subscription model or as a hybrid model.</p><p>Depending on the type of digital identities that are managed, the system can be either a CIAM system or an EIAM system.</p><h3>CIAM (Customer identity and Access Management)</h3><p>As the name depicts, CIAM systems are designed to manage the external users such as customers and partners. These systems should be capable of continuously improving the user journey through each digital channel. It should provide fast, secure and flexible authentication, so that it will gradually increase the customer base while retaining the existing customers. A great user experience and protection from fraud, breaches and privacy violations are prerequisites in a CIAM platform.</p><h3>EIAM (Enterprise Identity and Access Management)</h3><p>EIAM systems are designed to manage the internal identities like employees. This is broader than traditional IAM since it focuses on employees’ entire period of work with the organization. These systems should be able to control what an employee can perform within a corporate network. It should ensure that external users cannot access internal resources and services. Moreover, access should only be provided to the users with required privileges. EIAM systems should comply with the legal requirements and ensure trust and availability of data.</p><p>The major differences between these two platforms are due to the demand of different use cases by external and internal users. The following facts will describe how each aspect is demanded by CIAM and EIAM systems.</p><p><strong>User Experience</strong></p><p>In EIAM systems, we need a certain level of user experience, but it’s not critical as in CIAM systems. This is because employees receive a training on how to use applications which are usually provided by their employers.</p><p>However, in CIAM systems, user experience is one of the critical factors that should be considered in order to be successful. The UX should be intuitive so that the customer feels happy and stays with the service provider. If the UX is not good, customers will move to another service provider which takes away revenue.</p><p><strong>Flexibility</strong></p><p>CIAM systems should have enough flexibility to keep up-to-date with latest customer trends. The systems should be capable of doing quick changes through configurations instead of full code changes. This will keep the services competitive among the other vendors.</p><p>In contrast, EIAM systems do not require frequent updates, they can be made over long time periods. It’s not necessary to keep them updated with latest trends and technologies.</p><p><strong>Scalability</strong></p><p>There is a huge difference between the scalability needs for CIAM and EIAM systems. Customer base is always larger and growing faster compared to employee base. The customer solutions can have millions of users. But usually the number of employees will not be near to that number even for large scale companies. Therefore, CIAM systems should be more scalable than EIAM systems.</p><p><strong>Generate revenue</strong></p><p>EIAM systems are not intended to generate revenue, but it will help to reduce operational cost.</p><p>In contrast, CIAM systems are intended to generate revenue by providing digital services and reducing support and administration costs. A good CIAM system can even create new revenue opportunities and attract more and more customers to their services.</p><p><strong>Identity Verification</strong></p><p>Usually in EIAM systems, employees are onboarded to the system through company registration, which is done by the HR. However, in most of the times, customers access the systems via self-registration. Therefore, registration is a pivotal point in CIAM systems. They should support social login, provide customized registration forms which align with the brand and ensure the consistency across all the apps. This helps to attract more customers which increases the revenue.</p><p><strong>Identity Management</strong></p><p>In EIAM systems, there is a lower number of users and the fluctuation of the number of users is very less. Therefore, managing employee identities in organizations is usually done by the HR team and it will take considerably less time.</p><p>However, the number of customers in a system is rapidly growing and the number can be even millions. Therefore, it will not be easy to handle the identities effectively in CIAM systems. Hence, it’s vital to provide the capability for the CIAM users to manage their own identities and credentials.</p><p><strong>Privacy, Security and Trust</strong></p><p>Generally, employee identities are owned by the HR team of the company including access management and privileges, and employees have trust on their data with the HR team. However, EIAM systems should be secure enough to prevent access by external users to the internal systems.</p><p>In CIAM, the users should have the ability to manage, delete and export their personal data which ensures trust on the service provider. Further, CIAM systems help to maintain regulations such as <a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a> to protect from fraud, breaches and privacy violations.</p><h3>Summary</h3><p>In summary, the technology behind the CIAM and EIAM is similar, but the functionality and the use cases of these two are different. Following comparison table summarizes the facts on CIAM and EIAM.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2dfdbae9502a6f378998d10c6d756e3d/href">https://medium.com/media/2dfdbae9502a6f378998d10c6d756e3d/href</a></iframe><p>Hope this blog helped to get an understanding on CIAM and EIAM, and their use cases. Let’s meet again with another article. Happy reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbb8f80712d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/ciam-and-eiam-bbb8f80712d4">CIAM and EIAM</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Recovery configurations in WSO2 Identity Server]]></title>
            <link>https://medium.com/identity-beyond-borders/account-recovery-configurations-in-wso2-identity-server-33fe17fa45ae?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/33fe17fa45ae</guid>
            <category><![CDATA[wso2is]]></category>
            <category><![CDATA[account-recovery]]></category>
            <category><![CDATA[identity-management]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Mon, 28 Feb 2022 06:10:11 GMT</pubDate>
            <atom:updated>2022-03-07T10:36:58.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8tquip6452o9K3RW.png" /><figcaption>Figure 1 (<a href="https://images.app.goo.gl/SefhADdsHr7NZuMv7">https://images.app.goo.gl/SefhADdsHr7NZuMv7</a>)</figcaption></figure><p>In Identity and Access Management, Account Recovery is one of the most important use cases that we need to explore on. Due to the rapid growth in digital transformation and technology, these days people have multiple accounts in multiple websites. Hence, there is a high probability of the users loosing the access to their digital accounts due to loosing credentials. Account recovery is a process designed to get back to your accounts when you don’t have enough information to access your accounts. To cater this requirement, WSO2 Identity Server (IS) has various account recovery options which can be provided for your users.</p><p>The purpose of this blog is to gather the recovery options into one place, so that it will be easy for an application administrator to choose the options they need. Further, there is a considerably long list of configurations available for account recovery in the WSO2 IS. Hence, this blog describes all of those configurations which are listed under Account Recovery in the management console of the identity server (Figure 2) and the specific configurations needed for each use case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCRFq7jBs1WsmZNrGf8uWw.png" /><figcaption>Figure 2: Account recovery configurations in WSO2 Identity Server</figcaption></figure><p>There are two major use cases under account recovery, which can be identified as password recovery and username recovery.</p><h4>Password Recovery</h4><p>This is the most common use case which is commonly known as “forgot password” option. When users forget their passwords, there are several options to recover their accounts as follows.</p><ol><li>Send password reset link to the registered email — when the user selects the “Recover with Mail” option, he will receive an email with the password reset link which can be used to set a new password.</li><li>Use security questions to reset the password — when the user selects the “Recover with Security Questions” option, he will be prompted with security questions and the user needs to answer them correctly. If the answers are correct, the user will be able to reset the password. These security questions should be configured in the user profile beforehand in order to use this option.</li><li>Use a one-time password (OTP) to reset the password — in this method, an OTP is sent to the registered phone number and that can be used to reset the password. This is currently not supported via the My Account of the WSO2 Identity Server, but available via Account Recovery REST APIs. Refer <a href="https://is.docs.wso2.com/en/5.12.0/learn/password-recovery-via-user-preferred-notification-channel/">this</a> for more information.</li></ol><h4>Username Recovery</h4><p>This is the use case known as “Forgot Username”. It is mostly used in websites which needs a username to access the account that is not similar to the email address. This is done by identifying the user account by requesting user details such as email, first name and last name. If those details are verified successfully and identified the account, the username will be sent via email.</p><p>To achieve each of those use cases, you have to configure the relevant options from the configurations listed under Account Recovery in the management console. Before that, following prerequisites should be satisfied.</p><h4>Prerequisites</h4><ol><li>Download the WSO2 Identity Server from <a href="https://wso2.com/identity-server/">here</a>.</li><li>Configure the email sending module in the WSO2 Identity Server as explained <a href="https://is.docs.wso2.com/en/latest/setup/configuring-email-sending/">here</a>.</li><li><a href="https://is.docs.wso2.com/en/latest/setup/running-the-product/">Start</a> the WSO2 Identity Server, log into the ​ management console​ using “admin” as both the username and the password.</li><li>Create a user.</li></ol><ul><li>On the ​Main​ tab click on <strong>Users and Roles</strong>​ -&gt; ​<strong>Add</strong>.</li><li>Click ​ <strong>Add New User</strong>​.</li><li>Create a new user by giving a username and a password.</li><li>Go to <strong>User Profile</strong> and add an email address.</li></ul><p>Assign login permissions to the created user.</p><ul><li>Click the <strong>View Roles</strong> option of the created user.</li><li>Click <strong>Permissions</strong>. Select <strong>Login</strong> and click <strong>Update</strong>.</li></ul><p>5. Go to <a href="https://localhost:9443/myaccount">myaccount</a> and log in with the created user credentials. Go to <strong>Security tab</strong> and Under <strong>Account Recovery</strong>, click <strong>+</strong> to add security questions. After that sign out from the account. (Setting up the security questions can also be done using the management console as explained <a href="https://is.docs.wso2.com/en/latest/learn/managing-challenge-questions/">here</a>)</p><p>6. Set up recaptcha in the Identity Server as explained <a href="https://is.docs.wso2.com/en/latest/learn/setting-up-recaptcha/">here</a>.</p><p>Since now you have an understanding on account recovery functionalities available and you are done with the prerequisites, configuring above recovery options in the identity server will be just a matter of choosing relevant configurations. Along with that, I will describe each account recovery configuration we have in the WSO2 Identity Server.</p><h4>Password Recovery via mail</h4><ul><li>Since you have already configured the email sending module, the only thing remaining to do is enabling notification based password recovery. For that, go to Main &gt;Identity Providers&gt;​ ​ Resident &gt; Account Management Policies&gt; Account Recovery. Select the <strong>Enable Notification Based Password Recovery </strong>check box and click <strong>Update</strong>.</li><li>You can add an additional layer of security by selecting the option <strong>Enable reCaptcha for password recovery</strong>. A reCaptcha can determine if the system is dealing with a human or an automation.</li><li>By selecting the <strong>Enable Auto Login After Password Reset</strong> checkbox, the user will be logged into the account after the password reset.</li><li>If the user wants to receive a confirmation email once password reset is done, select the <strong>Notify when Recovery Success</strong> checkbox.</li><li>You can specify the recovery link validity period by configuring <strong>Recovery link expiry time</strong>.</li><li>If you want to redirect the user to a particular location after the password recovery request is completed, you can add a regular expression for the <strong>Recovery callback URL regex </strong>that will match to the redirect URL.</li></ul><p>Above are the all configurations related to password recovery via mail. To test out the scenario, go to <a href="https://localhost:9443/myaccount">myaccount</a> and click <strong>forgot password</strong>. Enter the username, select <strong>Recover with Mail</strong> and click <strong>Submit</strong>. The email address added to the user profile should receive an email with a link to reset the password.</p><h4>Password Recovery via Security Questions</h4><ul><li>This can be achieved by selecting <strong>Security question based password recovery</strong> checkbox in Main &gt;Identity Providers&gt;​ ​ Resident &gt; Account Management Policies&gt; Account Recovery. Required number of questions can be configured using the configuration <strong>Number of questions required for password recovery</strong>.</li><li>To enable recaptcha, select <strong>Enable reCaptcha for Security Question Based Password Recovery </strong>and set<strong> Max failed attempts for reCaptcha</strong>. (Account locking should be enabled using Main &gt;Identity Providers&gt;​ ​ Resident &gt; Login Attempts Security&gt; Account Lock). Then recaptcha will be prompted after the specified number of failed attempts for the security questions.</li><li>Similar to the above password recovery via mail method, <strong>Enable reCaptcha for password recovery, Enable Auto Login After Password Reset, Notify when Recovery Success </strong>and<strong> Recovery callback URL regex </strong>configurations can be used for the password recovery via security questions option as well.</li></ul><p>After setting up the above configurations, go to <a href="https://localhost:9443/myaccount">myaccount</a> and click <strong>forgot password</strong>. Enter the username, select <strong>Recover with Security Questions </strong>and click <strong>Submit</strong>. You will be prompted to enter the answers for some security questions you set at the beginning depending on the number of questions you specified for password recovery. Once you answer the questions correctly, you will be prompted with the reset password form.</p><p>Other than the configurations mentioned for this password recovery option, there are four more configurations related to security questions under account recovery as follows.</p><p><strong><em>Enable forced challenge questions — </em></strong><em>If this is enabled, users should provide answers to the security questions during sign in</em></p><p><strong><em>Minimum Number of Forced Challenge Questions to be Answered — </em></strong><em>Users should provide answers to the security questions during sign in if they have answered lesser than this value</em></p><p><strong><em>Challenge question answer regex — </em></strong><em>If you want to add a regex pattern for the answers of the security questions, you can specify it here</em></p><p><strong><em>Enforce challenge question answer uniqueness —</em></strong><em> if this is enabled, it doesn’t allow to add the same answer for multiple questions</em></p><h4>Username Recovery</h4><ul><li>Username recovery can be enabled by selecting the configurations <strong>Username recovery </strong>and<strong> Manage notifications sending internally.</strong></li><li>For this option, we can enable recaptcha by selecting <strong>Enable reCaptcha for username recovery</strong> configuration.</li></ul><p>After setting up these configurations, click <strong>forgot username</strong> in <a href="https://localhost:9443/myaccount">myaccount</a>. You will be prompted with a form to enter user details to recover the username. If the user details are verified successfully, an email with the username will be received.</p><p>With the above use cases, all the configurations available under account recovery in the WSO2 Identity Server are covered. Hope this blog helped to have an overall understanding on account recovery configurations available in IS currently. Stay tuned for more WSO2 IS features!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33fe17fa45ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/account-recovery-configurations-in-wso2-identity-server-33fe17fa45ae">Account Recovery configurations in WSO2 Identity Server</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OAuth 1.0 Vs OAuth 2.0]]></title>
            <link>https://medium.com/identity-beyond-borders/oauth-1-0-vs-oauth-2-0-e36f8924a835?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e36f8924a835</guid>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[oauth]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Sun, 29 Aug 2021 09:39:33 GMT</pubDate>
            <atom:updated>2022-04-28T05:39:16.426Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/507/0*r3_oXOV1E4kNhaYG.png" /></figure><p><strong>OAuth</strong> (<strong>O</strong>pen <strong>Auth</strong>orization) is a protocol used for access delegation, where resource owners grant third-party applications to access their resources without sharing their user credentials. This blog will explore on OAuth protocol with a real world scenario and let’s try to understand the differences between OAuth 1.0 and OAuth 2.0.</p><p>Assume that there is an application called ‘MyGallery’ that stores the photos of Anne. ‘BeautyQueen’ is an photo edit application and that needs to collaborate with MyGallery to edit the photos of Anne. In this case, how BeautyQueen app can access photos in MyGallery? Even though BeautyQueen app can get credentials from Anne and access the photos, how much Anne can trust the BeautyQueen app? Is there a better way to do this without sharing her credentials? This is where OAuth comes into play.</p><p>Let’s look at how OAuth 1.0 and OAuth 2.0 handle this scenario.</p><h4>OAuth 1.0</h4><p>Following steps describe how OAuth 1.0 acts in this scenario.</p><ol><li>Anne wants to edit photos stored in MyGallery using BeautyQueen app. Therefore, BeautyQueen app sends a request to access photos on MyGallery.</li><li>MyGallery validates the BeautyQueen app’s request and sends it a temporary <strong>request token.</strong></li><li>BeautyQueen app redirects Anne to MyGallery for login or provides the preformatted URL to log in.</li><li>Upon Anne’s successful authentication to MyGallery server with her credentials, she is asked for approval to grant permission to the BeautyQueen app to access her resources. When Anne finishes granting authorization, BeautyQueen app is informed.</li><li>BeautyQueen app requests MyGallery for an <strong>access token</strong> using its approved temporary <strong>request token</strong>.</li><li>MyGallery validates the request and sends an <strong>access token</strong>.</li><li>BeautyQueen app can now access Anne’s photos from the MyGallery server with the <strong>access token</strong> without knowing Anne’s credentials.</li></ol><p>Following is the abstract view of the OAuth 1.0 protocol flow described above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*fACWJ6k07mTjLfermXFFPg.png" /></figure><p>Since now it’s clear on how OAuth 1.0 handles this scenario, let’s see how OAuth 2.0 handles this.</p><h4>OAuth 2.0</h4><p>Following are the steps performed in the above scenario with OAuth 2.0.</p><ol><li>Anne wants to edit photos stored in MyGallery using BeautyQueen app. Therefore, BeautyQueen app needs to access photos on MyGallery.</li><li>BeautyQueen app requests access to MyGallery from the authorization server.</li><li>Anne authenticates to authorization server with her credentials and returns <strong>authorization grant</strong> to BeautyQueen app to access MyGallery.</li><li>BeautyQueen app requests for an <strong>access token</strong> using the <strong>authorization grant</strong>.</li><li>Authorization server validates the request and sends an <strong>access token </strong>(optionally a <strong>refresh token</strong>) to BeautyQueen app.</li><li>BeautyQueen app can now access Anne’s photos from the MyGallery server with the <strong>access token</strong> without knowing Anne’s credentials.</li></ol><p>Following diagram illustrates an abstract view of the OAuth 2.0 protocol flow described above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hOycj214z21NsUKXdDzvGA.png" /></figure><p>Since now you are aware of how these two protocols handle an access delegation scenario, let’s now differentiate those two.</p><h4>Differences between OAuth 1.0 and OAuth 2.0</h4><p>OAuth 2.0 is a complete rewrite of OAuth 1.0 and it’s not backward compatible with OAuth 1.0. During the time when many organizations are using OAuth 1.0 APIs, it was identified several areas that are challenging to implement and need improvements. Addressing those challenges, OAuth 2.0 came into the picture. Following are the major improvements that has happened.</p><ul><li><strong>Better support for non-browser applications</strong></li></ul><p>OAuth 1.0 has been designed focusing on the interactions of inbound and outbound messages in web client applications. Therefore, it is inefficient for non-browser clients. OAuth 2.0 has addressed this issue by introducing more authorization flows for different client needs that do not use web UIs.</p><ul><li><strong>Reduced complexity in signing requests</strong></li></ul><p>OAuth 1.0 needs to generate a signature on every API call to the server resource and that should be matched with the signature generated at the receiving endpoint in order to have access for the client. OAuth 2.0 do not need to generate signatures. It uses TLS/SSL (HTTPS) for communication.</p><ul><li><strong>The separation of roles</strong></li></ul><p>Handling resource requests and handling user authorization can be decoupled in OAuth 2.0. It has clearly defined the roles involved in communication which are client, resource owner, resource server, and authorization server.</p><ul><li><strong>The short-lived access token and the refresh token</strong></li></ul><p>In OAuth 1.0, access tokens can be stored for a year or more. But in OAuth 2.0, access tokens can contain an expiration time, which improves the security and reduces the chances of illegal access. And it offers a refresh token which can be used to get a new access token at the access token expiration without reauthorizing.</p><p>So which one should you pick?</p><h4>OAuth 1.0 or OAuth 2.0?</h4><p>According to the facts mentioned above, OAuth 2.0 seems to be superior than OAuth 1.0. It is recommended to use OAuth 2.0 if you are making a new application today. It is easy and efficient to implement due to not having complicated cryptographic requirements. And this is beneficial due to the non-browser application support. Furthermore, there is no need to encrypt the tokens at the endpoints since they are encrypted in transit.</p><p>Hope you were able to understand and differentiate the two OAuth protocols. If you want to know more details, you can refer the OAuth specifications referenced below. Happy reading!</p><h4>References</h4><p>[1] RFC5849 — <strong>The OAuth 1.0 Protocol — </strong><a href="https://datatracker.ietf.org/doc/html/rfc5849">https://datatracker.ietf.org/doc/html/rfc5849</a></p><p>[2] RFC6749 — <strong>The OAuth 2.0 Authorization Framework — </strong><a href="https://datatracker.ietf.org/doc/html/rfc6749">https://datatracker.ietf.org/doc/html/rfc6749</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e36f8924a835" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/oauth-1-0-vs-oauth-2-0-e36f8924a835">OAuth 1.0 Vs OAuth 2.0</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[User Provisioning with WSO2 Identity Server]]></title>
            <link>https://medium.com/identity-beyond-borders/user-provisioning-with-wso2-identity-server-56bb4e41fb8a?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/56bb4e41fb8a</guid>
            <category><![CDATA[wso2is]]></category>
            <category><![CDATA[user-provisioning]]></category>
            <category><![CDATA[scim]]></category>
            <category><![CDATA[identity-provider]]></category>
            <category><![CDATA[identity-management]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Mon, 28 Jun 2021 18:29:03 GMT</pubDate>
            <atom:updated>2021-06-29T09:51:35.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g430_JkzGy-mktxw.jpg" /><figcaption>(<a href="https://info.templafy.com/blog/what-is-user-provisioning">https://info.templafy.com/blog/what-is-user-provisioning</a>)</figcaption></figure><p>If you consider a scenario like joining an organization or open a new bank account, your identity is represented by a digital identity which is usually known as a user account. It can be a self-registered one or an account created by an administrator depending on the scenario. The organization can maintain these accounts with their systems and users can have different level of access to resources and services depending on the privileges assigned to that particular account. User provisioning allows to automate this task by providing improved security and seamless integration while saving time and money.</p><blockquote>Provisioning is the process of creating, maintaining, and deleting digital identities (accounts) for users of a system(s) and linking appropriate rights to identities in the form of rules and roles.</blockquote><p>This blog explores following standard user provisioning methods along with hands-on exercises using WSO2 Identity Server.</p><ol><li>Inbound Provisioning</li><li>Outbound Provisioning</li><li>JIT Provisioning</li></ol><h4>Inbound Provisioning</h4><p>Inbound provisioning refers to provisioning users or groups in to the WSO2 Identity Server by an external application, which are known as service providers. WSO2 Identity Server supports the SCIM API and SOAP-based Web service API standards for inbound provisioning.</p><p>Following is a quick guide to demonstrate inbound provisioning using SCIM2.</p><ul><li>Download WSO2 Identity Server 5.11.0 from <a href="https://wso2.com/identity-server/#">here</a> and run it by executing wso2server.sh (For unix environment) or wso2server.bat (For windows environment) file from the &lt;IS_HOME&gt;/bin directory.</li><li>Use following curl command to provision user into the Identity Server.</li></ul><pre>curl -v -k --user admin:admin --data &#39;{&quot;schemas&quot;:[],&quot;name&quot;:{&quot;familyName&quot;:&quot;N&quot;,&quot;givenName&quot;:&quot;Rashmini&quot;},&quot;userName&quot;:&quot;rashmini&quot;,&quot;password&quot;:&quot;abc123&quot;,&quot;emails&quot;:[{&quot;primary&quot;:true,&quot;value&quot;:&quot;rash@gmail.com&quot;,&quot;type&quot;:&quot;home&quot;}]}&#39; --header &quot;Content-Type:application/json&quot; https://localhost:9443/scim2/Users</pre><ul><li>View the provisioned user using the below command. (user-id can be obtained from the response you get for the above request)</li></ul><pre>curl -v -k --user admin:admin &#39;<a href="https://localhost:9443/scim2/Users/">https://localhost:9443/scim2/Users/</a><strong>&lt;user-id&gt;</strong>&#39;</pre><ul><li>Update the provisioned user information.</li></ul><pre>curl -v -k --user admin:admin -X PUT -d &#39;{&quot;schemas&quot;:[],&quot;name&quot;:{&quot;familyName&quot;:&quot;N&quot;,&quot;givenName&quot;:&quot;Rashmini&quot;},&quot;userName&quot;:&quot;rashmini&quot;,&quot;emails&quot;:[{&quot;value&quot;:&quot;rashmini@gmail.com&quot;,&quot;type&quot;:&quot;home&quot;}]}&#39; --header &quot;Content-Type:application/json&quot; https://localhost:9443/scim2/Users/<strong>&lt;user-id&gt;</strong></pre><ul><li>Delete the provisioned user.</li></ul><pre>curl -v -k --user admin:admin -X DELETE https://localhost:9443/scim2/Users/<strong>&lt;user-id&gt;</strong> -H &quot;Accept:application/scim+json&quot;</pre><h4>Outbound Provisioning</h4><p>Outbound provisioning provisions users to a trusted identity provider from the WSO2 Identity Server. This trusted identity provider can be Google, Salesforce or any other identity provider that supports inbound provisioning. Outbound provisioning is supported via SCIM or SPML standards.</p><p>Let’s look at how to perform outbound provisioning in WSO2 Identity Server to provision users to another identity server using SCIM. Let’s consider the identity server which configures outbound provisioning as IS1 and the identity server to which users are provisioned as IS2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*0DFOQvtRfOi-TRtNi78yNw.jpeg" /></figure><p>Since we are using two identity server instances at the same time, one instance should be run on a different port (default port is 9443). Following are the configurations to change the port to 9444 in IS2.</p><pre>Open the deployment.toml file in &lt;IS_HOME&gt;/repository/conf directory.<br>Add <strong>offset=1</strong> to the server section.<br>Start the IS2 instance by executing wso2server.sh (Unix) or wso2server.bat (Windows)</pre><p>There are 3 major steps to be followed to configure outbound provisioning.</p><ol><li><strong>Configure an identity provider</strong></li></ol><ul><li>Log into the management console of IS1 via <a href="https://localhost:9443/carbon/">https://localhost:9443/carbon/</a></li><li>In the Main tab, under Identity menu, click on Add under Identity Providers.</li><li>Enter a unique name for the identity provider name.</li><li>Expand the Outbound Provisioning Connectors section and then expand the SCIM Provisioning Configuration section.</li><li>Enter the following values and click Register.</li></ul><pre>Tick <strong>Enable Connector<br>Username</strong>: username of the SCIM application (since we have used an identity server instance, a username of a user registered in is2 is used, eg: admin)<br><strong>Password</strong>: password associated with the above username<br><strong>User Endpoint</strong>: <a href="https://localhost:9444/wso2/scim/Users">https://localhost:9444/wso2/scim/Users</a><br><strong>Group Endpoint</strong>: <a href="https://localhost:9444/wso2/scim/Groups">https://localhost:9444/wso2/scim/Groups</a><br><strong>Userstore Domain</strong>: PRIMARY<br>Keep <strong>Enable Password Provisioning</strong> ticked.</pre><p><strong>2. Configure the resident service provider</strong></p><p>When configuring outbound provisioning through the management console, outbound provisioning identity provider must be configured against the resident service provider.</p><ul><li>Log into the management console of IS1.</li><li>In the Main tab, under Identity menu, click on Resident under Service Providers.</li><li>Expand the Outbound Provisioning Configuration section.</li><li>Select the identity provider you added in above step and click on the + button.</li><li>Click Update.</li></ul><p><strong>3. Test outbound provisioning</strong></p><ul><li>Log into the management console of IS1.</li><li>In the Main tab, under Identity menu, click on Add under Users and Roles. Click onAdd New User. Enter username and password and click Finish.</li><li>Log into the management console of IS2.</li><li>In the Main tab, under Identity menu, click on List under Users and Roles. Click on Users.</li><li>You will find that the user added to IS1 has been added to IS2 as well.</li></ul><h4>JIT Provisioning</h4><p>Just-In-Time provisioning provisions users to the Identity Server at the time of <a href="https://is.docs.wso2.com/en/latest/learn/identity-federation">federated authentication</a>. It is triggered when the Identity Server receives a positive authentication response from the external Identity Provider. The Identity Server provisions the user to its internal user store using the user claims of the authentication response.</p><p>Let’s consider two identity server instances as before, WSO2 Identity Server which provides JIT Provisioning as IS1 and the WSO2 Identity Server acting as the identity provider as IS2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*kCWohjRWS4kF7nSQCdTlKA.jpeg" /></figure><p>JIT Provisioning configurations can be explained under 4 major steps.</p><ol><li><strong>Configure a service provider on IS2</strong></li></ol><ul><li>Log into the management console of IS2.</li><li>In the Main tab, under Identity menu, click on Add under Service Providers. Add a unique name for the service provider and click Register.</li><li>Expand the Inbound Authentication Configurationsection and then expand the OAuth/OpenID Connect Configuration section and click Configure.</li><li>For Callback Url, add <a href="https://localhost:9443/commonauth">https://localhost:9443/commonauth</a> and click on Add.</li><li>OAuth Client Key and the OAuth Client Secret will be needed for upcoming steps.</li><li>Click Update.</li></ul><p><strong>2. Configure IS2 as an identity provider with JIT provisioning in IS1</strong></p><ul><li>Log into the management console of IS1.</li><li>In the Main tab, under Identity menu, click on Add under Identity Providers. Add a unique name for the service provider.</li><li>Expand the Federated Authenticators section and then expand the OAuth/OpenIDConnect Configuration section and enter the following values.</li></ul><pre>Tick <strong>Enable OAuth2/OpenIDConnect<br>Client Id: </strong>obtained from above step<strong><br>Client Secret: </strong>obtained from above step<br><strong>Authorization Endpoint URL: </strong><a href="https://localhost:9444/oauth2/authorize">https://localhost:9444/oauth2/authorize</a><br><strong>Token Endpoint URL: </strong><a href="https://localhost:9444/oauth2/token">https://localhost:9444/oauth2/token</a><br><strong>Callback URL: </strong><a href="https://localhost:9443/commonauth">https://localhost:9443/commonauth</a></pre><ul><li>Expand the Just-In-Time Provisioning section and select Always provision to User Store Domain. Select PRIMARY in drop-down (to provision users to the primary store) and select Provision silently (to complete provisioning process without prompting for extra details). This configuration can be changed depending on your requirement.</li><li>Click Register.</li></ul><p><strong>3. Configure a service provider in IS1 to federate authentication to IS2</strong></p><p>You can use the sample app <a href="https://github.com/wso2/samples-is/releases/download/v4.2.0/playground2.war">playground2</a> for this exercise (or you can use your own app). Deploy it in Tomcat.</p><ul><li>Log into the management console of IS1.</li><li>In the Main tab, under Identity menu, click on Add under Service Providers. Add a unique name for the service provider and click Register.</li><li>Expand the Inbound Authentication Configurationsection and then expand the OAuth/OpenID Connect Configuration section and click Configure.</li><li>For Callback Url, add <a href="http://localhost:8080/playground2/oauth2client">http://localhost:8080/playground2/oauth2client</a> and click on Add.</li><li>OAuth Client Key and the OAuth Client Secret will be needed for upcoming steps.</li><li>Expand the Local &amp; Outbound Authentication Configurationsection and then select Federated Authentication and in the drop-down, select the identity provider configured before.</li><li>Click Update.</li></ul><p><strong>4. Test JIT Provisioning</strong></p><ul><li>Add a new user in IS2.</li><li>Access the playground2 app via <a href="http://localhost:8080/playground2/oauth2.jsp">http://localhost:8080/playground2/oauth2.jsp</a>.</li><li>Add Client Id obtained from the service provider added in IS1 and click Authorize. It will redirect to the login page of IS2.</li><li>Login with the credentials of the user added to IS2.</li><li>Then, navigate to the Users section in management console of IS1. You will find that the user added to IS2 has been added to IS1 as well.</li></ul><p>Hope you got a good understanding on user provisioning with WSO2 Identity Server. Thank you for reading!</p><h4>References</h4><p>[1] <a href="https://is.docs.wso2.com/en/latest/learn/identity-provisioning/">https://is.docs.wso2.com/en/latest/learn/identity-provisioning/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56bb4e41fb8a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/user-provisioning-with-wso2-identity-server-56bb4e41fb8a">User Provisioning with WSO2 Identity Server</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to SCIM]]></title>
            <link>https://medium.com/identity-beyond-borders/a-beginners-guide-to-scim-8aade91cd644?source=rss-f1be9f1c3a63------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aade91cd644</guid>
            <category><![CDATA[wso2is]]></category>
            <category><![CDATA[user-management]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[scim]]></category>
            <dc:creator><![CDATA[Rashmini Naranpanawa]]></dc:creator>
            <pubDate>Sun, 23 May 2021 18:54:08 GMT</pubDate>
            <atom:updated>2021-05-25T17:51:36.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/923/0*wsq3XsG8yXejRPV2" /></figure><p>With the advancement in technology, a significant amount of attention should be paid to ensure security and confidentiality of users when accessing applications. Therefore, there should be a proper way to manage digital identities across multiple applications. This concept is known as user provisioning.</p><blockquote><strong>User provisioning</strong> is the process of creating and maintaining digital identities (user accounts) in one or more systems and assigning appropriate privileges to them.</blockquote><p>In traditional applications, in order to support user provisioning, it is needed to have multiple connectors for each service, thus resulting in a high cost and increased complexity. As a solution, SCIM protocol was designed which provides the ability to manage identities across various domains. <a href="https://datatracker.ietf.org/doc/html/rfc7642">RFC7642</a> defines SCIM as follows.</p><blockquote>The <strong>System for Cross-domain Identity Management (SCIM)</strong> specification is designed to manage user identity in cloud-based applications and services in a standardized way to enable interoperability, security, and scalability.</blockquote><p>In a simplified way, it supports performing a subset of HTTP methods (GET, POST, PUT, PATCH, DELETE) on identity resources such as Users and Groups, thus providing a standardized representation of those resources. Therefore, it makes it easy, fast and cheap to provide user identities into, out of and around the cloud.</p><p>Accordingly, SCIM Specification defines following two major components.</p><p>1. SCIM Core Schema (<a href="https://datatracker.ietf.org/doc/html/rfc7643">RFC7643</a>)<br>2. SCIM Protocol (<a href="https://datatracker.ietf.org/doc/html/rfc7644">RFC7644</a>)</p><p>Now let’s look at what these two are meant for and the major aspects of those.</p><h3>SCIM Core Schema</h3><p>The Core Schema provides a platform-neutral schema and an extension model for representing Users, Groups and other resource types. In SCIM, “Resource”<strong> </strong>is considered as the common denominator and all other objects are derived from that. The set of resources is defined using a set of schema URIs and a resource type. Each resource consists of three common attributes which are “id”, “externalId” and “meta”. Moreover, a resource is a collection of attributes where each attribute has an attribute name and an attribute value which can be either simple or complex. Each attribute has a set of characteristics as described below.</p><ul><li><strong>name </strong>— unique name for the attribute</li><li><strong>type</strong> — data type of the attribute, can be either “String”, “Boolean”, “Decimal”, “Integer”, “DateTime”, “Binary”, “Reference”, “Complex”</li><li><strong>multiValued </strong>— Boolean value, defines whether attribute can have multiple values</li><li><strong>description</strong> — a human-readable description of the attribute</li><li><strong>required</strong> — Boolean value, defines whether attribute is mandatory or optional</li><li><strong>caseExact</strong> — Boolean value, defines whether attribute is case-sensitive or not</li><li><strong>mutability</strong> — defines the circumstances under which the attribute can be redefined, can be either “readOnly”, “readWrite”, “immutable”, “writeOnly”</li><li><strong>returned</strong> — defines when attribute is returned in response body, can be either “always”, “never”, “default”, “request”</li><li><strong>uniqueness</strong> — defines the uniqueness of attribute value, can be either “none”, “server”, “global”</li><li><strong>subAttributes </strong>— defines only when the attribute type is “complex”</li><li><strong>canonicalValues </strong>— a collection of suggested canonical values that may be used (eg: “work” and “home” for attribute “email”)</li><li><strong>referenceTypes</strong> — a multi-valued array of JSON strings that indicates the SCIM resource types that may be referenced, applicable only when attribute type is “reference”</li></ul><p>Following is an example JSON resource structure for resourceType “User”.</p><pre>{<br>  &quot;schemas&quot;:<br>    [&quot;urn:ietf:params:scim:schemas:core:2.0:User&quot;,<br>    &quot;urn:ietf:params:scim:schemas:extension:enterprise:2.0:User&quot;<br>    ],<br>  &quot;meta&quot;: {<br>    &quot;resourceType&quot;: &quot;User&quot;,<br>    &quot;created&quot;: &quot;2021-05-23T05:50:28Z&quot;,<br>    &quot;lastModified&quot;: &quot;2021-05-23T05:50:28Z&quot;,<br>    &quot;location&quot;: &quot;https://example.com/v2/Users/229d3f0d-a07b-4052-bf4d-3071ecafed0&quot;<br>  },<br>  &quot;id&quot;: &quot;229d3f0d-a07b-4052-bf4d-3071ecafed0&quot;,<br>  &quot;externalId&quot;: &quot;736732&quot;,<br>  &quot;userName&quot;: &quot;rash&quot;,<br>  &quot;emails&quot;: [<br>    {<br>      &quot;type&quot;: &quot;home&quot;,<br>      &quot;value&quot;: &quot;rash@gmail.com&quot;,<br>      &quot;primary&quot;: true<br>    }<br>  ],<br>  &quot;urn:ietf:params:scim:schemas:extension:enterprise:2.0:User&quot;: {<br>    &quot;employeeNumber&quot;: &quot;123&quot;,<br>  }<br>}</pre><h3>SCIM Protocol</h3><p>The SCIM Protocol is an application-level, REST protocol for creation, modification, retrieval, and discovery of core identity resources. SCIM provides a rich REST API with multiple operations as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FETqVAH5aS5kqlQA.png" /></figure><p>In addition to that, SCIM protocol defines a set of endpoints for managing resources. Those endpoints are defined corresponding to the resource type. For example, “User” and “Group” resources use “/Users” and “/Groups” endpoints respectively. Furthermore, SCIM provides three endpoints “/ServiceProviderConfig”, “/ResourceTypes” and “/Schemas” to discover supported features and specific attribute details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4G4bBw7Yy1Rz2jNB.png" /></figure><p>Following is a sample request used to create a User.</p><pre>POST Users  HTTP/1.1<br>Accept: application/scim+json<br>Authorization: Bearer h480djs93hd8<br>Host: example.com<br>Content-Length: ...<br>Content-Type: application/scim+json<br><br>{<br>  &quot;schemas&quot;:[&quot;urn:ietf:params:scim:schemas:core:2.0:User&quot;],<br>  &quot;externalId&quot;:&quot;736732&quot;,<br>  &quot;userName&quot;:&quot;rash&quot;,<br>  &quot;name&quot;:{<br>    &quot;familyName&quot;:&quot;Na&quot;,<br>    &quot;givenName&quot;:&quot;Rash&quot;<br>  }<br>}</pre><p>Following will be returned in response to the above request containing the created Resource and HTTP code 201, which indicates that the Resource has been created successfully.</p><pre>HTTP/1.1 201 Created<br>Content-Type: application/scim+json<br>Location: https://example.com/v2/Users/229d3f0d-a07b-4052-bf4d-3071ecafed0<br>ETag: W/&quot;e180ee84f0671b1&quot;<br><br>{<br>  &quot;schemas&quot;:[&quot;urn:ietf:params:scim:schemas:core:2.0:User&quot;],<br>  &quot;id&quot;:&quot;229d3f0d-a07b-4052-bf4d-3071ecafed0&quot;,<br>  &quot;externalId&quot;:&quot;736732&quot;,<br>  &quot;meta&quot;:{<br>    &quot;resourceType&quot;:&quot;User&quot;,<br>    &quot;created&quot;:&quot;2021-05-23T05:50:28Z&quot;,<br>    &quot;lastModified&quot;:&quot;2021-05-23T05:50:28Z&quot;,<br>    &quot;location&quot;: &quot;https://example.com/v2/Users/229d3f0d-a07b-4052-bf4d-3071ecafed0&quot;,<br>    &quot;version&quot;:&quot;W\/\&quot;e180ee84f0671b1\&quot;&quot;<br>  },<br>  &quot;name&quot;:{<br>    &quot;familyName&quot;:&quot;Na&quot;,<br>    &quot;givenName&quot;:&quot;Rash&quot;<br>  },<br>  &quot;userName&quot;:&quot;rash&quot;<br>}</pre><p>You can find more details on SCIM REST APIs by referring to <a href="https://datatracker.ietf.org/doc/html/rfc7644">rfc7644</a> and <a href="https://is.docs.wso2.com/en/5.12.0/develop/scim2-rest-apis/#/">is.docs.wso2.com/en/5.12.0/develop/scim2-rest-apis</a>.</p><h3>WSO2 Identity Server</h3><p>There are multiple SCIM implementations available. WSO2 Inc. provides a SCIM 2.0 implementation known as <a href="https://github.com/wso2/charon">WSO2 Charon</a>. It is an open source implementation comes under Apache 2.0 license. It can be used by any one who wants to add SCIM-based provisioning support for their applications. WSO2 Charon has been integrated with WSO2 Identity Server to enable identity provisioning.</p><p>Hope this article would help you to understand the high-level concept of SCIM. Please refer following for more details.</p><p>[1] RFC7642 — SCIM: Definitions, Overview, Concepts, and Requirements — <a href="https://datatracker.ietf.org/doc/html/rfc7642">https://datatracker.ietf.org/doc/html/rfc7642</a></p><p>[2] RFC7643— SCIM: Core Schema — <a href="https://datatracker.ietf.org/doc/html/rfc7643">https://datatracker.ietf.org/doc/html/rfc7643</a></p><p>[3] RFC7644 — SCIM: Protocol — <a href="https://datatracker.ietf.org/doc/html/rfc7644">https://datatracker.ietf.org/doc/html/rfc7644</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aade91cd644" width="1" height="1" alt=""><hr><p><a href="https://medium.com/identity-beyond-borders/a-beginners-guide-to-scim-8aade91cd644">A Beginner’s Guide to SCIM</a> was originally published in <a href="https://medium.com/identity-beyond-borders">Identity Beyond Borders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>