
Home Assistant Security Visibility
Hello fellow nerds,
I’m sure I’m not alone thinking Home Assistant has a bit of a security visibility gap.
Whether you use Nabu Casa, a VPN/tunnel, or a reverse proxy, many of us access Home Assistant over the internet. Some approaches are safer than others, but regardless of how you access your instance, I think one thing is missing:
Visibility into who actually has access, where they’re connecting from, and what they’re doing.
This has come up in the Home Assistant Community and Reddit. I’ve personally made requests for it in the past.
The Open Home Foundation has obviously been adding security features to Home Assistant, but there are a million other things competing for their time.
So I built something for myself:
My goal is to provide better visibility into user authentication and user activity:
- Real time visibility into authenticated connections (via Websocket monitoring)
- Historical session/connection information by user account
- Source IP address
- Credential/refresh-token metadata
- Client information where Home Assistant exposes it
- Connection/login timestamps
- Optional GeoIP/ASN/hostname information
- Successful login observation
- Failed password/MFA attempt observation
- User-attributed Home Assistant service-call auditing
- Credential and IP history
- Basic, explainable security assessments
In order to highlight items to review, the integration looks at events and flags specific ones like:
- Repeated failed authentication attempts followed by a successful login
- A successful login using both a new credential and an unfamiliar public IP
- New credentials, IP addresses, or clients being observed for an account
It's absolutely not perfect, and it's definitely not a finished product, but this should hopefully help out someone else who is looking for better visibility on their accounts/security within Home Assistant.
AI had a heavy hand to get this to the point it's at today.
Let me know your thoughts. Would love to know what the world thinks of something like this.
If you have an idea for it, submit a PR or start a discussion on the repo.
My future goal is to enable token revoking via the dashboard/service calls, account disabling, and more. Giving more control over authentication rather than just visibility.
This got me to my MVP goal, but I think there is a lot more possibility to come!