luizfonseca / traefik-github-oauth-plugin

Lightweight Traefik middleware plugin that enable users to authenticate on specific domains using GitHub OAuth
https://plugins.traefik.io/plugins/65646fb989090d725bcb75b7/git-hub-o-auth-plugin
MIT License
4 stars 0 forks source link

whitelist also for team ids #18

Open runningman84 opened 6 months ago

runningman84 commented 6 months ago

This plugin looks great, I would also like to whitelist team ids in addition to userids or usernames.

Furthermore it would be great to also force mfa.

We did a similar thing with the external auth project: https://github.com/travisghansen/external-auth-server/blob/c3337e05ebc581dc5e79d31b9d844076439ecc85/contrib/generate-config-helm-traefik-github.js#L127

luizfonseca commented 6 months ago

Hey @runningman84, that's a great idea. I've prepared a small PR that adds team support here: https://github.com/luizfonseca/traefik-github-oauth-plugin/pull/21

Now, in regards to MFA I have to investigate further but seems doable. I might also restructure the codebase a bit to allow for even more filters (though external-auth-server seems like the perfect endgame to me...).

That said, if you are willing; I'm open to any contributions if you feel they would be valuable to the repo!

--

P.S.: Although I'm confident that it's working as expected, I will dedicate some time to write some tests/extensively test the PR on a Traefik setup in the following days.

runningman84 commented 2 months ago

Looking forwar to a release, the pr looks good from my point of view. I think it is already okay for my usecase only the force mfa flag is missing so far.