solo-io / gloo

The Cloud-Native API Gateway and AI Gateway
https://docs.solo.io/
Apache License 2.0
4.09k stars 444 forks source link

dynamic AuthConfig selection or dynamic AuthConfig values #5839

Closed bcollard closed 1 month ago

bcollard commented 2 years ago

Version

1.11.x (beta)

Is your feature request related to a problem? Please describe.

In a multi-tenant context, I would like to dynamically select the AuthConfig that is applied to a shared route (among tenants).

Relying on some headers in the request, I'd like either:

⬆️ these are implementation ideas I've today but feel free to implement things from a different angle!

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional Context

No response

sam-heilbron commented 2 years ago

Current workaround: lots of duplicated routes

bcollard commented 2 years ago

given the current use cases in the field, I would push for the 3rd bullet point to be implemented at first. Then either point number 1 or number 2.

antonioberben commented 2 years ago

Another customer is interested in this feature. Thanks

marcelsigner commented 2 years ago

I suggest to split into 2 extensions.

Support of multiple AuthConfigs where the AuthConfig is selected via a regexPath

If the requestURL matches with the regexPath defined in the AuthConfig, the AuthConfig is used. According to AuthConfig it may already contain an array of configs. But there is no selection possible based on the entryURL. This first extension prevents from duplicating all the routes.

Support of loading the AuthConfigs from an external server

Configure where to get the AuthConfigs. It could look like the following: "AuthConfig": { "clientSecretRef: { "name": "", "namespace": "" } "authConfigEndpoint" : "https://domain/authserver/glooAuthConfig" "discoveryPollInterval": { "seconds": 0 }, } This means:

t-radhakrishnan commented 2 years ago

One more customer interested this feature as well.

chrisgaun commented 2 years ago

This issue would help https://github.com/solo-io/gloo/issues/6650

github-actions[bot] commented 1 month ago

This issue has been closed due to no activity in the last 12 months.