<?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 Ashish Pardhi on Medium]]></title>
        <description><![CDATA[Stories by Ashish Pardhi on Medium]]></description>
        <link>https://medium.com/@ashishpardhi?source=rss-9f6fb4b2643a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4WB_6xHphIBP7zAG5utolw.png</url>
            <title>Stories by Ashish Pardhi on Medium</title>
            <link>https://medium.com/@ashishpardhi?source=rss-9f6fb4b2643a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:57:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashishpardhi/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[Authorize client applications based on scopes using Okta and Anypoint Platform Integration]]></title>
            <link>https://medium.com/@ashishpardhi/authorize-client-applications-based-on-scopes-using-okta-and-anypoint-platform-integration-49de713a69d8?source=rss-9f6fb4b2643a------2</link>
            <guid isPermaLink="false">https://medium.com/p/49de713a69d8</guid>
            <dc:creator><![CDATA[Ashish Pardhi]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 11:26:37 GMT</pubDate>
            <atom:updated>2022-08-04T11:38:17.319Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o84k4_I0ZH1_6LUb" /></figure><p>Multiple external client providers can be integrated with Anypoint Platform to authenticate and authorize client applications by using JWT Validation policy to access MuleSoft API. You need an OAuth 2.0 provider to use JWT Validation policy. In this blog, I will walk you through how to authorise Okta client applications by using Okta Scopes and Access Policies.</p><h3>1. Overview</h3><h3>Pre-requisites</h3><ol><li>Anypoint Platform Trial account with API Manager Entitlement.</li><li>Okta Trial account.</li><li>Access permissions to create an application and perform administration in Okta</li><li>Organisational administration permissions in Anypoint Platform.</li></ol><blockquote>NOTE: All new trial accounts come with the required entitlements enabled by default.</blockquote><h3>Take away from this use case</h3><ol><li>How to access Anypoint Platform via Okta</li><li>How to create client application in Okta</li><li>How to create Scopes and Access Policies in Okta Authorization Server</li><li>How to apply JWT validation Policy and validate scopes</li></ol><h3>2. Okta setup</h3><h3>Create New Web App Integration</h3><ul><li>Login to Okta</li><li>For creating new web app please refer blog <a href="https://www.linkedin.com/pulse/sync-client-applications-between-okta-anypoint-platform-/?trackingId=5wVIReiUS8KbUvrM70Gdrg%3D%3D">here</a></li><li>Copy Client ID and Client Secret</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/0*p9GMNfMHRdQt9lwq" /></figure><ul><li>Create Scope</li><li>Go to Security → API → Authorization Servers</li><li>Edit existing default Auth server or create new</li><li>Click on Scopes Tab → Add Scope → Add Name, Display Name, Description</li><li>Click on create</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/0*UVfSHEQc42_VZhh_" /></figure><ul><li>Create/Edit Access policy</li><li>Click on Access Policy on same auth server</li><li>Edit policy</li><li>Check Grant Type → Keep Client Credentials</li><li>Add user Group if any</li><li>Add Scope requested</li><li>Click on Update Rule</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I87Ink5_zZZW5LyX" /></figure><h3>3. Anypoint Platform Setup</h3><ul><li>Login to Anypoint Platform.</li><li>Go to <strong>API Manager → Create API Instance → Apply JWT Validation Policy</strong>.</li><li>Set JWKS Url</li><li>Check <strong>Validate custom Claim</strong></li><li>Check for “anypoint:write” → <em>#[vars.claimSet.scp contains(“anypoint:write”)]</em></li><li>Go to Advanced options → Select <strong>Apply configuration to specific API method &amp; resources</strong> → Select<strong> Method</strong> → Select <strong>URI template regex</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gbE5auJ43YyV7RzP" /></figure><h3>4. Postman Testing</h3><ol><li>Get the Token for “<strong>anypoint:write</strong>” Scope</li></ol><ul><li>Send a POST request from Postman.</li><li>Okta Token URL: <a href="https://dev-43176189.okta.com/oauth2/default/v1/token">https://{Okta Host}/oauth2/default/v1/token</a></li><li>Query Params:</li><li>grant_type=client_credentials</li><li>scope=anypoint:write</li><li>Basic Auth</li><li>Username: &lt;Client ID of Okta Web APP&gt;</li><li>Password: &lt;CLient Secret of Okta Web APP&gt;</li><li>Click Send.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JpzP4PzJv3VfvdVq" /></figure><ul><li>Invoke API using this Token and you should be able to see a successful response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MkSWepJr0HibMrid" /></figure><ol><li>Get the Token for “<strong>read</strong>” Scope</li></ol><ul><li>Update Access policy in Okta to add read scope.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/0*pAj59vLhb98whlUW" /></figure><ul><li>Get Token for “read” scope via postman and try to invoke the same above API.</li><li>It should throw an “Invalid Token” error response as below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*F0xQmQWtXBSFtxLJ" /></figure><h3>5. Conclusion</h3><blockquote>As you can see above, we are able to authorize client web applications from Okta with Anypoint Platform based Okta scopes and Access policies. We have verified the same client with different scope can not access the API if it’s not authorized inside JWT policy configuration.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49de713a69d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>