When using OpenHAB to control our house, we would like to have to security in place. The way to enable security in OpenHAB is to edit the file named openhab.cfg. Look for the line starts with ‘security:option=’.
If we do ‘security:option=EXTERNAL’, it means that only when we try to connect to the OpenHAB server from external network, i.e., Internet, it will ask for username/password. It will not ask for credentials.
If we do ‘security:option=ON’, it will always ask for username/password.
Once the security is turned on, we can add the username and password to the file user.cfg, for example,