home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Emulated Hue: Limited to RFC1918 IPv4 addresses #30701

Open breti opened 4 years ago

breti commented 4 years ago

Home Assistant release with the issue:

Home Assistant 0.103.6

Last working Home Assistant release (if known): n/a

Operating environment (Hass.io/Docker/Windows/etc.):

HASS.IO on Synology NAS (.SPK)

Integration:

/components/emulated_hue/

Description of problem: The Hue Emulation is limited to RFC1918 IPv4 adresses; if running in a network with e.g. RFC 3927 addresses or with public IPv4 addresses (as in my setup), which is perfectly fine and valid, access to e.g. /api/pi/lights is denied with message:

{"message": "Only local IPs allowed"}

This is not mentioned anywhere in the docs.

There seems to be no option to work around this issue. The list of allowed IPv4 addresses seems to be hardcoded (see https://community.home-assistant.io/t/emulated-hue-only-local-ips-allowed/109852/4).

Please disable this check (I don't know what it is good for) or provide a setting to override this check.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

emulated_hue:

Traceback (if applicable):

Additional information:

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 4 years ago

Nothing has changed. Public IPs are still not allowed (in homeassistant/components/emulated_hue/hue_api.py).

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 4 years ago

Nothing has changed. Public IPs are still not allowed (in homeassistant/components/emulated_hue/hue_api.py).

stale[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 3 years ago

Nothing has changed. Public IPs are still not allowed (in homeassistant/components/emulated_hue/hue_api.py).

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 3 years ago

Nothing has changed. Public IPs are still not allowed (in homeassistant/components/emulated_hue/hue_api.py).

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 3 years ago

Nothing has changed. Public IPs are still not allowed (in homeassistant/components/emulated_hue/hue_api.py).

raskitoma commented 3 years ago

I would like to keep this topic/issue open. I have the same problem using a local network with different ip schema. The thing is, I want to use this schema on my own-private-network, so I don't know why this have to be enforced via hard coding it instead of using a config parameter to allow non RFC1918 addresses.

Also I don't want to edit the py to remove any reference to this enforcing jail, because with new updates, all changes will be removed as well. This could not be turning into a cat-mouse game.

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

raskitoma commented 2 years ago

Well it seems that maybe changing the code is the only way and keeping doing it every update...

breti commented 2 years ago

Yes, that's right. That's what I do :-/

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

bdraco commented 2 years ago

This was blocked intentionally in #17248

amitsamanta996 commented 2 years ago

Copy the emulated_hue folder from components to /config/custom_components, edit hue_api.py Add these after all import lines (around line 70) from ipaddress import IPv4Address, IPv6Address from typing import Union def is_local(address: Union [IPv6Address, IPv4Address]) -> bool: return True

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 2 years ago

Nothing has changed. Limiting access to RFC1918 addresses is still a very bad idea.

raskitoma commented 2 years ago

Like I said before, this should be open to configuration. amitsamanta996 solution is excellent! Thanks!

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 1 year ago

Nothing has changed. Limiting access to RFC1918 addresses is still a very bad idea.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 1 year ago

Nothing has changed. Limiting access to RFC1918 addresses is still a very bad idea.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 1 year ago

Nothing has changed. Limiting access to RFC1918 addresses is still a very bad idea.

issue-triage-workflows[bot] commented 10 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 10 months ago

Nothing has changed. Limiting access to RFC1918 addresses is still a very bad idea.

peterbokunet commented 7 months ago

+1 that thinking your app is secure because you're requiring RFC1918 is just irresponsible and immature. If it's desired to be a flag, that's fine but address space is address space.

I'd encourage the fix for this be merged.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

breti commented 4 months ago

Nothing has changed. Limiting access to RFC1918 addresses is still a very bad idea.

peterbokunet commented 4 months ago

It would be great to be able to use the service in my LAN.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

peterbokunet commented 1 month ago

Would the current maintainers be interested in handing over this repo to people interested in supporting it?