Where to reference Jetty's Openhab WebAppContext file declaration?

  • Platform information:
    • Hardware: armv7l
    • OS: Linux odroid (Ubuntu buster/sid based)
    • Java Runtime Environment: Zulu8.42.0.195-CA-linux_aarch32hf
    • openHAB version: 2.5.0
  • Issue of the topic: I’d like to configure some Jetty BASIC Auth on my openhab server since it seems like no auth is supposed out of the box currently.

For this, I’d like to setup a simple per-webapp context XML file (like described here : https://www.eclipse.org/jetty/documentation/current/configuring-security.html#_configuring_authorization_with_context_xml_files) but I don’t know where to put (or reference) this file from my openhab2 installation.

Any help would be greatly appreciated :slight_smile:

Note that I followed installation instruction for Linux APT-based systems (https://www.openhab.org/docs/installation/linux.html#apt-based-systems) for my installation.

Kind regards,

The usual recommended upgrade is to use some add-on tool like NGINX.
I do not know, but there may be good reasons not to tinker with jetty.

This very old thread explores some of the options. From what I can make out. jetty is not itself very helpful e.g. does not support certs?

For what its worth, I miss the simple password of OH1, but we are where we are, and that probably gave a false sense of security.

The usual recommended upgrade is to use some add-on tool like NGINX.

Thanks for your feedback.
I wanted to avoid configuring nginx auth because I’m currently using an nginx config on my NAS Synology and I read here and there that configuring auth on the NAS was complicated.

But, thinking twice about it after your comment, I simply installed an nginx on my openhab server, and quickly configured auth on it, making the following HTTP flow working :

=(my-sub-domain:443)=> nginx (on NAS)
=(my-openhab-server-internal-ip:80)=> nginx (on openhab server) with BASIC auth 
=(localhost:8080)=> openhab2```