I want to control access to my home assistant page. I find that there is a text field named password in ios app. What does is do?
Is there any way that only access with account/password?
To add a password to HA include this in your configuration.yaml,
http:
api_password: add_your_password_here
There is only one user account at the moment. I believe multiple account access with different user permisions is on the roadmap of things to be developed.
Another worthwhile security setting to include under the http:
section is:
http:
ip_ban_enabled: True
login_attempts_threshold: 3
api_password: !secret http_password
Now if someone makes three bad login attempts their IP address will be banned from logging in. You can set up automations to notify you of bad login attempts. e.g.
- id: login_failure
alias: 'Login Failure'
hide_entity: True
trigger:
platform: template
value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}"
action:
service: notify.ios_your_iphone
data:
message: Warning - Failed login attempt detected.
While we are on security, if you are accessing HA from outside your network look at setting up DuckDNS which includes SSL encryption.
This is very clear. Thanks! This is what i want!
HI tom,
when i entered my api_password, the ios app gives “incorrect error”
i have double checked the password itself. i even use a simple one. but still does not work
it gives invalid authentication from xxx.xxx.xxx.xxx
any ideas?
That post related to versions prior to 0.77. You should now be using this:
thanks! yes, i am using 0.77 with NGINX proxy addon
The thing is with HA ios app, when i use my api_password and click save. It always say incorrect password.
and when I click “done” on the top, the HA login page show up. I can login with my user and password…
i look around found that i need to add a line"proxy_set_header x-ha-access “yourPasswordHere”;"
in nginx in this
link
link 2
however, there is no /etc/nginx.conf for nginx addon in hass.
i tried the option with additional configuration, but no luck. i cannot even placed a “location” there.
You need legacy authorisation enabled for the iOS app, at least until it is updated:
thanks for the reply, however it still does not work. I cannot still give api password pass along to HA. keep saying incorrect.
I think it has to do with nginx?
I seem to be running into the same issue. Hoping someone has a solution.
I also would like a solution for this problem. I’m a complete newbie regarding Home Assistant; it certainly looks like the software I would like to use, however this iOS bug/feature isn’t very good for the WAF.
Is there a chance this problem will be fixed in the near future, or is there a workaroud for this problem? Would really appreciate that!
I have the same issue and looking for a solution.
So somehow It got it working. I rebooted the system, and my configuration.yaml contains the following lines:
homeassistant:
auth_providers:
- type: homeassistant
- type: legacy_api_password
http:
api_password: somepassword
In the app I used my url http://ip-adress:8123, and the password is somepassword. After I used the Save button it no longer says my password is invalid, and the information is stored in the app.