question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Card reuses old camera token, generates failed login attempts

See original GitHub issue

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue: main

Last working release (if known):

Browser and Operating System:

Firefox 97.0, Ubuntu 20.04 HA Companion 2022.2, iOS 15.3.1

Description of problem:

There was a PR #372 which allows to use image from HA camera entity. I really like this because now I don’t need to use reverse proxy -> Frigate for fetching snapshots, and with frequently changing token it’s more secure than fixed URL.

After testing this PR functionality with multiple Frigate cards in one view, I encountered issue where HA bans my IP. I already got banned like 3 times in 2 days from Home Assistant with http.ip_ban_enabled: true and http.login_attempts_threshold: 15 in HA main configuration.

It seems like when camera token changes, Frigate card will try reuse old token which will cause failed login attempts. It’s happening occasionally so I couldn’t find a pattern, but failed attempts occurs in both Web browser and HA Companion App.

Also, I investigated that sometimes if you restart your Home Assistant instance and keep Browser tab/tabs open with Frigate card, it will try to refresh image with old camera token. In Network tab of Browser Developers tools there will be at least one request(sometimes more) with 404 Not Found status code and 401 Unauthorized(which cause failed login attempt). After HA is fully started it will start to use correct token again.

For now I switched back to my old image retrieving solution.

Javascript errors shown in the web inspector (if applicable):


Additional information:

Used image block in configuration:

image:
  mode: camera
  refresh_seconds: 5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
peledziuscommented, Jun 21, 2022

Are you sure it’s 3-4 days and not related to the image PR you tested today?

Yes, it was before.

Anyway, I didn’t notice them for past few days.

1reaction
dermotduffycommented, Mar 6, 2022

@peledzius HA is extremely fragile in this regard, a single rogue request causes this to happen. It’s a bit like plugging a damn, so there absolutely could be other ways this could happen that we’ll need to defend against.

However, I guess we’ll take the win for now and we can re-open if we find a specific way to reproduce the issue. Thank you again, for all the testing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NIST Special Publication 800-63B
Authentication establishes that a subject attempting to access a digital service is in control of the technologies used to authenticate.
Read more >
WU_E_NO_USERTOKEN, Failed to generate security token ...
Check that the Microsoft Account Sign-in Assistant service is set to automatic startup and is running. I had disabled this service since I ......
Read more >
twrecked/hass-aarlo: Asynchronous Arlo Component ... - GitHub
If you try to reuse an existing login - for example, the login from the Arlo app on your phone - the app...
Read more >
Windows Event ID 4625, failed logon - ManageEngine
Event ID 4625 (viewed in Windows Event Viewer) documents every failed attempt at logging on to a local computer. This event is generated...
Read more >
AM 5 > Authentication and Single Sign-On Guide
Guide to working with authentication and single sign-on support. ForgeRock Access Management provides authentication, authorization, entitlement and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found