About Setups :-
- My kong gateway is setup with kong-oidc plugin (free one)
- I defined
introspection_endpoint
,client_id
,client_secret
,discovery
and other necessary configs forkong-oidc
in the gateway setup - UI is react SPA application
- React app uses
PKCE
auth flow for login to IDP (Okta).
My plan and expectation :-
- React app initiates login process (PKCE flow) and get
access_token
without kong involvement at all. This is done. - Send
access_token
from above step in the subsequent api request calls - I assumed
kong-oidc
plugin will validate theaccess_token
using 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
NOT
usingKong authentication session cookie
at 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 cookie
instead of PKCE flow? If soKong authentication session cookie
is the only way in kong gateway + kong-oidc world?