BeryJu / hass-auth-header

Home Assistant custom component, which allows you to delegate authentication to a reverse proxy.
GNU General Public License v3.0
252 stars 19 forks source link

hass-auth-header broken in Home Assistant 2023.8.0b0 #275

Closed christophermichaelshaw closed 1 year ago

christophermichaelshaw commented 1 year ago

Receive the following error when connecting to HA instance after updating to 2023.8.0.b0: image

Enabled Debug logs; output:

HA Host Logs: Jul 26 22:10:03 homeassistant systemd-journald[235]: /var/log/journal/b40d07b636f746f7876476d129745794/system.journal: Journal header limits reached or header out-of-date, rotating. Jul 26 22:14:47 homeassistant systemd-journald[235]: /var/log/journal/b40d07b636f746f7876476d129745794/system.journal: Journal header limits reached or header out-of-date, rotating. Jul 26 22:19:22 homeassistant systemd-journald[235]: /var/log/journal/b40d07b636f746f7876476d129745794/system.journal: Journal header limits reached or header out-of-date, rotating.

I see the request passed through Nginx successfully: 26/Jul/2023:15:34:26 -0700] - 500 500 - POST https homeassistant "/auth/login_flow" [Client 10.17.15.204] [Length 55] [Gzip -] [Sent-to homeassistant] "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" "https://homeassistant/auth/authorize?response_type=code&redirect_uri=https%3A%2F%2Fhomeassistant%2F%3Fauth_callback%3D1&client_id=https%3A%2F%2Fhomeassistant%2F&state=[token]

I don't see any other applicable log entries, but am happy to help troubleshoot further.

Helvio88 commented 1 year ago

Same issue, this is the error in the logs:

File "/config/custom_components/auth_header/headers.py", line 50, in async_login_flow
    if header_name not in request.headers:
                          ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'headers'
ddavtian commented 1 year ago

same issue :-(

BeryJu commented 1 year ago

This is fixed with v1.10

christophermichaelshaw commented 1 year ago

Confirmed v1.10 does indeed resolve the issue, but I had to install it manually by copying the updated files from the update (hjass-auth-header-1.10/custom_components/auth_header) to the config/custom_components/auth_header folder on my HA instance.

It appears the v1.10 release has not been signed, which is why it does not appear as a valid HACS update.

On Sun, Jul 30, 2023 at 10:40 AM Jens L. @.***> wrote:

This is fixed with v1.10

— Reply to this email directly, view it on GitHub https://github.com/BeryJu/hass-auth-header/issues/275#issuecomment-1657228091, or unsubscribe https://github.com/notifications/unsubscribe-auth/APSZUKGOPWBAKC7CULIFOLLXS2MCPANCNFSM6AAAAAA2ZHRWW4 . You are receiving this because you authored the thread.Message ID: @.***>

--

Christopher Shaw @.*** 425.435.8440

BeryJu commented 1 year ago

Oh my bad, I forgot that for previous versions I created a GitHub release instead of just tagging it, should be fixed now

christophermichaelshaw commented 1 year ago

No worries! Thank you so much for all you do and being so quick to resolve these issues.

Just reinstalled using HACS to install v1.10 and it worked as expected. Happy to help troubleshoot/verify any further issues.

On Mon, Jul 31, 2023 at 01:48 Jens L. @.***> wrote:

Oh my bad, I forgot that for previous versions I created a GitHub release instead of just tagging it, should be fixed now

— Reply to this email directly, view it on GitHub https://github.com/BeryJu/hass-auth-header/issues/275#issuecomment-1657937733, or unsubscribe https://github.com/notifications/unsubscribe-auth/APSZUKGZPMNZQVJFWC3G6KLXS5WMNANCNFSM6AAAAAA2ZHRWW4 . You are receiving this because you authored the thread.Message ID: @.***>

--

Christopher Shaw @.*** 425.435.8440