<?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 Kaveeshapiumini on Medium]]></title>
        <description><![CDATA[Stories by Kaveeshapiumini on Medium]]></description>
        <link>https://medium.com/@kaveeshapiumini1999?source=rss-3d2217a80b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Fpc0xaLX1U9_D1jN</url>
            <title>Stories by Kaveeshapiumini on Medium</title>
            <link>https://medium.com/@kaveeshapiumini1999?source=rss-3d2217a80b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 17:06:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kaveeshapiumini1999/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[Passkeys in ThunderID]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/passkeys-in-thunderid-441393e22ae1?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/441393e22ae1</guid>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[passwordless]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[passkey]]></category>
            <category><![CDATA[password-security]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Sun, 21 Jun 2026 05:35:32 GMT</pubDate>
            <atom:updated>2026-06-21T05:35:32.871Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why the industry is walking away from passwords, what a passkey actually is, and how ThunderID lets you offer one in three different ways</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H_aKkOjfsCUR670RqSgVJA.png" /><figcaption>Title image — from passwords to passkeys</figcaption></figure><h3>The Password Was Always a Bad Idea</h3><p>The password is one of the oldest ideas in computing. It dates back to the early 1960s, when MIT’s Compatible Time-Sharing System needed a way to keep one researcher’s files separate from another’s. The solution was simple: ask the user to remember a secret, and let them in if they typed it back correctly.</p><p>Sixty years later, we are still doing exactly that, and it has aged badly. The average person now juggles dozens of accounts, and the secrets they are asked to remember have grown into a tangle of birthdays, pet names, and the same three passwords reused everywhere. Worse, the password has a structural flaw that no amount of “make it twelve characters with a symbol” advice can fix: it is a shared secret. You know it, and the website knows it. Anything that knows your secret can impersonate you, and anything that can trick you into typing it can steal it.</p><p>That single flaw is the root of most of the security incidents that make headlines. Phishing emails, fake login pages, leaked password databases, credential-stuffing attacks: they all work because somewhere, a secret that was meant to stay between you and one website ended up somewhere it shouldn’t.</p><p>Passkeys are the industry’s answer to that flaw, and they fix it at the root. ThunderID supports them natively. This article explains what a passkey is in plain language, why it matters whether you write code or sign the budget, and the three ways ThunderID lets you put one in front of your users.</p><h3>What Is a Passkey?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZu-rBNkwa4NMkoB_x5xIQ.png" /><figcaption>A passkey is a pair of keys — one stays private, one is shared</figcaption></figure><p>A passkey replaces the shared secret with a pair of mathematically linked keys. When you create a passkey for a website, your device generates two keys at once: a <strong>private key</strong> that never leaves your phone or laptop, and a <strong>public key</strong> that the website stores.</p><p>Here is the part that matters: the public key is useless to an attacker. It can verify a signature, but it cannot create one. Only the private key can sign, and the private key never travels across the internet, never lands in a database, and never gets typed into a fake login page. There is no shared secret to steal anymore.</p><p>When you sign in, the website sends your device a one-time puzzle, called a challenge. Your device unlocks the private key, but only after <em>you</em> approve it with your fingerprint, face, or device PIN, and uses it to sign the challenge. The website checks the signature against the public key it stored. If it matches, you are in. Nothing secret was ever transmitted.</p><blockquote><strong>The one-sentence version:</strong> A password is a secret you both share and can therefore both leak. A passkey is a signature only your device can make and no website can ever lose.</blockquote><h3>Passkeys in ThunderID</h3><p>ThunderID is a lightweight, open-source identity platform: the part of a product that signs users in, keeps accounts secure, and connects applications through open standards like OAuth2 and OpenID Connect. Passkeys are the newest and strongest of its passwordless sign-in options, and ThunderID supports them end to end, from creating a passkey to verifying it at login. What is worth understanding is how it hands you that capability, because there is more than one way to use it.</p><h3>Building it into your own app: two APIs</h3><p>If you want passkeys inside your own login screen, ThunderID gives you two sets of APIs to call, and the choice between them comes down to whether passkeys are the whole story or one part of a longer sign-in journey.</p><p>The first is the <strong>native passkey API</strong>. These are dedicated commands for passkeys and nothing else, and each task is just two steps, a “start” and a “finish”: one pair to set up a passkey, another to sign in with it.</p><pre># Set up a passkey            # Sign in with a passkey<br>POST /register/passkey/start  POST /auth/passkey/start<br>POST /register/passkey/finish POST /auth/passkey/finish</pre><p>This is the direct route: reach for it when passkeys are the entire sign-in step and your app is happy to drive it.</p><p>The second is the <strong>flow/execute API</strong>. Instead of calling a passkey command on its own, your app talks to a single endpoint that runs a sign-in <em>journey</em> ThunderID has been configured with, and a passkey is one step inside it.</p><pre># Drive a configured sign-in journey, step by step<br>POST /flow/execute</pre><p>The difference, in plain terms: the native API does <em>one passkey thing</em> when you ask, while flow/execute follows a <em>journey you designed</em>, where a passkey can sit next to a password, a one-time code, a consent screen, or a sign-up step. The flow option also remembers where each user is in the sequence, so your app does not have to juggle that itself. It is what lets you set up a rule like “let returning users sign in with a passkey, but fall back to a password if their device doesn’t support one yet” by arranging it rather than programming it.</p><p>Both APIs have one thing in common: <strong>you build the screen yourself</strong>. ThunderID does the heavy lifting behind the scenes, but the buttons and prompts your users see are yours to design. The app developer never touches the private key or any secret; the phone or laptop handles that part.</p><h3>Skipping the UI work: the Gate</h3><p>Some teams would rather not build and maintain login screens at all. For them, ThunderID ships with the <strong>Gate</strong>, a ready-made hosted sign-in application. Under the hood the Gate uses the very same flow/execute journeys described above, but it already provides the screens, so you get passkeys (and anything else in the journey) without designing a single page. You simply send users over to the Gate, much like clicking “Sign in with Google” takes you to a Google page and brings you back once you are done.</p><p>Because the Gate runs whatever journey you have configured, turning passkeys on becomes a setting rather than a development effort, which makes it the fastest way to get strong, modern sign-in live.</p><h3>Where this is configured</h3><p>The sign-in journeys themselves, including where a passkey step sits, are designed and assigned to each application in the <strong>ThunderID Console</strong>, the product’s admin interface. A few security essentials, such as which web addresses are allowed to use passkeys, are set once in ThunderID’s configuration file. After that, the same journey powers both your own API-driven screens and the hosted Gate; you are only choosing who renders the UI.</p><blockquote>For the full setup details, endpoint references, and sample code, see the <a href="https://thunderid.dev/docs/next/guides/key-concepts/authentication/passwordless/passkeys/">Passkeys guide in the ThunderID documentation</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BX5Z8JC_z6lxgWNR506qVQ.png" /></figure><h3>What ThunderID Does Behind the Scenes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhWyQH5-ThTOiScpn0EUTg.png" /></figure><p>A passkey feels effortless to the person using it, but a fair amount happens out of sight to keep it safe, and ThunderID takes care of that part so the applications connected to it do not have to. Passkeys also come in more than one form, and ThunderID accepts them all: the fingerprint and face sensors built into laptops and phones, and physical security keys that plug in over USB or tap over NFC, the kind some organizations hand out to staff. Whichever the user has, the device asks them to confirm with whatever they already use to unlock it, whether that is a fingerprint, a face scan, or the device’s own screen-lock PIN. That confirmation happens entirely on the device; ThunderID never sees the biometric or the PIN.</p><p>Each time someone sets up or uses a passkey, ThunderID quietly does the work that makes it trustworthy:</p><ul><li><strong>Sets a fresh one-time puzzle.</strong> Every sign-in gets a brand-new challenge, so a response captured once is worthless the next time.</li><li><strong>Holds the in-progress login only briefly.</strong> The temporary state is kept for just a couple of minutes and then expires on its own, leaving nothing lingering.</li><li><strong>Checks the signed answer is genuine.</strong> It verifies the device’s signature against the stored public key before anyone is let in.</li><li><strong>Keeps nothing secret on file.</strong> Only the public key is saved, so there is no password or private key in the database for an attacker to steal.</li><li><strong>Watches for copied or replayed keys.</strong> It tracks a usage counter on each passkey and turns away anything that looks cloned or reused.</li><li><strong>Accepts the passkey only from approved addresses.</strong> A passkey works only on the web addresses you have allowed, so it cannot be used from a look-alike site.</li></ul><p>These protections live inside ThunderID, so every application connected to it inherits them automatically. No individual team has to get the fiddly parts of passkey security right on its own. That is what makes passkeys safe to roll out across a whole business rather than one app at a time.</p><h3>Usernameless Sign-In and On-the-Fly Registration</h3><p>ThunderID supports two features that make passkeys feel even more natural in everyday use: usernameless sign-in and on-the-fly registration. Both are worth understanding, because they shape how the experience feels to a real user.</p><h3>Usernameless sign-in</h3><p>This lets a returning user sign in without typing a username or email at all. With passwords, you always have to identify yourself first and then prove who you are. A passkey already carries the account it belongs to, so ThunderID can do both at once. The user opens the login screen, the device shows the passkeys saved for that site, they pick one and confirm with a fingerprint or face, and they are in. ThunderID reads the account identity straight from the passkey.</p><p>In practice, this is what turns signing in into a single tap. It fits best when someone comes back to an app on a device they have used before, say a customer reopening a banking or shopping app: there is no email to recall and no password field, just a “Sign in” button and a fingerprint.</p><h3>On-the-fly registration</h3><p>This is about creating a passkey in the middle of something the user is already doing, instead of sending them off to a separate “set up a passkey” page. Because ThunderID builds sign-in as a sequence of steps, you can drop a “create a passkey” step wherever it makes sense in the journey.</p><p>Two moments are by far the most common. The first is right after sign-up, so a brand-new account gets a passkey immediately and the user never sets a password at all. The second is right after an existing user logs in with their password, where you can offer “Want to skip the password next time?” and create the passkey on the spot. Either way it happens in the same session, with no separate trip back later.</p><p>One detail is worth keeping straight: a passkey always belongs to a specific person, so it can only be created once ThunderID knows who the user is. That is why registration happens after sign-up or login, while signing in, as described above, can skip the username entirely.</p><h3>Why This Matters (Whether You Code or Not)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hInXqWgZaszJAy4DOZYYNw.png" /></figure><p>Step back from the mechanics, and the reason this shift is happening across the industry comes down to what changes the moment the shared secret disappears.</p><h4>Phishing simply stops working</h4><p>A passkey is cryptographically tied to the exact website it was created for. If a user lands on thund3rid-login.com instead of the real domain, their device will not offer the passkey at all, because the domains do not match. The single most common attack on the internet, tricking someone into typing their credentials on a fake page, has nothing to grab. There is no credential to type.</p><h4>There is nothing left to breach</h4><p>When a password database leaks, every account in it is at risk, and the same passwords often unlock accounts on other services. A passkey database is different: it contains only public keys. An attacker who steals the entire thing gains nothing, because public keys cannot sign anything. The blast radius of a breach shrinks dramatically.</p><h4>The experience is genuinely better</h4><p>This is the part that wins over users and, quietly, the people who measure conversion rates. Signing in with a passkey is a fingerprint touch or a glance at the camera. No password to recall, no reset email, no “your password must contain a number.” Companies that have rolled out passkeys consistently report faster sign-ins and fewer abandoned logins.</p><p>For the people who manage products and budgets rather than code, the value lands in three columns:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DMvZS13yPFVZp601EcBPtw.png" /></figure><h3>The Takeaway</h3><p>Passkeys are not a gadget or a passing trend. They are a correction to a sixty-year-old mistake: the assumption that the way to prove who you are is to share a secret. Once you stop sharing secrets and start proving identity with a signature only your device can make, an entire category of attacks loses its footing, and the experience gets easier at the same time. That combination, more secure <em>and</em> more pleasant, is rare in security, which usually trades one for the other.</p><p>ThunderID’s contribution is to make this easy to adopt regardless of where you are. If you want strong authentication today, switch on the hosted Gate. If you are building a bespoke experience, the API gives you the pieces. If your sign-in is a journey rather than a single door, the flow engine lets passkeys live alongside everything else. The hard parts, the cryptography, the standards compliance, the anti-replay and domain-binding safeguards, are handled for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=441393e22ae1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How ThunderID Uses Redis for High-Performance Identity Management]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/how-thunderid-uses-redis-for-high-performance-identity-management-c2895b8e0414?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2895b8e0414</guid>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[cache]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[database-design]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 13:15:11 GMT</pubDate>
            <atom:updated>2026-06-12T13:15:30.189Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jR9OgPnKqp5XsZ9niKpo3Q.png" /></figure><p><em>From in-memory data structure store to the backbone of a modern IAM system, and how we adapted our SQL-based runtime to make it work</em></p><h3>What Is Redis?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBrUvFnpq_z4pH5xtqb6Uw.png" /></figure><p>Redis, short for <em>Remote Dictionary Server</em>, was created by Salvatore Sanfilippo in 2009 while he was trying to solve a real-time web analytics problem. The initial version was written in C and released as open source almost immediately. What started as a side project to speed up a startup’s log ingestion quickly became one of the most widely deployed pieces of infrastructure on the internet.</p><p>The core idea was radical for its time: keep your data in RAM, not on disk, and expose it through a small set of composable data structures: strings, lists, sets, sorted sets, hashes, and bitmaps. Not a relational model. Not a document store. Just named containers of data with atomic operations on each.</p><p>Over the years Redis added persistence (RDB snapshots and AOF logs), replication, Lua scripting, Pub/Sub, Streams, Cluster mode, and most recently Redis Stack with search and graph extensions. It is now maintained by Redis Ltd. under a dual license (RSALv2 and SSPL), with Valkey as a community fork under the Linux Foundation.</p><p>Today Redis is used in three broad patterns:</p><ul><li><strong>Cache</strong> — sitting in front of a database to absorb read traffic</li><li><strong>Ephemeral store</strong> — holding data that has a natural TTL and should not occupy durable storage</li><li><strong>Message broker</strong> — using Pub/Sub or Streams for event-driven pipelines</li></ul><p>ThunderID uses the first two heavily. Here is exactly how.</p><h3>Why Identity Systems Need Redis</h3><p>Authentication and authorization are inherently stateful processes. When a user logs in through an OAuth2 flow, a chain of short-lived objects comes into existence within milliseconds:</p><ul><li>An authorization request containing the client’s parameters</li><li>A flow execution context tracking which authentication steps have been completed</li><li>A WebAuthn challenge waiting for the authenticator to respond</li><li>A single-use authorization code the client will exchange for tokens</li></ul><p>Each object has a different lifetime, from seconds to minutes, and must be consumed or discarded cleanly. Storing this kind of data in a relational database is technically correct but architecturally wrong. You get unnecessary write amplification, TTL-based cleanup jobs, table locks during high-traffic login bursts, and a permanent database table that exists purely to hold data that should vanish on its own.</p><p>Redis solves all of this natively. Keys expire automatically. Atomic operations eliminate the need for SELECT-UPDATE transactions. Memory is released the moment TTL fires. And because Redis is single-threaded in its command processing, there are no race conditions between concurrent requests fighting over the same key.</p><h3>ThunderID’s Two Roles for Redis</h3><p>ThunderID gives Redis two distinct jobs, handled by two separate subsystems:</p><ol><li><strong>Runtime store</strong> — ephemeral state management for active authentication and authorization flows</li><li><strong>Cache layer</strong> — read-through caching for configuration data that changes infrequently but is read on every request</li></ol><p>Both are optional and swappable. The runtime store falls back to SQLite; the cache layer falls back to an in-memory LRU/LFU cache. Switching either is a one-line configuration change.</p><h3>Part 1: Runtime Store — From SQL Tables to Redis Keys</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7imdd2aop5T4-2tifswMg.png" /></figure><p>ThunderID originally built its runtime store on SQLite (with PostgreSQL support for production). Every piece of ephemeral state had its own table, its own schema, and its own expiry-checking logic. Moving to Redis was not a simple find-and-replace; the mental model had to change entirely.</p><h3>What Changed: The SQL Mindset vs. The Redis Mindset</h3><p>In the SQL runtime store, expiry was an application concern. Every table had an EXPIRY_TIME column, every SELECT filtered on it, and cleanup was left to index scans and background jobs:</p><pre>-- SQL: expiry is data in a column, enforced by the application<br>CREATE TABLE &quot;AUTHORIZATION_REQUEST&quot; (<br>    AUTH_ID       VARCHAR(36)  NOT NULL,<br>    DEPLOYMENT_ID VARCHAR(255) NOT NULL,<br>    REQUEST_DATA  JSONB        NOT NULL,<br>    EXPIRY_TIME   TIMESTAMP    NOT NULL,   -- must check this on every read<br>    CREATED_AT    TIMESTAMP    NOT NULL DEFAULT CURRENT_TIMESTAMP,<br>    PRIMARY KEY (AUTH_ID, DEPLOYMENT_ID)<br>);<br>CREATE INDEX idx_authorization_request_expiry_time ON &quot;AUTHORIZATION_REQUEST&quot; (EXPIRY_TIME);</pre><p>The application would then enforce expiry manually on every read:</p><pre>-- Every GET query had to filter out expired rows<br>SELECT AUTH_ID, REQUEST_DATA FROM &quot;AUTHORIZATION_REQUEST&quot;<br>WHERE AUTH_ID = $1<br>  AND EXPIRY_TIME &gt; $2        -- application passes time.Now()<br>  AND DEPLOYMENT_ID = $3</pre><p>In Redis, expiry is infrastructure. You set a key and a TTL in the same command, and Redis handles the rest: no column, no index, no query clause, no cleanup job:</p><pre>// Redis: TTL is built into the SET command<br>err := s.client.Set(ctx, key, data, 10*time.Minute).Err()</pre><p>Every table in the SQL runtime store mapped to a key namespace in Redis. Eight SQL tables became eight key patterns under a consistent hierarchy.</p><h3>The Key Naming Convention</h3><p>SQL tables isolated deployments via a DEPLOYMENT_ID column in every primary key. Redis has no schema, so that isolation had to move into the key itself. ThunderID settled on a consistent hierarchy:</p><pre>{keyPrefix}:runtime:{deploymentID}:{dataType}:{identifier}</pre><pre>-- Examples:<br>thunderid:runtime:prod:authcode:a1b2c3d4e5f6<br>thunderid:runtime:prod:authreq:req-789-xyz<br>thunderid:runtime:prod:flow:exec-456-abc<br>thunderid:runtime:prod:par:par-123-def<br>thunderid:runtime:prod:passkey:sess-111-ghi<br>thunderid:runtime:prod:attrcache:cache-222-jkl<br>thunderid:runtime:prod:jti:assertion:jti-333-mno<br>thunderid:runtime:prod:ciba-auth-req:req-444-pqr</pre><p>A single Redis cluster can serve multiple ThunderID deployments without key collisions. The keyPrefix also allows sharing a Redis instance with other services, something impossible to do cleanly with shared SQL tables.</p><h3>Handling “Consume Once” Without Transactions</h3><p>The trickiest SQL pattern to carry over was the single-use guarantee. Authorization codes are required by RFC 6749 to be immediately invalidated the moment they are exchanged; a code used twice is a security violation. In SQL, this was handled with a conditional UPDATE:</p><pre>-- Only succeeds if the code is still ACTIVE<br>UPDATE &quot;AUTHORIZATION_CODE&quot;<br>SET    STATE = &#39;INACTIVE&#39;<br>WHERE  AUTHORIZATION_CODE = $1<br>  AND  STATE              = &#39;ACTIVE&#39;<br>  AND  DEPLOYMENT_ID      = $2</pre><p>If rowsAffected == 0, the code was already consumed or never existed. The database enforced the invariant; the application just checked the count.</p><p>Redis has no UPDATE, but its individual commands execute atomically; a concurrent request cannot interleave in the middle. ThunderID maps the same invariant onto Redis primitives and enforces the single-use contract at the command level, with no transaction overhead.</p><p>PAR requests take this even further. A Pushed Authorization Request (RFC 9126) must be consumed exactly once, retrieved and deleted in the same operation. SQL needed a SELECT, then a conditional DELETE, then a rowsAffected check to detect a lost race. Redis makes this a single command:</p><pre>val, err := s.client.GetDel(ctx, key).Result()<br>if errors.Is(err, redis.Nil) {<br>    return nil, ErrNotFound  // already consumed or never existed<br>}</pre><p>One round trip. No race window. The key is gone the moment it is read.</p><h3>Runtime Store Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXi33q5EVBYIZMKl5vsZvw.png" /></figure><h3>Part 2: Cache Layer — Configuration Data That Needs to Be Fast</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e4tsd-3wuClByIK8cEmUGg.png" /></figure><p>Beyond ephemeral auth state, there is a second problem: ThunderID reads a large volume of configuration on every single request. Before it can process a login, it needs to know the OAuth2 client’s profile, the identity provider configuration, the user’s entity record, the certificate to verify a client or provider signature with, and the flow definition to execute. These objects live in the persistent database, change rarely, but are read on every request without exception.</p><p>Hitting the database for all of them on each login adds up fast. The natural answer is caching, but the choice of where to cache matters just as much as the decision to cache at all.</p><h3>Why Redis, Not Just In-Memory</h3><p>An obvious first instinct is to cache these objects in the application’s own memory. That works perfectly on a single server. But ThunderID is designed to scale horizontally across multiple instances running behind a load balancer, each handling a slice of traffic. With in-memory caches, each instance builds its own cache independently. When an administrator updates a flow definition or rotates a certificate, only the instance that handled that write clears its cache. Every other instance keeps serving stale data until their local TTL expires.</p><p>Redis fixes this immediately. Because the cache lives outside the application process, all instances share the same view of the data. A cache invalidation on any node is a cache invalidation everywhere. There is no window where one server knows about an updated certificate and another does not.</p><p>Redis also brings the same performance characteristics that made it attractive for the runtime store: sub-millisecond reads from memory, native TTL to automatically expire stale entries, and a simple operational model: a single Redis instance can back every subsystem.</p><h3>What Gets Cached</h3><p>Six areas of the system write through to the Redis cache. Together they cover the objects that are read on every single request:</p><p><strong>Users -</strong> The user’s entity record (profile, attributes, credentials) is the most frequently accessed object in the system. Caching it in Redis means the database sees a fraction of that load, and every server instance benefits equally from a cache warm-up that happened on any other instance.</p><p><strong>OAuth2 Clients -</strong> Client configurations and OAuth profiles are looked up at the start of every authorization request. These change only when an administrator updates an application’s settings, which is rare. Redis holds them until something changes, then drops them atomically.</p><p><strong>Identity Providers -</strong> OIDC, OAuth, and social (Google, GitHub) provider configurations are read whenever a federated login is initiated. Because Redis is shared, the first instance to cache an IdP configuration benefits all instances handling subsequent logins through the same provider.</p><p><strong>Flow Definitions -</strong> Authentication flows are loaded at the start of every login or registration. On a busy deployment with multiple server instances, a single flow definition cached in Redis serves all of them, instead of each instance independently querying the database.</p><p><strong>Certificates -</strong> JWKS-based certificates registered for applications, identity providers, and OAuth clients are fetched whenever an inbound signature must be verified: a client assertion, a signed request object, or a federated token. Redis keeps them live for the duration of their TTL across the entire deployment, not just on the instance that first loaded them.</p><p><strong>Entity Types -</strong> The schema definitions that govern user attributes virtually never change in a running deployment. Once cached in Redis, they stay there and serve every instance until explicitly invalidated.</p><h3>Configuration</h3><p>The two subsystems are configured independently. The runtime store is enabled by switching the runtime database type under database.runtime in your deployment configuration:</p><pre>database:<br>  runtime:<br>    type: redis<br>    redis:<br>      address: &quot;localhost:6379&quot;<br>      key_prefix: &quot;thunderid&quot;<br>      db: 0</pre><p>The cache layer has its own configuration block where you choose the backend and set the TTL:</p><pre>cache:<br>  type: redis     # or &quot;inmemory&quot;<br>  ttl: 300        # seconds</pre><p>Both can point to the same Redis instance, and typically do in production, but they are configured and managed independently. The strict key namespacing ensures there is no collision between runtime keys and cache keys, and between different deployments sharing the same Redis server.</p><h3>Conclusion</h3><p>ThunderID’s Redis integration reflects a straightforward principle: use the right store for the right data lifecycle. Short-lived auth state belongs in a store where expiry is a first-class primitive, not an application concern. Frequently read configuration belongs in a cache that absorbs read traffic without burdening the database.</p><p>Moving from SQL tables to Redis keys was not just a performance optimization; it changed how the code reasons about time and atomicity. TTL stopped being a column to filter and became infrastructure. Consume-once patterns stopped requiring SELECT-UPDATE transactions and became single commands or short Lua scripts. The result is a runtime layer that is faster, simpler, and honest about what it is storing: data that is meant to be temporary.</p><p>If you are running ThunderID in a distributed environment, enabling Redis is the single configuration change that moves you from single-node simplicity to production-scale readiness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2895b8e0414" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three Data Planes of an IAM Product: Config DB, User DB, and Runtime DB in ThunderID]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/three-data-planes-of-an-iam-product-config-db-user-db-and-runtime-db-in-thunderid-818920ddcb84?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/818920ddcb84</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[identity-management]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 11:46:37 GMT</pubDate>
            <atom:updated>2026-06-12T11:46:37.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QPZm_j5VkhSH0BBntUbscg.png" /></figure><p>Identity and Access Management (IAM) platforms are often treated like “just another web application with a database.” In practice, IAM systems are fundamentally different. An IAM platform simultaneously handles:</p><ul><li>Durable control-plane configuration</li><li>Long-lived identity records</li><li>High-churn runtime authentication state</li></ul><p>These workloads behave very differently under scale, failure, and operational pressure.</p><p>A modern IAM architecture therefore benefits from a key design principle: <em>Different classes of identity data deserve different persistence strategies.</em></p><p>In ThunderID, this principle is implemented through three logical data planes:</p><ol><li><strong>Config DB</strong></li><li><strong>User DB</strong></li><li><strong>Runtime DB</strong></li></ol><p>This separation is not merely an implementation detail. It is an architectural boundary that directly impacts scalability, resilience, and operational simplicity.</p><h3>Why IAM Data Is Fundamentally Different</h3><p>Many applications can operate for years with a single persistence model. IAM systems rarely can.</p><p>An identity platform combines workloads with completely different characteristics:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*b1MXj0AuoleRvJRygjqdVw.png" /></figure><p>Each category of IAM data comes with its own set of requirements, ranging from how it scales and how long it needs to be retained, to how it should be indexed, recovered, and how much failure it can tolerate.</p><p>When these fundamentally different concerns are forced into a single storage model, problems tend to surface quickly. Unrelated workloads become operationally coupled, database tuning turns into a series of compromises, and migrations grow large and risky. Runtime spikes can begin to impact durable identity operations, while background cleanup tasks end up competing with business-critical queries.</p><p>ThunderID addresses these challenges by making the separation of data planes explicit.</p><h3>The Three Data Planes in ThunderID</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntMlRsJhkqZ4WR16CgyubQ.png" /></figure><h4>1. Config DB -&gt; The Control Plane</h4><p>The Config DB stores identity system configuration and governance-related artifacts.</p><p><strong>Typical Contents — </strong>Applications, Authentication &amp; Registration flows, Roles and Authorization definitions, Identity Provider metadata</p><p><strong>Characteristics — </strong>Read-heavy workload, Low write frequency, Strong consistency expectations, Governance-oriented lifecycle</p><p><strong>Why It Matters</strong></p><p>Configuration changes are infrequent but highly sensitive. A malformed flow definition or incorrect identity provider configuration can affect entire authentication journeys.</p><p>Separating configuration storage allows for safer migrations by isolating changes from other data concerns, enables controlled deployment workflows with clearer governance, supports stable query optimization without interference from high-churn workloads, and improves auditing and rollback capabilities by keeping configuration changes predictable and well-scoped.</p><h4>2. User DB -&gt; The Identity Plane</h4><p>The User DB stores durable identity records and profile-related information.</p><p><strong>Typical Contents — </strong>Users, Groups, User attributes, Identity association, Provisioned identities</p><p><strong>Characteristics — </strong>Business-critical durable records, Moderate read/write profile, Audit-sensitive, Compliance-sensitive</p><p><strong>Why It Matters</strong></p><p>User data serves as the “source of identity truth” in an IAM system, so it must be handled with a high degree of care.</p><p>It requires strong transactional integrity, well-defined backup and restore processes, clear governance and retention policies, and predictable schema evolution. Unlike runtime authentication state, which is temporary by nature, identity records need to remain durable, consistent, and reliable over long periods of time.</p><h4>3. Runtime DB — The Execution Plane</h4><p>The Runtime DB handles temporary execution and protocol state generated during authentication flows.</p><p><strong>Typical Runtime Artifacts — </strong>Flow contexts, Authorization requests and codes, WebAuthn sessions, Expirable runtime caches</p><p><strong>Characteristics — </strong>High write/delete frequency, Short-lived records, Expiry-driven lifecycle, Throughput and latency sensitive</p><p><strong>Why It Matters</strong></p><p>Authentication traffic is bursty by nature. Login storms, token exchanges, and protocol callbacks can generate large volumes of short-lived state, creating a level of churn that is very different from durable identity storage.</p><p>To handle this effectively, ThunderID isolates runtime state into a dedicated plane designed for high throughput, fast expiry, and low-latency execution. This separation also allows the runtime layer to scale independently based on traffic patterns.</p><p>Depending on the deployment topology, runtime persistence can be backed by <em>SQL or Redis-style storage</em>, giving teams the flexibility to choose what best fits their operational needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DoxTl9P4UueWY3nc_btXTQ.png" /><figcaption>Diagram: ThunderID Data Plane Classification</figcaption></figure><h3>How Authentication Traverses the Three Planes</h3><p>During authentication, ThunderID interacts with all three planes simultaneously.</p><p>A typical authentication journey looks like this:</p><ol><li>Load configuration from the Config DB</li><li>Resolve or provision users through the User DB</li><li>Persist temporary execution state in the Runtime DB</li></ol><p>This separation keeps each concern isolated while allowing the authentication engine to coordinate them efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4EratRwUcEwk1yDROaHM8w.png" /><figcaption>Diagram: Authentication Flow Through Data Planes</figcaption></figure><h3>Final Takeaway</h3><p>Designing IAM systems around a single storage model may seem simple, but it often pushes complexity into scaling, operations, and reliability later on. ThunderID’s separation into Config, User, and Runtime data planes takes a different approach by aligning storage with how data actually behaves.</p><p>Each plane can scale and operate independently: configuration remains stable and governed, user data stays consistent and durable, and runtime state handles high-churn, low-latency workloads efficiently. This separation also simplifies migrations and day-2 operations, allowing teams to evolve parts of the system without risking the whole.</p><p>Beyond infrastructure, these boundaries shape how features are built; from flow execution and caching to provisioning, keeping temporary state and long-term identity clearly separated.</p><p>The result is not just cleaner architecture, but a more resilient IAM system: one that scales predictably, isolates failures effectively, and adapts safely over time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=818920ddcb84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Article 3: PKCE — The “Secret Handshake” for Modern Apps]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/article-3-pkce-the-secret-handshake-for-modern-apps-7d393cc169ce?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d393cc169ce</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[pkce]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 08:57:37 GMT</pubDate>
            <atom:updated>2026-01-20T09:00:44.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPz_CsMqBAydb8zq5ZUYag.png" /></figure><h3>Article 3: PKCE — The “Secret Handshake” for Modern Apps</h3><p>In the last article, we looked at the <strong>Authorization Code Flow</strong>. It works great for traditional web apps where the “Client Secret” can be hidden safely on a server.</p><p>But what if your app is a <strong>Mobile App</strong> or a <strong>Single Page App (SPA)</strong> like React or Vue? In these cases, the code is running on the user’s device. There is no “secret” place to hide a password — any curious user can just “View Source” or decompile the app and find your Client Secret.</p><p>This is where <strong>PKCE</strong> (Proof Key for Code Exchange, pronounced <em>pixie</em>) comes in. It replaces a static, shared secret with a dynamic, one-time secret.</p><h3>The Problem: The “Code Interception” Attack</h3><p>Before PKCE, a malicious app on a user’s phone could register itself to handle the same redirect URI as your legitimate app (e.g., com.myapp.auth://callback).</p><ol><li>The legitimate app starts the login.</li><li>The browser redirects back to the phone with the <strong>Auth Code</strong>.</li><li>The <strong>Malicious App</strong> intercepts that code.</li><li>Because there is no client_secret required for public apps, the Malicious App sends the code to the Auth Server and gets the <strong>Access Token</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTEvOek2qNpbyax9DoGdKw.jpeg" /><figcaption>The Mobile Code Hijacker</figcaption></figure><h3>The Solution: PKCE (The Cryptographic Handshake)</h3><p>PKCE ensures that the entity that started the flow is the same entity that finishes it. It does this using three variables:</p><h4>1. The Code Verifier (The Secret)</h4><p>The app generates a random, high-entropy string (between 43 and 128 characters).</p><ul><li><strong>Think of this as:</strong> A temporary, one-time password created on the fly.</li></ul><h4>2. The Code Challenge (The Riddle)</h4><p>The app takes the Code Verifier and transforms it using a cryptographic hash (usually SHA-256).</p><p><strong>The Math:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lpRVQN2a-uvMhowfOILvbw.png" /></figure><p><strong>Why this works:</strong> Hashing is a one-way street. You can easily turn a Verifier into a Challenge, but it is mathematically impossible to reverse-engineer a Challenge back into a Verifier.</p><h4>3. The Code Challenge Method</h4><p>This tells the server how the riddle was made. In modern security, this is almost always <strong>S256</strong>.</p><h3>The Technical Terms at a Glance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CshJq2Gv_vC7c4X5X5dPlg.png" /></figure><h3>The Step-by-Step PKCE “Dance”</h3><h4>Step 1: The Request (Sending the Lock)</h4><p>When the app redirects the user to the Auth Server, it doesn’t just send the Client ID. It sends the <strong>Code Challenge</strong> and the <strong>Method</strong>.</p><blockquote><strong><em>Auth Server Logic:</em></strong><em> </em>“Okay, I’ll remember this Challenge (the lock). I’ll wait for someone to show up with the Verifier (the key) later.”</blockquote><h4>Step 2: The Code Delivery</h4><p>The Auth Server sends the <strong>Auth Code</strong> back to the app via the browser (the “public street”). Even if a hijacker steals this code, they are missing the secret Verifier required to use it.</p><h4>Step 3: The Exchange (Proving Possession)</h4><p>The app sends the <strong>Auth Code</strong> PLUS the original <strong>Code Verifier</strong> to the Auth Server via a secure, private Back Channel.</p><h4>Step 4: The Verification</h4><p>The Auth Server performs the final calculation. It takes the Verifier provided in Step 3 and runs the hash algorithm again.</p><p>The Final Check:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8CVQ5oDpXkQai4cFMGKHFw.png" /></figure><p>If the math matches, the server knows this is the legitimate app that started the request, and it finally issues the <strong>Access Token</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PikTIlAypl0UFrD8KpfApQ.png" /><figcaption>The PKCE “Proof of Possession” Diagram</figcaption></figure><h3>Why SHA-256?</h3><p>You might wonder why we don’t just send the Verifier both times.</p><p>If a hacker is monitoring the Front Channel (the browser URL), they would see the Verifier in Step 1. By sending only the hashed version (the Challenge) in the URL, the “Secret” remains hidden in the app’s memory and is only sent over the encrypted Back Channel (HTTPS) at the very last second.</p><h3>Why PKCE is the New Standard</h3><p>While PKCE was invented for mobile apps, the security community realized it’s just a better way to do things. In the upcoming <strong>OAuth 2.1</strong> specification, PKCE is <strong>mandatory</strong> for all apps — even secure server-side ones. It prevents a whole class of “Injection” attacks that a static secret can’t stop.</p><h3>What you’ve learned so far:</h3><ul><li>Why “Public Clients” (Mobile/SPAs) can’t keep secrets.</li><li>How a <strong>Code Verifier</strong> and <strong>Code Challenge</strong> work together.</li><li>Why PKCE is now the gold standard for all OAuth 2.0 flows.</li></ul><p>In the next article, we will go look at the <strong>Tokens, Scopes, and Claims</strong>, where we tear apart a JWT to see what’s actually inside</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d393cc169ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Article 2: The Authorization Code Flow — The “Secret Handshake”]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/article-2-the-authorization-code-flow-the-secret-handshake-0fcde9cb06d2?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fcde9cb06d2</guid>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[authorization-code]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 05:40:01 GMT</pubDate>
            <atom:updated>2026-01-19T05:40:01.331Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMPm6BKOclGLxQcxF1xQvA.png" /></figure><h3>Article 2: The Authorization Code Flow — The “Secret Handshake”</h3><p>In the previous article, we established that OAuth 2.0 is like a valet key. But how does that key actually get created and handed over?</p><p>The <strong>Authorization Code Flow</strong> is the most widely used “dance” in OAuth. If you’ve ever clicked “Log in with Google” and been redirected to a Google page before returning to your app, you’ve performed this flow.</p><h3>Why can’t the app just ask for the token directly?</h3><p>Imagine if the valet asked for your key, and you handed it to them on a public street where anyone could snatch it. That’s a security risk. In the digital world, the user’s browser (the <strong>Front Channel</strong>) is that “public street.” It is easily observable and less secure.</p><p>To solve this, OAuth 2.0 uses a two-step process:</p><ol><li><strong>The Front Channel:</strong> A temporary “one-time use” code is sent through the browser.</li><li><strong>The Back Channel:</strong> The app exchanges that code for the actual “Valet Key” (Access Token) over a secure, private server-to-server connection.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*wxKilst0JORDJgzICswBzw.jpeg" /><figcaption>Front Channel vs. Back Channel</figcaption></figure><h3>The Step-by-Step Sequence</h3><p>Let’s break down the “Handshake” between your App, the User, and the Authorization Server (e.g., GitHub).</p><ol><li><strong>The Request:</strong> The user clicks “Connect to GitHub.” The App redirects the user to GitHub with a list of requested permissions (Scopes).</li><li><strong>The Consent:</strong> The user logs into GitHub and clicks “Authorize.”</li><li><strong>The Delivery:</strong> GitHub sends the user back to the App with a temporary <strong>Authorization Code</strong> attached to the URL.</li><li><strong>The Exchange (The Secret Part):</strong> The App’s server takes that code and sends it back to GitHub’s server privately, along with a “Client Secret” (a password only the app knows).</li><li><strong>The Reward:</strong> GitHub verifies the code and secret, then issues the <strong>Access Token</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CmB5jMn2tzGuh1c4xbFWxQ.png" /><figcaption>The Authorization Code Sequence Diagram</figcaption></figure><h3>Why is this the “Gold Standard”?</h3><p>By using this flow, the sensitive Access Token never touches the browser’s history or address bar. Even if a hacker is watching the user’s browser, all they see is a temporary code that is useless without the App’s “Client Secret.”</p><blockquote><em>In modern web development, we almost always add an extra layer of security called </em><strong><em>PKCE</em></strong><em> to this flow. We’ll dive into that in the next article.</em></blockquote><h3>What you’ve learned so far:</h3><ul><li>The difference between the <strong>Front Channel</strong> (Browser) and <strong>Back Channel</strong> (Server).</li><li>Why we use a temporary “Code” before getting the actual “Token.”</li><li>How the Client Secret keeps the exchange secure.</li></ul><p>In the next article, we will look at the Proof Key for Code Exchange (PKCE) and why the standard Authorization Code flow wasn’t enough for public clients.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fcde9cb06d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Article 1: The Valet Key Analogy — Why OAuth 2.0 Exists]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/article-1-the-valet-key-analogy-why-oauth-2-0-exists-03b540dcffe4?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/03b540dcffe4</guid>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[oauth2]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 05:13:11 GMT</pubDate>
            <atom:updated>2026-01-19T05:13:11.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BT8m1McVNL-O_x8RvlIHUw.png" /></figure><h3>Article 1: The Valet Key Analogy — Why OAuth 2.0 Exists</h3><p>If you’ve ever used your Google account to log into Spotify or allowed a third-party app to post to your X (formerly Twitter) feed, you’ve used OAuth 2.0. But for many developers, the actual specification feels like a dense forest of academic jargon.</p><p>Before we look at headers or tokens, we need to understand the fundamental problem OAuth was designed to solve.</p><h3>The “Password Sharing” Nightmare</h3><p>Imagine you hire a valet to park your car. To let them drive it, you could give them your entire keychain — the one that includes your house keys, office keys, and mailbox keys.</p><p><strong>This is a disaster waiting to happen because:</strong></p><ul><li>The valet now has access to your house.</li><li>You can’t revoke the valet’s access without changing <em>all</em> your locks.</li><li>You have no way of knowing if the valet made copies of your keys.</li></ul><p>In the early days of the web, this is exactly how apps worked. If a printing service wanted to access your Google Photos, you had to give that service your <strong>actual Google username and password.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*se3R49l-ovvNBymkMnZFbQ.jpeg" /><figcaption>The Security Risk of Credential Sharing</figcaption></figure><h3>The Solution: The Valet Key</h3><p>Modern cars come with a “Valet Key.” This special key allows the holder to drive the car a short distance and lock/unlock the driver’s side door, but it <strong>cannot</strong> open the trunk or the glovebox.</p><p><strong>OAuth 2.0 is the Valet Key of the internet.</strong> It allows you (the owner) to give a third-party app (the valet) a limited “key” (an <em>Access Token</em>) to perform specific tasks on your behalf, without ever handing over your master password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8oBLzctPB2Mp5tZ3JWHIgw.png" /></figure><h3>The Four Roles of OAuth 2.0</h3><p>To understand the “dance” of OAuth, you need to recognize the four players involved. Let’s map them back to our car analogy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*10FOu7uj0-cgiVacf5aWmQ.png" /><figcaption>The Four Roles of OAuth 2.0</figcaption></figure><h3>Why This Matters</h3><p>By separating the <strong>Authorization Server</strong> (the one who gives the key) from the <strong>Resource Server</strong> (the one who holds the data), we achieve three things:</p><ol><li><strong>Limited Scope:</strong> The “key” only works for specific things (e.g., “view photos” but not “delete photos”).</li><li><strong>Revocability:</strong> You can click “Logout of all devices” or “Revoke App Access” in your Google settings, and that specific valet key becomes useless immediately.</li><li><strong>No Credential Exposure:</strong> The Client (the app) never sees your password. It only ever handles the token.</li></ol><blockquote><strong><em>Key Takeaway:</em></strong><em> OAuth 2.0 is not about </em>authentication<em> (proving who you are); it is about </em><strong><em>delegated authorization</em></strong><em> (giving someone permission to act on your behalf).</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vbl08jpuP7htMzi2uTYU4g.jpeg" /><figcaption>JWT Anatonmy</figcaption></figure><h3>What you’ve learned so far:</h3><ul><li>Why sharing passwords with third-party apps is a security flaw.</li><li>How the Valet Key analogy simplifies delegated access.</li><li>The four specific roles required for an OAuth transaction.</li></ul><p>In the next article, we will go under the hood and look at the <strong>Authorization Code Flow</strong> — the step-by-step “handshake” that makes this magic happen.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03b540dcffe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How CAPTCHA Works]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/how-captcha-works-78e39d40efb1?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/78e39d40efb1</guid>
            <category><![CDATA[bot-detection]]></category>
            <category><![CDATA[captcha]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[access-management]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 18:28:47 GMT</pubDate>
            <atom:updated>2026-01-07T18:28:47.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q-YX3EXlEqOlxLAPj1DNFA.jpeg" /><figcaption>How CAPTCHA works</figcaption></figure><p>You’ve seen it a hundred times: “Click all the images with traffic lights” or the simple checkbox that says “I’m not a robot.”</p><p>But have you ever stopped to wonder what’s <em>really</em> going on?</p><p>In this article, we take a <strong>comprehensive look into how CAPTCHA systems work</strong> — from <strong>how they detect bots</strong>, to <strong>how they inform your browser</strong>, to <strong>why your backend needs to call the CAPTCHA provider to finalize verification</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08kKyCgfke6_T58kH3Wz0g.jpeg" /></figure><p>Whether you’re a developer, a curious techie, or just someone tired of picking out buses from pictures, here’s a deep dive into one of the most widely-used security tools online.</p><h3>What is CAPTCHA?</h3><p><strong>CAPTCHA</strong> stands for:</p><blockquote><strong>C</strong>ompletely <strong>A</strong>utomated <strong>P</strong>ublic <strong>T</strong>uring test to tell <strong>C</strong>omputers and <strong>H</strong>umans <strong>A</strong>part</blockquote><p>It’s a gatekeeper that websites use to differentiate between real human users and bots. Bots are often programmed to:</p><ul><li>Create fake accounts</li><li>Scrape content</li><li>Spam forms or comment sections</li><li>Launch brute force attacks</li></ul><p>CAPTCHAs help to <strong>block these automated threats</strong> by presenting challenges that are easy for humans, but hard for scripts.</p><h3>The Different Types of CAPTCHA</h3><p>CAPTCHAs have evolved significantly over the years:</p><ol><li><strong>Text CAPTCHA — </strong>Users type distorted letters or numbers. Early and easy for bots to crack with OCR.</li><li><strong>Image CAPTCHA — </strong>Users click on all the images of buses, bicycles, or fire hydrants. Harder for bots without advanced image recognition.</li><li><strong>Checkbox CAPTCHA — </strong>The famous “I’m not a robot” checkbox. Behind the scenes, it tracks your behavior before and after clicking.</li><li><strong>Invisible CAPTCHA — </strong>No user interaction. It evaluates your behavior silently and scores your likelihood of being human.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wuUDwGbAk5Jw-Q2MOJHpaw.jpeg" /><figcaption>Different Types of CAPTCHA</figcaption></figure><h3>How CAPTCHA Detects Bots</h3><p>So how does CAPTCHA know who’s a human and who’s not? Let’s break down the <strong>main methods used to detect bots.</strong></p><h4><strong>User Behavior Analysis</strong></h4><p>Bots and humans interact with websites <strong>differently</strong>.</p><ul><li>Humans move the mouse with tiny jitters, hesitations, and loops.</li><li>Bots often go straight from point A to B.</li><li>Typing patterns, scroll speeds, click delays — all are measured.</li></ul><p>CAPTCHAs use <strong>JavaScript on the client side</strong> to monitor:</p><ul><li>Mouse movements</li><li>Scrolling and clicking behavior</li><li>Time taken to fill fields</li><li>Focus/blur events (did the user leave the tab?)</li><li>Touch events (for mobile)</li></ul><p>These cues are compared to known human behavior models. Bots often reveal themselves by being too perfect or too robotic.</p><h4><strong>Device and Environment Fingerprinting</strong></h4><p>CAPTCHA collects <strong>system and browser data</strong>, like:</p><ul><li>Browser user agent</li><li>Screen resolution</li><li>OS type and version</li><li>Language settings</li><li>Timezone</li><li>Plugins, fonts</li><li>Whether cookies or JavaScript are enabled</li><li>WebGL and Canvas fingerprinting</li></ul><p>All of this is used to generate a <strong>browser fingerprint</strong>. If your setup looks suspiciously unusual or is associated with abuse patterns, it may flag you.</p><h4><strong>IP Reputation and Location</strong></h4><p>Your <strong>IP address</strong> plays a big role. CAPTCHA providers maintain huge IP reputation databases.</p><ul><li>Are you on a known VPN or proxy?</li><li>Is your IP block associated with spam or brute force attacks?</li><li>Have you recently solved CAPTCHAs successfully?</li></ul><p>Suspicious IPs are more likely to trigger challenges.</p><h4><strong>Machine Learning and Scoring (Invisible CAPTCHA)</strong></h4><p>In newer systems, there is no user challenge at all. Instead, the system returns a <strong>score </strong>for example between 0.0 (bot) and 1.0 (human).</p><p>This score is calculated using all the above factors and more.</p><ul><li>A user with realistic behavior, clean fingerprint, and good IP → high score (likely human)</li><li>Headless browser, instant typing, VPN, weird screen size → low score (likely bot)</li></ul><p>You can configure your backend to decide what to do with different scores (e.g., let in, block, or show an additional CAPTCHA).</p><h3>How CAPTCHA Communicates with the Browser</h3><p>When a CAPTCHA is embedded on your site, here’s what happens:</p><h4><strong>CAPTCHA Script Loads</strong></h4><p>Your site loads the CAPTCHA provider’s JavaScript (e.g., <a href="https://www.google.com/recaptcha/api.js).">https://www.google.com/recaptcha/api.js).</a></p><p>This script:</p><ul><li>Collects all the behavioral and fingerprinting data</li><li>Renders the widget (if visible)</li><li>Interacts with the user</li></ul><h4><strong>Token Is Generated</strong></h4><p>Once the CAPTCHA is completed (either by clicking, solving, or silently in v3), the provider sends back a <strong>token</strong> — a cryptographic string that represents the result.</p><p>This token contains:</p><ul><li>A timestamp</li><li>Site key (public)</li><li>Token ID</li><li>Encrypted verification info</li></ul><p>It’s stored temporarily in your browser — often as a hidden input in a form or a JavaScript variable.</p><p>But here’s the <strong>crucial part</strong>: this token <strong>does not confirm anything on its own</strong>.</p><h3><strong>Why a Verification Call to the Backend Is Critical</strong></h3><p>Once the user submits a form (like login or sign-up), the CAPTCHA token is sent along with the request to your <strong>backend</strong>.</p><p>Your backend must then:</p><p><strong>Call the CAPTCHA provider’s verification API</strong></p><p>Example: <a href="https://www.google.com/recaptcha/api/siteverify">https://www.google.com/recaptcha/api/siteverify</a></p><p><strong>Include your secret key</strong> (kept private on the server)</p><p><strong>Pass the token received from the browser</strong></p><p>The CAPTCHA provider responds with:</p><ul><li>A success flag</li><li>A score (for some captcha providers)</li><li>Action name (to prevent token reuse)</li><li>Timestamp</li><li>Error codes if something went wrong</li></ul><p><em>Example (Google reCAPTCHA v2/v3):</em></p><pre>{<br>  &quot;success&quot;: true,<br>  &quot;score&quot;: 0.9,<br>  &quot;action&quot;: &quot;login&quot;,<br>  &quot;challenge_ts&quot;: &quot;2025-05-14T14:30:42Z&quot;,<br>  &quot;hostname&quot;: &quot;example.com&quot;<br>}</pre><p>If success is true and the score is high enough (say &gt; 0.5 ; this value is configurable), your backend can proceed.</p><p>If not, you can reject the request or show another CAPTCHA.</p><h3>Sample Flow Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AcVQJQ81uiSHVS07BezNiw.jpeg" /><figcaption>CAPTCHA Flow Diagram</figcaption></figure><h3>Real-World CAPTCHA Providers</h3><p>Here are a few popular CAPTCHA solutions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbCwW7rqDEFIGQX-pJUQrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*q3Iwm89X4FjGcSC2d4Q3nQ.jpeg" /><figcaption>CAPTCHA Providers</figcaption></figure><h3>Final Thoughts</h3><p>CAPTCHAs are much more sophisticated than they seem. What started as distorted text has evolved into <strong>behavioral AI systems</strong> that observe every nuance of your interaction.</p><p>Understanding <strong>how CAPTCHA detects bots</strong>, <strong>how it interacts with the browser</strong>, and <strong>why backend verification is essential</strong> empowers you to build more secure, bot-resistant applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1VjVKtwzno4b1TNpqsf_Q.jpeg" /></figure><p>And next time you click <em>“I’m not a robot”</em>, you’ll know it’s not magic — it’s a smart mix of data analysis, browser profiling, and encrypted verification.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78e39d40efb1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How AI is Transforming Identity and Access Management: Smarter Security for a Digital Future]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/how-ai-is-transforming-identity-and-access-management-smarter-security-for-a-digital-future-da2f8577792a?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/da2f8577792a</guid>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Sat, 03 May 2025 19:38:38 GMT</pubDate>
            <atom:updated>2025-07-15T13:30:16.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8iHpfsZXTKY8ZCMO7Egx9A.png" /><figcaption>Title Image</figcaption></figure><h3>🔐 How AI is Transforming Identity and Access Management: Smarter Security for a Digital Future</h3><p><em>This article summarizes findings from three research publications, presenting them in an accessible format to share key insights with a broader audience beyond academia.</em></p><p>As organizations continue to digitize operations, embrace remote work, and adopt cloud-based systems, one crucial concern rises above all: <strong>How do we control who has access to what?</strong></p><p>Enter <strong>AI-enhanced Identity and Access Management (IAM)</strong> — a new frontier in cybersecurity that doesn’t just monitor threats but <em>predicts, adapts,</em> and <em>automates</em> responses to them in real-time.</p><p>This article explores the exciting transformation of IAM systems through artificial intelligence, the cutting-edge applications making it possible, and the challenges organizations must overcome to adopt them successfully.</p><h3>The IAM Challenge in a Hyperconnected World</h3><p>In today’s digital landscape, enterprise systems are more interconnected than ever before. This interconnectivity improves productivity — but it also expands the attack surface for cybercriminals.</p><p>Traditional IAM systems, which rely on static policies and rule-based controls, are increasingly falling short. With the rise of cyberattacks, BYOD policies, and global remote workforces, there’s a growing need for <strong>adaptive, real-time access control</strong>.</p><p>AI integration fills this gap, enabling IAM systems to evolve into intelligent gatekeepers that learn, adapt, and respond to threats dynamically.</p><h3>AI in IAM: From Static Policies to Smart Protection</h3><p>AI revolutionizes IAM by introducing a layer of intelligence that helps systems:</p><ul><li><strong>Predict threats before they happen</strong></li><li><strong>Detect unusual access behavior in real time</strong></li><li><strong>Continuously authenticate users</strong></li><li><strong>Respond automatically to anomalies</strong></li></ul><p>Let’s break down some of the most exciting applications driving this transformation.</p><h3>Key AI Applications Enhancing IAM</h3><h4>1. <strong>Behavioral Analytics</strong></h4><p>AI models build user behavior profiles based on login times, devices used, locations, and activity patterns. When something deviates — like an odd login time or access from a new location — alerts are triggered or access is limited.</p><h4>2. <strong>Anomaly Detection</strong></h4><p>Machine learning algorithms detect irregularities in how users interact with systems. Unlike traditional IAM, which follows static rules, AI understands <em>context</em> and flags behavior outside of the norm.</p><h4>3. <strong>Adaptive Access Control</strong></h4><p>AI doesn’t treat every login the same. If someone tries to log in from an unfamiliar device or IP address, the system might demand multi-factor authentication (MFA) or deny access altogether — automatically.</p><h4>4. <strong>Continuous Authentication</strong></h4><p>Instead of authenticating only at login, AI systems monitor user behavior throughout a session. If the behavior changes — say a sudden download of sensitive data or strange navigation — the system can revoke access in real-time.</p><h4>5. <strong>Predictive Threat Modeling</strong></h4><p>By analyzing historical data, AI can forecast potential breaches before they occur. Think of it like predictive policing, but for cybersecurity.</p><h4>6. <strong>Automated Response</strong></h4><p>AI doesn’t just detect threats — it <em>acts</em>. Whether it’s suspending access, escalating privileges, or locking accounts, AI systems take action instantly to minimize damage.</p><h3>What the Research Tells Us</h3><p>A systematic review of 320 academic papers (reduced to 45 high-quality studies) revealed that AI-driven IAM systems consistently outperform traditional models in:</p><ul><li><strong>Accuracy:</strong> Fewer false positives and missed threats</li><li><strong>Scalability:</strong> Efficient management of growing user and device networks</li><li><strong>Adaptability:</strong> Real-time adjustments to dynamic risk contexts</li></ul><p>Industries like finance, healthcare, and cloud computing have already adopted AI-enhanced IAM to boost security and user experience.</p><h3>The Roadblocks: Challenges of Integrating AI into IAM</h3><p>As powerful as AI is, integrating it into IAM systems is no walk in the park. Here are some key challenges:</p><h4>1. <strong>Hardware Demands</strong></h4><p>AI algorithms require significant processing power. Not all organizations have the infrastructure to support these technologies out of the box.</p><h4>2. <strong>Lack of Standardized Software</strong></h4><p>Without common standards, integrating AI with legacy IAM platforms can be messy and error-prone.</p><h4>3. <strong>Training and Adoption</strong></h4><p>AI-based systems often require new skills to manage and interpret results. Without adequate training, end users and administrators may struggle to adapt.</p><h4>4. <strong>Operational Costs</strong></h4><p>Building, deploying, and maintaining AI-driven IAM systems isn’t cheap. For smaller organizations, the cost can be prohibitive.</p><h4>5. <strong>Data Management</strong></h4><p>AI systems need vast amounts of data for training. Managing, storing, and protecting that data — especially in regulated industries — is a complex task.</p><h4>6. <strong>Ethical Concerns and Bias</strong></h4><p>If AI models are trained on biased data, they can make discriminatory or incorrect access decisions. Ensuring fairness and transparency in AI decision-making is critical.</p><h3>What’s Next? The Future of AI in IAM</h3><p>The future of IAM lies in the intersection of <strong>AI</strong>, <strong>edge computing</strong>, and <strong>decentralized identity systems</strong>. Some promising directions include:</p><ul><li><strong>Explainable AI (XAI):</strong> Helping users understand <em>why</em> access was granted or denied</li><li><strong>Federated Learning:</strong> Training AI models across decentralized environments without compromising data privacy</li><li><strong>Zero Trust Architecture:</strong> Continuous verification rather than implicit trust in users or devices</li><li><strong>Blockchain Integration:</strong> Enhancing identity verification with tamper-proof, decentralized identity ledgers</li></ul><h3>Reflection</h3><p>Artificial Intelligence is not just a “nice to have” in the world of IAM — it’s becoming a <strong>necessity</strong>. With cyber threats growing more sophisticated and environments more dynamic, traditional IAM systems simply can’t keep up.</p><p>By embracing AI-driven capabilities, organizations can unlock smarter, faster, and more resilient security solutions. But success depends on tackling the integration challenges head-on — with transparency, ethical oversight, and a commitment to continuous innovation.</p><p>As we move toward a more digitally interconnected future, <strong>AI and IAM together will shape the backbone of enterprise security</strong>.</p><h3>References</h3><p>[1] J. Vegas and C. Llamas, “Opportunities and Challenges of Artificial Intelligence Applied to Identity and Access Management in Industrial Environments,” <em>Future Internet</em>, vol. 16, no. 12, pp. 469–469, Dec. 2024, doi: <a href="https://doi.org/10.3390/fi16120469.">https://doi.org/10.3390/fi16120469.</a> Available: <a href="https://www.mdpi.com/1999-5903/16/12/469">https://www.mdpi.com/1999-5903/16/12/469</a></p><p>[2] K. R. MUPPA, “Enhanced Identity and Access Management with Artificial Intelligence: A Strategic Overview,” <em>International Journal of Information Security and Cybercrime</em>, vol. 13, no. 2, pp. 9–17, Dec. 2024, doi: <a href="https://doi.org/10.19107/ijisc.2024.02.01.">https://doi.org/10.19107/ijisc.2024.02.01.</a> Available: <a href="https://www.researchgate.net/publication/383874207_Enhanced_Identity_and_Access_Management_with_Artificial_Intelligence_A_Strategic_Overview.">https://www.researchgate.net/publication/383874207_Enhanced_Identity_and_Access_Management_with_Artificial_Intelligence_A_Strategic_Overview.</a> [Accessed: May 03, 2025]</p><p>[3] M. T. H. Sarker, M. S. Rahman, M. M. Uddin, and N. A. F. Shakil, “ARTIFICIAL INTELLIGENCE ENHANCED IDENTITY AND ACCESS MANAGEMENT PREVENTING UNAUTHORIZED ACCESS IN MODERN ENTERPRISES,” <em>International journal of management information systems and data science</em>, vol. 1, no. 4, pp. 80–95, Sep. 2024, doi: <a href="https://doi.org/10.62304/ijmisds.v1i04.202">https://doi.org/10.62304/ijmisds.v1i04.202</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da2f8577792a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Login to an Application Using a Federated IDP with SAML Protocol in WSO2 Identity Server 7.0.0]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/login-to-an-application-using-a-federated-idp-with-saml-protocol-in-wso2-identity-server-7-0-0-fb150ad80516?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb150ad80516</guid>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Sun, 15 Dec 2024 16:09:02 GMT</pubDate>
            <atom:updated>2024-12-15T16:09:02.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mz7MTXkRsNyf6kZ_0jg8Zg.png" /></figure><p>In this guide, we’ll walk through configuring a federated IDP using the <strong>SAML protocol</strong> in <strong>WSO2 Identity Server 7.0.0</strong> and logging into an application using the configured IDP. This guide is aimed at developers testing or working on similar authentication flows with WSO2 IS.</p><h3>Step 1: Configure a Federated IDP Using SAML2</h3><h4>Using Asgardeo to Create the Federated IDP</h4><p><strong>Log in to the Asgardeo Console</strong>:<br>Start by accessing the <strong>Asgardeo Console</strong> and logging in with your credentials.</p><p><strong>Create a SAML Application</strong>:</p><ul><li>Go to <strong>Applications</strong> → <strong>New Application</strong> → <strong>Standard-Based Application</strong>.</li><li>Enter a name for the application (e.g., <strong>Test SAML App</strong>).</li><li>Choose the <strong>SAML</strong> protocol.</li></ul><p><strong>Enter the Application Details</strong>:</p><ul><li><strong>Issuer</strong>: Set test-SAML-app (can be any unique value).</li><li><strong>Assertion URL</strong>: Enter https://localhost:9443/commonauth and click the <strong>+</strong> button.</li><li>Press Create to finalise the application setup.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*Z95g7KSChacCN4Ma.png" /><figcaption>Completed Standard Based SAML2 Application Configuration</figcaption></figure><h4>Configure the Federated IDP in WSO2 Identity Server</h4><p><strong>Log in to the WSO2 IS Console</strong><br>Access the <strong>WSO2 Identity Server Console</strong> at https://localhost:9443/. Log in using administrative credentials.</p><p><strong>Create a New Application</strong></p><ul><li>Navigate to <strong>Applications</strong> → <strong>+ New Application</strong> → <strong>Traditional Web Application</strong>.</li><li>Enter a name for the application (e.g., <strong>Test App</strong>).<br>- Add https://oauth.pstmn.io/v1/callback under <strong>Authorized Redirect URLs</strong>.</li><li>Enable CORS and click <strong>Create</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Env6aGTsJ-lX3ysh4p6CMg.png" /><figcaption>Traditional Web Application Configuration</figcaption></figure><p><strong>Configure the Login Flow</strong></p><ul><li>Go to <strong>Applications</strong> → <strong>Test App</strong> → <strong>Login Flow</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bBkKhB-EqYecsNBOb74e0A.png" /></figure><ul><li>Click <strong>Add Sign In Option</strong> → <strong>Configure New Connection</strong> → <strong>Standard-Based IDP</strong> → <strong>Create</strong>.</li><li>Provide a name (e.g., <strong>Asgardeo Federated IDP</strong>) and select <strong>SAML</strong> as the protocol. Click <strong>Next</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5gLR7aZjvdbpLwqGtVI_9g.jpeg" /></figure><p><strong>SAML Configuration</strong></p><ul><li><strong>Service Provider Entity ID</strong>: Use the <strong>Issuer</strong> value from the <strong>Protocol</strong> tab in Asgardeo.</li><li>Select <strong>Manual Configuration</strong> for the mode.</li><li><strong>Identity Provider Single Sign-On URL</strong>: Use the <strong>Single Sign-On URL</strong> from the <strong>Info</strong> tab in Asgardeo.</li><li><strong>Identity Provider Entity ID</strong>: Use the <strong>Issuer</strong> value from the <strong>Info</strong> tab in Asgardeo.</li><li>Click <strong>Next</strong> and then <strong>Finish</strong> to complete the setup.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yNYKP4WO3BDX5lnTJaNEA.jpeg" /></figure><p><strong>Finalize the Configuration</strong></p><ul><li>In the <strong>Add Authentication</strong> menu, select the connection you created and click <strong>Add</strong>.</li><li>Ensure the new connection, <strong>Sign In With Asgardeo Federated IDP</strong> appears under <strong>Sign In Options</strong> and click <strong>Update</strong> to save the changes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogg6Vw3FkrfCxlg8_yk8PQ.png" /></figure><h3>Step 2: Login to the Application Using Postman</h3><p><strong>Set Up Postman for OAuth</strong></p><ul><li>Open Postman and create a new request.</li><li>In the <strong>Authorization</strong> tab, select <strong>OAuth 2.0</strong> and enter the following details:<br>- <strong>Callback URL</strong>: <a href="https://oauth.pstmn.io/v1/callback.">https://oauth.pstmn.io/v1/callback</a><br>- <strong>Auth URL</strong>: <a href="https://localhost:9443/oauth2/authorize.">https://localhost:9443/oauth2/authorize</a><br>- <strong>Access Token URL</strong>: <a href="https://localhost:9443/oauth2/token.">https://localhost:9443/oauth2/token</a><br>- <strong>Client ID</strong>: Copy from the <strong>Protocol</strong> section of the <strong>Test App</strong> in WSO2 IS<br>- <strong>Client Secret</strong>: Copy from the same section<br>- <strong>Scope</strong>: Use openid SYSTEM to allow all</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nEYSimjqD4jfLgfyOpU-zg.png" /><figcaption>Postman Authentication Request Configurations</figcaption></figure><p><strong>Initiate the Login</strong></p><ul><li>Click <strong>Get Access Token</strong> in Postman.</li><li>You’ll be redirected to the WSO2 IS login page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KI0k1Xmx7yOccWvdD3MFTA.png" /></figure><ul><li>Select <strong>Sign In With Asgardeo Federated IDP</strong>.</li><li>You’ll be redirected to the Federated Asgardeo login page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pRNkcS8mhS9M30755GRqTA.png" /></figure><ul><li>Enter your username and password to log in.</li><li>Upon successful authentication, Postman will display the access tokens.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Nx8QvUZ_Fs7l5Sovve9PA.png" /></figure><h3>Conclusion</h3><p>By following this guide, you’ve successfully set up federated authentication using SAML in WSO2 IS 7.0.0 with Asgardeo as the external IDP.</p><p>This article is designed to assist developers working with WSO2 IS, providing a step-by-step reference for configuring and testing similar federated authentication flows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb150ad80516" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Login to an Application Using Federated IDP with SAML in WSO2 Identity Server]]></title>
            <link>https://medium.com/@kaveeshapiumini1999/login-to-an-application-using-federated-idp-with-saml-in-wso2-identity-server-9bf737fb6552?source=rss-3d2217a80b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bf737fb6552</guid>
            <dc:creator><![CDATA[Kaveeshapiumini]]></dc:creator>
            <pubDate>Sun, 15 Dec 2024 12:16:24 GMT</pubDate>
            <atom:updated>2024-12-15T15:38:16.670Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mz7MTXkRsNyf6kZ_0jg8Zg.png" /></figure><p>This guide outlines how to log into an application via a federated Identity Provider (IDP) using the SAML protocol, leveraging <strong>WSO2 Identity Server (IS)</strong> versions 5.11, 6.0.0, and 6.1.0, alongside <strong>Asgardeo</strong>.</p><h3>Step 1: Configure a Federated IDP Using SAML2</h3><h4>Using Asgardeo to Create the Federated IDP</h4><ol><li><strong>Log in to the Asgardeo Console</strong>: <br>- Navigate to Asgardeo Console.<br>- Use your credentials to log in.</li><li><strong>Create a SAML Application</strong>:<br>- Go to <strong>Applications</strong> → <strong>New Application</strong> → <strong>Standard-Based Application</strong>.<br>- Enter a name for the application (e.g., <strong>Test SAML App</strong>).<br>- Choose the <strong>SAML</strong> protocol.</li><li><strong>Enter the Application Details</strong>:<br>- <strong>Issuer</strong>: Enter test-SAML-app (can be any unique value).<br>- <strong>Assertion URL</strong>: Enter https://localhost:9443/commonauth and click the <strong>+</strong> button.<br>- Press Create to finalise the IDP creation.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*ZBhrzr24WkkXbugFu1scjw.png" /><figcaption>Standard Based SAML2 Application</figcaption></figure><h4><strong>Configuring the Federated IDP in WSO2 IS</strong></h4><ol><li><strong>Log in to the Management Console</strong>:<br>- Access the WSO2 IS Management Console at <a href="https://localhost:9443/carbon.">https://localhost:9443/carbon.</a><br>- Use your admin credentials.</li><li><strong>Register the Federated IDP</strong>:<br>- Navigate to <strong>Main</strong> → <strong>Identity</strong> → <strong>Identity Providers</strong> → <strong>Add</strong>.<br>- Enter a name for the IDP (e.g., <strong>Asgardeo Federated IDP</strong>) and register.</li><li><strong>Edit the Federated IDP</strong>:<br>- Go to <strong>Identity Providers</strong> → <strong>List</strong>, select the created IDP, and click <strong>Edit</strong>.<br>- Navigate to <strong>Federated Authenticators</strong> → <strong>SAML Web SSO Configuration</strong> → <strong>Configure</strong>.</li><li><strong>Provide SAML Configuration</strong>:<br>- <strong>Service</strong> <strong>Provider Entity ID</strong>: Use the <strong>Issuer</strong> value from the <strong>Protocol</strong> tab in the Asgardeo app (e.g., test-SAML-app).<br>- <strong>Identity Provider Entity ID</strong>: Use the <strong>Issuer</strong> value from the <strong>Info</strong> tab in the Asgardeo app.<br>- <strong>SSO URL</strong>: Use the <strong>Single Sign-On URL</strong> value from the <strong>Info</strong> tab in the Asgardeo app.<br>- Click Update to save the configurations.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eHsjiZlP4vWZxHxNprHLyw.png" /><figcaption>SAML2 Web SSO Configuration</figcaption></figure><h3>Step 2: Login to Application with the Configured Federated IDP</h3><h4>Configure the Service Provider in WSO2 IS</h4><ol><li><strong>Register the Service Provider (SP)</strong>:<br>- Navigate to <strong>Main</strong> → <strong>Identity</strong> → <strong>Service Providers</strong> → <strong>Add</strong>.<br>- Enter a name for the SP (e.g., <strong>Test App</strong>) and save.</li><li><strong>Edit the Service Provider</strong>:<br>- Go to <strong>Service Providers</strong> → <strong>List</strong>, select the created SP, and click <strong>Edit</strong>.<br>- Under <strong>Inbound Authentication Configuration</strong>, go to <strong>OAuth/OpenID Connect Configuration</strong> and click <strong>Configure</strong>.</li><li><strong>Add OAuth/OpenID Connect Configuration</strong>:<br>- <strong>Callback URL</strong>: Add https://oauth.pstmn.io/v1/callback (or your custom callback URL).<br>- Click <strong>Add</strong> to save the configuration.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOtiQCfrcL2R67LZiKYHNA.png" /><figcaption>OAuth/OpenID Connect Configuration</figcaption></figure><h4>Initiate the Login Process</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nv9RWKrplYOsjBxv5V531Q.png" /><figcaption>Postman Authentication Request Configurations</figcaption></figure><ol><li><strong>Set Up Postman for OAuth Authentication</strong>:<br>- Open Postman and create a new request.<br>- In the <strong>Authorisation</strong> tab, choose <strong>OAuth 2.0</strong> and enter the following details:<br>- <strong>Callback URL</strong>: <a href="https://oauth.pstmn.io/v1/callback.">https://oauth.pstmn.io/v1/callback.</a><br>- <strong>Auth URL</strong>: <a href="https://localhost:9443/oauth2/authorize">https://localhost:9443/oauth2/authorize</a>.<br>- <strong>Access Token URL</strong>: <a href="https://localhost:9443/oauth2/token.">https://localhost:9443/oauth2/token.</a><br>- <strong>Client ID</strong>: Copy this from the SP’s <strong>OAuth/OpenID Connect Configuration</strong> in WSO2 IS.<br>- <strong>Client Secret</strong>: Copy this from the same section.<br>- <strong>Scope</strong>: Add openid SYSTEM.</li><li><strong>Request Access Tokens</strong>:<br>- Click <strong>Get Access Token</strong> in Postman.<br>- You will be redirected to the WSO2 IS login page<br>- Enter your credentials and log in.<br>- Upon successful authentication, Postman will display the access tokens.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8ye99sM9HZhxedTFtumpg.png" /><figcaption>Access Token Request Response</figcaption></figure><h3>Conclusion</h3><p>By following this guide, you can integrate federated authentication using the SAML protocol with <strong>WSO2 Identity Server</strong> and <strong>Asgardeo</strong>. This article is written to assist developers working with WSO2 Identity Server and handling similar tasks, such as configuring federated identity providers and testing SAML-based authentication flows, enabling smoother implementation and testing processes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bf737fb6552" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>