-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature: Support Basic authentication and Bearer Token authorization for a connection to Frigate server #52
Comments
The implementation in the PR changed a bit. Port 5000 access will remain unauthenticated and is designed to be only exposed internally to other services in the compose file or selectively opened as needed. The new 8080 port is where auth will be enforced and where reverse proxies meant for external access will be pointed. |
Happy to make changes on the Frigate side to make implementing auth more seamless for cases where frigate and frigate-notify aren't on the same machine. |
Good point, thanks a lot!
|
Hey there @blakeblackshear - Thanks for sharing! That's great to know & will be helpful in addressing this. So at the moment, I am working allowing the ability to configure additional arbitrary headers send to Frigate which should cover the initial request. And as suggested by @freefd, I'll go ahead and add a new config for an external/public URL to get ready for when that change is live in Frigate. |
Sometimes
Frigate
andfrigate-notify
may not be placed in the same non-auth segment, but both can access the MQTT bus. And then we can assume that the Frigate API is protected by some type of auth (e.g., behind a reverse proxy, or we can imagine that Auth! MR is already implemented).Since
frigate-notify
uses thenet/http
package to handle HTTP requests, we can easily implement Basic authentication and authorization based on the static Bearer Token header (generated externally).Basic Auth description: https://pkg.go.dev/net/http#Request.BasicAuth + https://pkg.go.dev/net/http#Request.SetBasicAuth
Bearer Token description: https://swagger.io/docs/specification/authentication/bearer-authentication/
Thank you.
The text was updated successfully, but these errors were encountered: