Hands on with Kong and OPA for Authorization

oneIAM
Apr 10, 2023

--

Step 01: Configure Kong OPA plugin as below

Step 02: Implement required policies in Styra system

Step 03: Testing

User below JWT for testing

eyJ4NXQiOiJZMlV5WmpFNE5ESmlNV000TW1NeE5HRmpPVE0wWm1NM1pUZGlaall6TmpWa01UVTROekZrWkRNeE1HSTJZemcxTUdNeE5Ua3pNelZoWmpVeU9HTmtZUSIsImtpZCI6IlkyVXlaakU0TkRKaU1XTTRNbU14TkdGak9UTTBabU0zWlRkaVpqWXpOalZrTVRVNE56RmtaRE14TUdJMll6ZzFNR014TlRrek16VmhaalV5T0dOa1lRX1JTMjU2IiwiYWxnIjoiUlMyNTYifQ.eyJhdF9oYXNoIjoiLTgxTW1BeVZSbEtwRThjSGtYdGc1QSIsImF1ZCI6IldUX29vYURxcnNCN0Y1dmNvaEVSYWR0VTdNMGEiLCJzdWIiOiJhNjAxNzgxZi1mNDQxLTQ5MWMtYmQ1Zi02ZTViMmQ0Njc1NmIiLCJuYmYiOjE2ODA1OTY5OTIsImF6cCI6IldUX29vYURxcnNCN0Y1dmNvaEVSYWR0VTdNMGEiLCJvcmdfaWQiOiIyOGQ5ZjdiMy0wZmVlLTRkNzMtODc3Yy03MWI2YTMyZmEyMWYiLCJhbXIiOlsicGFzc3dvcmQiXSwiaXNzIjoiaHR0cHM6XC9cL2FwaS5hc2dhcmRlby5pb1wvdFwvZ2Jvc3NcL29hdXRoMlwvdG9rZW4iLCJleHAiOjE2ODA2MDA1OTIsIm9yZ19uYW1lIjoiZ2Jvc3MiLCJpYXQiOjE2ODA1OTY5OTIsImp0aSI6IjdlZGZiZDY5LWRlOWEtNDU1ZC04NDFhLThkYmU3NTZhNGUxOSJ9.VmIlA4MYHqFnP8n6bbwHfX1Pk5DStlOOD9uLcP_t21XttKujSyJA74SvHP-cfbg_OzSeZRexPTveBriBB4zDaVnh5MntbZbnDTXkPSHASBtw74lYzN9DD5KXON-qKzoFk8aIGKiaTqci6M2cPZYGGHYZcUZ6dnyLbMvSE3JLNavdL_9xxr97Lgve2h5TYcpFiPYf6Lj4aOpSxbpL-Acj1nnw6ozh1K-syVb7exRX9awWgRUdT7_fA8tIc26Ef4t6qErJUgQrf48t3519XHCQidXWJAeuyuABzmQJlr3bWDTvnAKIAsoqXqOLzF5Hbx-Rc1IKTSJ-L3SpwJx4xKzqoQ

Insert the given JWT as the Bearer Token

You will get HTTP 200/success response when organization is equal to ‘gboss’

You will get HTTP 403/Forbidden response when organization is equal to anything other than ‘gboss’

--

--

oneIAM
oneIAM

Written by oneIAM

One-stop solution for all your enterprise identity and access management requirements

No responses yet