Added an optional OAUTH_ALLOWED_ROLES environment variable#1463
Added an optional OAUTH_ALLOWED_ROLES environment variable#1463JimKnoxx wants to merge 3 commits intogetfider:mainfrom
Conversation
- Setting this prevents users without the specified roles from accessing the Fider instance Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
5d971d7 to
015c03d
Compare
Review: Design concern — global
|
|
@JimKnoxx Hi there - there's a couple of things there to look at - the jsonq thing i'd deffo look at for code duplication. If you do need any additional json stuff that might also be reusable then adding it to that package might be a good move too - rather than keeping it with the oauth stuff? |
We use Fider in a private instance with OAUTH as only login method.
We only want some users (teachers and admins) to access the instance.
At the moment we can only use "obscurity" measurements to prevent students from accessing.
In this PR I (and Claude), added the OAUTH_ALLOWED_ROLES .env variable, a way to filter out the roles from the oauth json response of a user and perform access checks based on the roles that the user has.
Issue: #1464
Generated with Claude Code