Login/password authentication

Hi

Is there a way to implement username / password login when connecting to the controller using the app from a client device like iPhone? With out this any device that has the up address and port number of the controller is able to connect and download the panel. Thanks

Hi,

You'll be glad to hear that it's quite a straight forward process to setup user authentication in Tomcat. (The web server in use within OpenRemote Controller)

There was a great how-to on getting it working on the old documentation resource, but unfortunately it looks like it's yet to be migrated to GitHub.

I'm confident that it's on the list.

In the mean time, try looking on Google for "Tomcat user XML"

https://www.google.co.uk/search?q=tomcat+users+xml

If memory serves correctly, there is a section in one file that just needs a # removing to activate security and another file that defines user profiles (who, passwords & panel rights).

Good luck

Stuart

Hello,

As it happens I’ve been forced to go looking for this information this afternoon, after I made an ever so small error when deleting some files…

So, I’ve managed to find this :-

This is (kind of) what I have put in place on the machine -

<?xml version='1.0' encoding='utf-8'?>

contents of users.xml

which can be found in

…/OpenRemote-Controller/security/users.xml

for this to work, the security feature needs to be turned on, which is in web.xml

Uncomment “SECURITY CONFIGURATION” at the end of the file web.xml (…/webapps/controller/WEB-INF)

As detailed in this archived forum post :- https://openremote.github.io/archive-dotorg/forums/USER%20AUTHENTICATION.html

Thanks Stuart- will give this a try!

Good luck :slight_smile:

Thus might also help, this is the old forum post I've been looking for....

https://openremote.github.io/archive-dotorg/forums/controller2.0.1%20user%20name%20password%20set%20up.html

Cheers,

Stuart

thanks for the inputs. i was able to get the authentication working by changing the configs in the 2 files as indicated in the forums. However it appears that the authentication is only triggered while downloading the a panel in the app- I am using OR in IOS and once i have the panel downloaded, it does not ask for the username / password every time launch the app. Only when i go in to the setting and click on the panel, it asks for the user name / password. Is this how it is suppose to work or am i missing something?

Hi

That's great news that you've got it working.... Of sorts.

As for what 'nornal behaviour' is... Well that will have to be someone else's job to answer.

I'd be very interested in the answer too