Commit a207b6f
committed
fix(auth): add rh-identity support to authorization middleware
The authorization middleware was missing a case for the rh-identity
authentication module. When using rh-identity auth with access_rules,
the match statement fell through to the default case which raised an
InternalServerError (HTTP 500) on every protected endpoint.
This adds proper handling for AUTH_MOD_RH_IDENTITY that:
- Uses NoopRolesResolver (all authenticated users get the "*" role)
- Applies GenericAccessResolver with configured access_rules
- Falls back to NoopAccessResolver if no access_rules are configured
Without this fix, rh-identity authentication works but authorization
fails silently with 500 errors.
Signed-off-by: Major Hayden <major@redhat.com>1 parent 2adb747 commit a207b6f
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
| |||
0 commit comments