shreemaan-abhishek commented on code in PR #13038:
URL: https://github.com/apache/apisix/pull/13038#discussion_r4130375621


##########
apisix/plugins/openid-connect-idp-selector.lua:
##########


Review Comment:
   I think we don't need this (and the plugin declaration) anymore, do we?



##########
docs/en/latest/plugins/openid-connect.md:
##########
@@ -165,6 +165,12 @@ And reference it in the Plugin configuration:
 "client_secret": "$ENV://KEYCLOAK_CLIENT_SECRET"
 ```
 
+### Selecting an IdP configuration per request
+
+`client_id`, `client_secret`, and `discovery` also support `${var}` / `${var 
?? default}` runtime-variable templates, resolved from the request context on 
every request (the same templating [`limit-count`](./limit-count.md) uses for 
`count`/`time_window`). This lets a higher-priority custom Plugin inspect the 
request, set `ctx.var.*`, and select the right IdP configuration for it, while 
`openid-connect` itself stays generic — it has no built-in notion of tenants, 
realms, or providers. See 
[`openid-connect-idp-selector`](./openid-connect-idp-selector.md) for a Plugin 
that does this based on the request's bearer token issuer.

Review Comment:
   FYI: to capitalise on the new feature of templated `client_id`, 
`client_secret`, and `discovery`, clients can directly send request headers and 
use `http_<header_name>` in the template.
   
   having a custom plugin that would inspect the request and fill a ctx.var.** 
is not compulsory.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to