[mythtv-commits] [MythTV/mythtv] 9e2595: Service API Authentication support

Peter Bennett noreply at github.com
Tue May 20 19:14:29 UTC 2025


  Branch: refs/heads/devel/webbapp-authentication
  Home:   https://github.com/MythTV/mythtv
  Commit: 9e259543a26dbd5e6899ec22753c2466872df962
      https://github.com/MythTV/mythtv/commit/9e259543a26dbd5e6899ec22753c2466872df962
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mythtv/libs/libmythbase/http/mythhttprequest.cpp
    M mythtv/libs/libmythbase/http/mythhttprequest.h
    M mythtv/libs/libmythbase/http/mythhttpservice.cpp
    M mythtv/libs/libmythbase/mythcorecontext.cpp
    M mythtv/libs/libmythbase/mythcorecontext.h
    M mythtv/libs/libmythbase/mythsession.cpp
    M mythtv/libs/libmythbase/mythsession.h
    M mythtv/programs/mythbackend/servicesv2/v2myth.cpp
    M mythtv/programs/mythbackend/servicesv2/v2myth.h

  Log Message:
  -----------
  Service API Authentication support

Add support for username and password authentication for the backend
service API. New methods Myth/LoginUser and Myth/GetUsers. Authenticate
using an access token supplied by the Myth/LoginUser method following
a valid user name and password.

A new setting APIAuthReqd determines whether authentication is required
and whether it is required only for remote IP addresses or for all IP
addresses. By default it is set to NONE.

All methods are protected when APIAuthReqd is enabled except for
Myth/LoginUser and Myth/GetConnectionInfo.

This builds on the existing mythsession framework already developed for
the defunct web frontend. The admin user is already pre-populated in
the database.


  Commit: 62d959a8cd5d7a7f081291b434ccef81f488f8ab
      https://github.com/MythTV/mythtv/commit/62d959a8cd5d7a7f081291b434ccef81f488f8ab
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mythtv/html/assets/i18n/en_US.json
    M mythtv/html/backend/src/app/app.module.ts
    M mythtv/html/backend/src/app/config/settings/channel-editor/channel-editor.component.html
    M mythtv/html/backend/src/app/config/settings/channel-editor/channel-editor.component.ts
    M mythtv/html/backend/src/app/dashboard/dashboard-settings/channel-groups/channel-groups.component.html
    M mythtv/html/backend/src/app/dashboard/dashboard-settings/channel-groups/channel-groups.component.ts
    M mythtv/html/backend/src/app/dashboard/dashboard-settings/dashboard-settings.component.html
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.css
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.html
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.spec.ts
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.ts
    M mythtv/html/backend/src/app/dashboard/dashboard.component.html
    M mythtv/html/backend/src/app/dashboard/recordings/recordings.component.html
    M mythtv/html/backend/src/app/dashboard/recordings/recordings.component.ts
    M mythtv/html/backend/src/app/dashboard/videos/videos.component.html
    M mythtv/html/backend/src/app/dashboard/videos/videos.component.ts
    M mythtv/html/backend/src/app/guide/components/channelicon/channelicon.component.html
    M mythtv/html/backend/src/app/guide/components/channelicon/channelicon.component.ts
    M mythtv/html/backend/src/app/layout/navbar/navbar.component.html
    M mythtv/html/backend/src/app/layout/navbar/navbar.component.ts
    M mythtv/html/backend/src/app/primeng.module.ts
    M mythtv/html/backend/src/app/services/data.service.ts
    A mythtv/html/backend/src/app/services/error.interceptor.spec.ts
    A mythtv/html/backend/src/app/services/error.interceptor.ts
    M mythtv/html/backend/src/app/services/interfaces/myth.interface.ts
    M mythtv/html/backend/src/app/services/myth.service.ts
    A mythtv/html/backend/src/app/services/token.interceptor.spec.ts
    A mythtv/html/backend/src/app/services/token.interceptor.ts

  Log Message:
  -----------
  Web App Authentication Support

Add support for username and password authentication for the backend
web app.

Add a new section "Users" under Dashboard -> Settings. This supports
enabling the authentication requirement, selecting whether all IP
addresses or only remote IP addresses are protected, creating and
maintaining user login names and passwords.

Add a login link to the top banner of the web app. Also force a login
prompt if the backend requires a login (via http 401 response).

Update all communications to the backend to include the access token
from login if a login was performed.


  Commit: a1471653d3624e9051413fe232915173a78c9148
      https://github.com/MythTV/mythtv/commit/a1471653d3624e9051413fe232915173a78c9148
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mythtv/libs/libmythbase/http/mythhttpservice.cpp
    M mythtv/libs/libmythbase/mythcorecontext.cpp
    M mythtv/libs/libmythbase/mythcorecontext.h

  Log Message:
  -----------
  Remove incorrect ip address warning messages

The change for web app authentication caused warning messages about
invalid ip addresses to be shown when the ip addressesd were permitted.


  Commit: 1d55d774b70dab151aae6cab2eac8c6e8b0fef66
      https://github.com/MythTV/mythtv/commit/1d55d774b70dab151aae6cab2eac8c6e8b0fef66
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mythtv/libs/libmythbase/mythsession.cpp

  Log Message:
  -----------
  Fix seg fault in session removal

sesssion removal from a list with an iterator cause seg faults.


  Commit: 78a0abec5bdc76655f2a463c7316f1c2deb45326
      https://github.com/MythTV/mythtv/commit/78a0abec5bdc76655f2a463c7316f1c2deb45326
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mythtv/html/assets/i18n/bg.json
    M mythtv/html/assets/i18n/ca.json
    M mythtv/html/assets/i18n/cs.json
    M mythtv/html/assets/i18n/da.json
    M mythtv/html/assets/i18n/de.json
    M mythtv/html/assets/i18n/el.json
    M mythtv/html/assets/i18n/en_CA.json
    M mythtv/html/assets/i18n/en_GB.json
    M mythtv/html/assets/i18n/es.json
    M mythtv/html/assets/i18n/es_ES.json
    M mythtv/html/assets/i18n/et.json
    M mythtv/html/assets/i18n/fi.json
    M mythtv/html/assets/i18n/fr.json
    M mythtv/html/assets/i18n/he.json
    M mythtv/html/assets/i18n/hr.json
    M mythtv/html/assets/i18n/hu.json
    M mythtv/html/assets/i18n/is.json
    M mythtv/html/assets/i18n/it.json
    M mythtv/html/assets/i18n/ja.json
    M mythtv/html/assets/i18n/nb.json
    M mythtv/html/assets/i18n/nl.json
    M mythtv/html/assets/i18n/pl.json
    M mythtv/html/assets/i18n/pt.json
    M mythtv/html/assets/i18n/pt_BR.json
    M mythtv/html/assets/i18n/ru.json
    M mythtv/html/assets/i18n/sl.json
    M mythtv/html/assets/i18n/sv.json
    M mythtv/html/assets/i18n/tr.json
    M mythtv/html/assets/i18n/zh_CN.json
    M mythtv/html/assets/i18n/zh_HK.json

  Log Message:
  -----------
  Translations for web app authentication.


Compare: https://github.com/MythTV/mythtv/compare/9f342df8f71a...78a0abec5bdc

To unsubscribe from these emails, change your notification settings at https://github.com/MythTV/mythtv/settings/notifications


More information about the mythtv-commits mailing list