nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
454 stars 320 forks source link

set ngx.ctx.authenticated_groups if groups claim is present #132

Open knackaron opened 4 years ago

knackaron commented 4 years ago

This inspects the token retrieved from the OIDC provider, checks if the groups claim is present, and then sets the appropriate variable in the NGINX context so that other Kong plugins, such as the bundled ACL plugin can make authorization decisions based on the user's group vector.

This is following up on @Trojan295's ask for adding more information to the context (https://github.com/nokia/kong-oidc/issues/15#issuecomment-340862575).

Logunov commented 4 years ago

s/ngx.ctx.authenticated_groups/kong.ctx.shared.authenticated_groups/g

RaVbaker commented 4 years ago

Any chance @phirvone to get this merged?

cristichiru commented 4 years ago

Implemented in my fork, Revomatico/kong-oidc.

I do not have this use case, so please test it and let me know.