@RenaudLN - Was just looking through the latest release changes for this and was wondering whether the group-based permission check is all that secure? I’m probably missing something, but could the end-user not just change the session[“groups”] key to “admin” if they wanted to, or does that somehow invalidate access token?
Edit: I guess looking into it a bit more, Flask sessions are tamper-proof because they’re signed by the Flask server’s secret key, so the above should be moot.
It is easy to pull the info from the cookie, and if you have a non-secure key, the cookies themselves can be crafted, albeit the person needs to know the key.
By the “key” are you referring to the access token that’s stored in the cookie from the OIDC handshake or the secret key that’s used to sign the cookie?
To this point, I often times will see people generate random keys because its secure. It is, but if you have multiple backends, then these keys will never match and cause headaches.
Even in one instance, every time your server reboots you have to log in again…
You should use the flask option secure session cookie so that you can’t decrypt it even if you have the secret key. I added a parameter in OIDCAuth to automatically set this.
Glad it helps you can change the redirect URI with the callback_route argument. Note that it needs to have a <idp> route placeholder in there. The default value is "/oidc/<idp>/callback"
The addition of OIDC is really awesome! Thank you for your work on this.
Is it possible to add an authorization hook somewhere in the process? I have OIDC authentication set up successfully with Google as the IdP, but now I’d like to control authorization based on membership in a specific Google Group within our org. That would involve calling a Google API to check group membership with the user’s access token before returning the page.