Usrs.cfg in openHab2

Hi,

In openHab 1.x there is a file openhab/configurations/users.cfg where you can define your user like

this:user=password,user,role
pi=raspberry

where is this file in openHab2?

Thanks in advance

OH 2 does not yet (ever?) support users. See the following for how to setup a reverse proxy to add user authentication and authorization.

Thanks @rlkoshak.

It is in the works, but it isn’t that easy to get right, see
https://github.com/eclipse/smarthome/issues/579 and https://github.com/eclipse/smarthome/pull/2359.

Good to know it is in works. I agree, getting authentication and authorization right is challenging. I wasn’t sure if this was just something planned for later.

Hello!
Is this compatible with Apple openHAB mobile application?
Thanks!

Since it isn’t implemented fully yet it isn’t compatible with anything yet.

Hello Rich,
I’ve tested now NGINX Reverse Proxy + Apple openHAB App…
and work correctly!

10.255.255.20 - sim [15/Mar/2018:11:39:06 +0100] "GET /rest/bindings HTTP/1.1" 200 371 "-" "openHAB/2.0.2.0 CFNetwork/894 Darwin/17.4.0"
10.255.255.20 - sim [15/Mar/2018:11:39:06 +0100] "GET /rest/sitemaps HTTP/1.1" 200 420 "-" "openHAB/2.0.2.0 CFNetwork/894 Darwin/17.4.0"
10.255.255.20 - sim [15/Mar/2018:11:39:06 +0100] "GET /rest/sitemaps/house/house HTTP/1.1" 200 10578 "-" "openHAB/2.0.2.0 CFNetwork/894 Darwin/17.4.0"
10.255.255.20 - sim [15/Mar/2018:11:39:08 +0100] "GET /rest/sitemaps/house/house HTTP/1.1" 499 0 "-" "openHAB/2.0.2.0 CFNetwork/894 Darwin/17.4.0"

Happy!

Hi Sim I’ve also tried this and failed. I can get the HABPanel working in a browser so I know my reverse proxy works but how did you get the iOS app to enter the user name and password for the proxy? I’m using Apache not NGINX

I’ve solved the problem. The Apache reverse proxy virtual host needs the X-Forwarded-Proto “https” line. It all work with this plugged in

Hi Shell,
very good!

Please also look at my advice for limit direct access: