-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UniFi WLAN Password sensor #114419
Add UniFi WLAN Password sensor #114419
Conversation
Hey there @Kane610, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@Kane610 sensors.py doesn't pass requires_admin=True, how can we make only this sensor requires admin? Maybe create a sensors_admin.py? |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
I'm thinking if you provide the supported method to see if x_passphrase is reported then you don't need the check. If that doesn't help then you could implement the allowed_fn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
This might have some attack vectors to consider if you can ask alexa/xyz to speak the wifi password. |
This is up to the user to enable the functionality and configure the Alexa automation response. |
Many users will not understand the security implications here. I could see this might end up being classified as a vuln. |
Do we want to discuss this in the dev chat? We have a month to consider it |
We could also put it behind extra options flag |
I understand your concern, but there are explicit steps outlined to make it available. Therefore, I don't believe someone would activate it inadvertently or without understanding the implications. If someone enables it, creates the necessary flow to obtain it, and utilizes a voice assistant, it is likely because they require it, especially in Guest lans. However, if this is a matter to be evaluated by senior members or if there are precedents, please bring it to their attention. I am new here and unfamiliar with the protocol. I will completely understand if this feature gets blocked, but I genuinely need this functionality. That's why I developed it and thought it might also benefit others. Moreover, not keeping it solely within my fork is a relief, hehe. |
I think at the very least there should be a strongly worded warning in the docs about the risk of exposing the sensor to voice assistants since no authentication is required to obtain the password from them. There are many documented attack vectors to remotely activate a voice assistant, which is the reason specific device classes are excluded from them by default. Its also the reason google assistant and other require a pin or other method before opening/unlocking secure devices. We don't currently have a way to mark this type of sensor as a do not expose by default. |
After internal discussion we concluded to remove it due to security concerns, its a bit too open :) Suggestion was "We can consider a service response value" so sorry about going back to the initial suggestion |
Proposed change
I have added a new sensor, WLAN Password, to the UniFi integration. This sensor (disabled by default) allow users to retrieve the password of a WLAN. This addition enhance the functionality of the UniFi integration by providing users with more control over their network configurations.
It's quite helpful for accessibility purposes. By integrating it into voice assistants like Alexa, users with visual impairments can simply ask for the WLAN password, and the assistant can speak it aloud. This makes accessing the network much easier for everyone, including blind individuals. Additionally, not everyone can scan the QR code at all times.
Sometimes, you may need the password to enter it manually on a laptop or other devices.
Imagine an automation that resets the guest password (upcoming feature) every day and displays the new one along with the QR code on a TV in a small business. This setup would prevent people nearby from staying connected indefinitely and ensure that only daily clients use the WiFi.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: