Skip to content

Webviews using authentication aren't working anymore #1034

@Mr-iX

Description

@Mr-iX

Description
The latest version of the OpenHAB iOS app broke the ability to use Webviews behind authentication.

In my sitemap I have the following lines:

Text item=co2_sensor_co2 valuecolor=[<800="green",<1000="orange",<1400="red",>1399="maroon"] {
    Webview icon=none url="https://<ip>/static/grafana-co2-buero.html" height=6
}

This webview points to the following file (/etc/openhab/html/grafana-co2-buero.html):

<iframe src="https://<ip>/grafana/d-solo/obZEuT3Mk/openhab?orgId=1&refresh=30s&from=now-24h&to=now&panelId=7"></iframe>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

<style>
iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}
</style>

To access the html as well as the Grafana instance an HTTP basic auth is required. The same username and password are required as for accessing OpenHAB itself, therefore those are set in the "Home Settings" tab of the OpenHAB iOS app.

However in the latest version of the OpenHAB iOS app these credentials are not sent anymore for Webviews and therefore I'm getting a 401 Authorization Required error. In a previous version of the OpenHAB iOS app this already worked fine for many years.

Screenshots
Image

Expected behavior
Webview is shown using the same credentials for authentication similar to the Basic UI that already comes with openHAB:

Image

App:

  • Version 3.1.41 (98)

Smartphone:

  • Device: iPhone 17

openHAB:

  • Version 5.1.0 (Release Build)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions