blakeblackshear / frigate-hass-integration

Frigate integration for Home Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When using Home Assistant signed paths the notification image will not load unless unauthorized notification proxy is set to true.

wreper12 opened this issue · comments

Version of the custom_component

5.0.1

Configuration

Frigate Configuration working fine,
Frigate Integration
 WebRTC for camera's: False
 RTMP url: Undefined
 RTSP url: Undefined
 Enable the unauthenticated notification event proxy: False
 Enable the media browser: True
 Seconds for unauthenticated requests: 1

Describe the bug

Reading through issue #153 and looking at the options for the frigate integration with the option to disable the unauthenticated notification proxy it appears that there should be support for using Home Assistant Signed Paths.
Using a script I am able to generate valid Signed Paths, but the URL will not work. If you enable the unauthenticated notification proxy and set the Disallow unauthenticated notification assess to 1 second then notifications and the Signed Path work for the full time that the Signed Path is valid.

Looking at
/custom_components/frigate/views.py at line 291 this is the current code.

        # If proxy is disabled, immediately reject
        if not is_notification_proxy_enabled:
            return False

        # Authenticated requests are always allowed.
        if request[KEY_AUTHENTICATED]:
            return True

With the code order if the proxy is disabled even if you have a key it will be rejected.
On my Home Assistant setup I modified the file using a file editor to change the code order and the issue went away and Signed Keys would work even if the proxy is disabled.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

The issue still exists within the frigate hass integration.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.