custom-components / authenticated

A platform which allows you to get information about sucessfull logins to Home Assistant.
MIT License
82 stars 28 forks source link

Allow ignoring specific client_ids #61

Closed mikeage closed 3 years ago

mikeage commented 3 years ago

This can be very useful for ignoring things like Alexa logins, which have a client_id of https://pitangui.amazon.com/ (for us-east-1 at least)

stale[bot] commented 3 years ago

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.

mikeage commented 3 years ago

@ludeeus , sorry to nag you, but any thoughts on this one?

mikeage commented 3 years ago

I've added some samples. I'm not completely sure what the convention is, but these are the ones I've found

keiranharris commented 3 years ago

hi @ludeeus - love this code - but wanted to exclude the google cloud from persistent notifucations when it makes ingress API calls to my house ("hey google, turn on the kitchen" generates an ingress auth request). For me, the requests either come from 108.177.67.0/24 or 108.177.77.0/24, and the source IP's change over the whole subnet ranges (so over 500 individual IPs). I was hoping to use this "exclude" feature... but it seems to be oriented around IP's not networks. Is that correct? Any chance of adding network ranges?

I see the above changes in this issue - work was done for "exclude_clients" (not quite sure what that does without inspecting the code), but there is no mention of that in the main README.md nor how to use it properly. Is this a solution to my needs I wonder?

ALSO: side note - these google API ingress calls also show up in my persistent notifications as my main HASS username - which is surprising, as for google integration, as per the docs (under enable device sync heading), we have to create a robot/service account - which in my case is NOT named my main user account. I would have thought it should show up as that robot credential in the persistent notifications. Wondering if its easier / better to allow filtering on on what users do / don't get flagged for persistent notifications..... would have to fix the other 'problem' though first (where its showing up as my own username, not the google robot account). Just an idea....

thanks! Keiran