-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable forms based auth and proxy auth #15450
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for frigate-docs canceled.
|
There are a few reasons why I have concerns with the premise for this approach and don't think it makes sense:
So with that said, I don't think users should be encouraged to have auth enabled when they are using proxy based auth, it should be one or the other not both, I believe. Happy to defer to the other maintainers |
Thanks for the comments. Your concern exists today. If you disable auth (which you must do to enable proxy auth), then anyone with access to the endpoint can access the service. They will have different layouts etc. This PR enables us to improve it by enabling a user to use forms based auth. They could auth with the same account name that they use through the proxy. Thus, it does not mean there has to be two accounts. This is in fact how most systems work - the proxy or oauth account, is mapped to a local account with real username and password. Perhaps this change is better included in the RBAC work you are doing. Typically, one would need an internal account to assign the roles etc to. This account could have a local password that could be optionally assigned and used if proxy auth isn't available for some reason. |
that's not the point, the point is that users should not be encouraged / the default configuration should not be to run things this way. A user should connect through the same host all the time regardless of if on the local network or not. This is not only important for the features I mentioned previously but also important when running Frigate as a PWA as well. I'll defer to Blake on what the best approach will be when we implement RBAC, but given the current docs and what has been discussed I believe the recommendation is that a user has Frigate auth or proxy auth, not both. |
I wasn't aware of the RBAC stuff, and would be happy to contribute to this. Can you explain you comment "A user should connect through the same host all the time regardless of if on the local network or not. This is not only important for the features I mentioned previously but also important when running Frigate as a PWA as well."?? I don't see how this logically follows. |
If I connect to Meanwhile, if I connect using |
Proposed change
This change will enable forms based auth, if the proxy does not send the user map header and auth is enabled.
The previous set up required auth to be disabled in order to support proxy auth. This could lead to a situation where internal systems could not connect without the proxy.
This change enables internal users to hit the web interface (on 8971) without a proxy and use frigate authentication, whilst external users can authenticate via the proxy.
Type of change
Additional information
Checklist
ruff format frigate
)I ran npm run test, but I get "No test files found, exiting with code 1". So I may have done this wrong.