mesosphere / traefik-forward-auth

214 stars 46 forks source link

Ability to set scopes via rules #61

Open ammmze opened 2 years ago

ammmze commented 2 years ago

I've got a scenario where when a request for a certain domain comes in, I would like to add an additional scope to the authentication request. I've got an idea for how that would work and how I could implement it, but before spending the time doing so, I'd like to run it by the folks here and see if we can get a 👍🏻 on the idea.

So the configuration would look something like the following:

Add additional scopes to the global ones

rule.two.action=auth
rule.two.addScopes=foo bar
rule.two.rule=Host(`two.com`)

Replace global scopes with the ones defined

rule.two.action=auth
rule.two.scopes=foo bar
rule.two.rule=Host(`two.com`)

Specifically for my scenario, for a certain domain, I want to add the scope that will use the Dex IDP Cross-client trust and authorized party functionality so that the token is authorized for a different client.