About Setups :-
- My kong gateway is setup with kong-oidc plugin (free one)
- I defined
introspection_endpoint,client_id,client_secret,discoveryand other necessary configs forkong-oidcin the gateway setup - UI is react SPA application
- React app uses
PKCEauth flow for login to IDP (Okta).
My plan and expectation :-
- React app initiates login process (PKCE flow) and get
access_tokenwithout kong involvement at all. This is done. - Send
access_tokenfrom above step in the subsequent api request calls - I assumed
kong-oidcplugin will validate theaccess_tokenusing discovery document defined in the config and will forward the request to the upstream service.
Issue I am having :-
Application is hitting api call rate limit to Okta. But we are not explicitly making any call to Okta. Seems like kong-oidc plugin is making call to validate access_token on every request.
What I am NOT doing :-
- We are
NOTusingKong authentication session cookieat all as we are using PKCE auth flow and authentication is completely handle in UI itself.
Questions :-
- Using PKCE flow in the SPA app is not correct with Kong gateway + kong-oidc plugin?
- Should I use
Kong authentication session cookieinstead of PKCE flow? If soKong authentication session cookieis the only way in kong gateway + kong-oidc world?