After an otherwise succesfull upgrade, my openhab.log is flooding with this.
2021-01-02 12:35:17.412 [WARN ] [ore.io.rest.auth.internal.AuthFilter] - Unauthorized API request: Invalid Basic authentication credentials
2021-01-02 12:35:27.512 [WARN ] [ore.io.rest.auth.internal.AuthFilter] - Unauthorized API request: Invalid Basic authentication credentials
It keeps on every 10 seconds.
Pi 4, 4 GB RAM
Openhabian, upgraded via openhabian-config.
I have basic auth enabled in the REST API settings.
At the same time my visual studio code is no longer giving me item states, when I hover over them in the editor. Don’t know if that can be affiliated with this.
Extension settings in visual studio.
I am using token authentication on my node-red rules, which works fine, but I have no idea where this is coming from?
Ideas are very welcome:-)
Your Visual Studio Code is not authenticating correctly. There are threads here with the proper configuration but I do not use VS Code for this.
Ok-thanks for that
Does anyone know if the some user settings have changed in connection with the upgrade? (Haven’t changed anything, and it worked prior).
Yes, the API now requires authentication. You enabled it in OH but did not configure VSCode to authenticate.
This is all documented in the Release notes which should be required reading before upgrading. This forum is not a replacement for reading the documentation
I did read the release notes before upgrading.
I was not fully aware what the error meant - it seems I am still not, because my VS Code is know working (token authentication) and updating item states correctly, but the error still remains in the openhab.log.
I just know the dev has posted in the forum the configuration for VSCode that functions.
Ok - thanks for your help:-)
Read this forum,
Since questions are being asked repeatedly i wanted to share a quick Thread.
It can be used as a short FAQ when questions come up.
I will add important changes and culprits here when needed.
My Rest API doesn’t work any longer
This should mostly be related to our api security update in openHAB 3.
openHAB 3 introduces an authentication layer to the api.
Basic Auth configuration
You have to configure your openHAB instance proper and add some configuration to the openHAB extension.
Allow Basic Authentication in OH3
How to generate an API token
How to generate an API token
Sign in to OpenHAB with your administrator username and password by clicking on the bottom left icon in your dashboard.
After signing in, click again on the profile button to access your profile page.
Click on Create new API token.
Use your admin username and password, fill in the token name (e.g. choose a name to remember the service you created the token for) and a Token Scope (optional)
Now the token is created. Please copy the f…
Then in VScode configuration use as username your api token, and password is empty.