I’ve noticed a few warnings about access tokens and bearer tokens (see below). The thing is, I was pretty sure I took care of this. I don’t have the legacy API password enabled.
api_password is going to deprecate. You need to use a bearer token to access /api/ios/identify from 172.11.0.2
api_password is going to deprecate. You need to use a bearer token to access /api/services/device_tracker/see from 172.11.0.2
api_password is going to deprecate. You need to use a bearer token to access /api/config from 172.11.0.2
api_password is going to deprecate. You need to use a bearer token to access /api/states from 172.11.0.2
I set up the nginx using this great guide, and I have since changed the “home assistant” part to use tokens instead of password, as per this suggestion. It seemed to work for a while (I didn’t get/see these notifications for some time), but now I’ve started to see them again.
Are you using those services listed, i.e. IOS
Maybe there service is still usi g the api password. Confirm in the config file you sent up service with or maybe HA iOS app.
Looks like something is still accessing HA using API password.
Also. If using trusted networks with reverse proxy you should add x_forward_for and trusted_proxy in HA config. I will look for it and edit this post
I’m using the iOS app (well, on my girlfriends phone), but I logged her in with the new user/pass auth, not a legacy API password. I guess I’ll check the old iPads, and make sure there’s not one still trying with legacy (but it should just be denied access though, right? Since I’m not allowing legacy in the home assistant config?).
I’m fairly sure I don’t (intentionally) use device_tracker.see (I had no idea what it was until googling it after seeing the logs).
But I can’t really make sense of what the deal is about accessing /api/config or /api/states… The only way I know that I interact wit them is via UI, and a few Tasker POST requests through RESTask (but using Authorization: Bearer …).
If you have the config setup for using trusted with nginx, I’d love to see that.
I should note that it seems to be an occasional thing, that these warnings show up, and I haven’t been able to discern the pattern.
HI, I still have legacy password enabled. but Im not using it. see my conf
homeassistant:
# https://developers.home-assistant.io/blog/2018/07/02/trying-new-auth.html
auth_providers:
# Uncomment next line if you want to enable legacy API password support
- type: homeassistant
# Name of the location where Home Assistant is running
- type: legacy_api_password
api_password: !secret http_password
# The Trusted Networks auth provider defines a range of IP addresses for which no authentication will be required
- type: trusted_networks
trusted_networks:
- 127.0.0.1
- 192.168.1.0/24
This is my http:
http:
ip_ban_enabled: true #blocks unathorized ips from accessing HA
login_attempts_threshold: 5 #number of attempts before ip is banned
base_url: myhass
use_x_forwarded_for: true
trusted_proxies:
- 172.10.0.10 #as set up in docker-compose for Nginx/Letsencrypt
- ::1
I gave letsencrypt a static docker ip and I addded it into trusted proxies.