Skip to content

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

Description

@wreper12

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions