diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-31 04:53:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-31 04:53:25 +0000 |
commit | b0fa42cfbb13061d194bc546f3054f9a076f33aa (patch) | |
tree | 09ecca985fbb455eaeb1b7eafb14581f722e8abe | |
parent | 52e013b040721ed1b986e641354e049440745cb7 (diff) |
automatic import of python-hass-auth-synology
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-hass-auth-synology.spec | 319 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 321 insertions, 0 deletions
@@ -0,0 +1 @@ +/hass-auth-synology-0.4.28.tar.gz diff --git a/python-hass-auth-synology.spec b/python-hass-auth-synology.spec new file mode 100644 index 0000000..affa333 --- /dev/null +++ b/python-hass-auth-synology.spec @@ -0,0 +1,319 @@ +%global _empty_manifest_terminate_build 0 +Name: python-hass-auth-synology +Version: 0.4.28 +Release: 1 +Summary: Synology authentication provider for Home Assistant +License: Apache-2.0 +URL: https://github.com/sdebruyn/hass-auth-synology +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/15/65/2dffdaae2a0f180ae96e2478aa7c7275cf903759b6f0a21ee57d6833721e/hass-auth-synology-0.4.28.tar.gz +BuildArch: noarch + +Requires: python3-homeassistant + +%description +# Authentication provider using Synology DSM users for Home Assistant + + + + + + + +The Synology authentication provider lets you authenticate using the users in your Synology DSM. Anyone with a user account on your Synology NAS will be able to login. + +The provider supports 2-factor authentication, according to what is configured in DSM. +When logging in, there will be a field to enter the 2FA code. The field is optional, but it should be used if your account in DSM requires 2FA. Otherwise, it can be left empty. + +The use of 2FA within this provider is independent of the 2FA configuration in Home Assistant. If you enable 2FA in Home Assistant, and it is also enabled in Synology, you will have to enter 2 2FA codes. + +The provider requires DSM 7.0 or newer. + +## Installation + +### Home Assistant Container + +Use this package's container instead of the Home Assistant one. + +``` +ghcr.io/sdebruyn/hass-auth-synology:latest +``` + +### Home Assistant Core + +The installation will have to be redone everytime you update Home Assistant. + +1. Make sure the Home Assistant virtualenv is activated: `source bin/activate` +2. Install this package: `pip3 install hass-auth-synology` +3. Run the installation command: `hass-auth-synology install` + +### Home Assistant Supervised + +The installation will have to be redone everytime you update Home Assistant. + +1. Search for the “SSH & Web Terminal” add-on in the add-on store and install it. +2. Configure the username and password/authorized_keys options. +3. Start the “SSH & Web Terminal” add-on +4. Run the following code through the web terminal: + ```shell + pip3 install hass-auth-synology + hass-auth-synology install + ``` +5. You can now disable and remove the “SSH & Web Terminal” add-on again. + +## Configuration + +Add the following to your Home Assistant configuration: + +```yaml +homeassistant: + auth_providers: + - type: synology + host: nas.local + port: 443 + secure: true + verify_cert: true +``` + +* `host`: IP address or hostname of your NAS. +* `port`: Port on which DSM is available. Make sure to use one corresponding to HTTP or HTTPS as configured with `secure` . +* `secure` (optional): Enable this to use HTTPS instead of HTTP. (default: false) +* `verify_cert` (optional): Enable this to verify the certificate when using HTTPS (default: false). +Make sure to disable this when using self-signed certificates or an IP address instead of a hostname. +The setting is ignored when `secure` is false. + +## Troubleshooting + +If any errors occur, make sure to check your Home Assistant logs. If the connection succeeds, but authentication fails, Synology DSM will output an error code. +The meaning of the error code can be found [in the Synology DSM Login API documentation](https://global.download.synology.com/download/Document/Software/DeveloperGuide/Os/DSM/All/enu/DSM_Login_Web_API_Guide_enu.pdf). + +Feel free to open an issue on GitHub if you encounter any issues. + +## License & attribution + +Apache v2.0 + +Test utilities under `tests` are coming from [Home Assistant Core](https://github.com/home-assistant/core). + + +%package -n python3-hass-auth-synology +Summary: Synology authentication provider for Home Assistant +Provides: python-hass-auth-synology +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-hass-auth-synology +# Authentication provider using Synology DSM users for Home Assistant + + + + + + + +The Synology authentication provider lets you authenticate using the users in your Synology DSM. Anyone with a user account on your Synology NAS will be able to login. + +The provider supports 2-factor authentication, according to what is configured in DSM. +When logging in, there will be a field to enter the 2FA code. The field is optional, but it should be used if your account in DSM requires 2FA. Otherwise, it can be left empty. + +The use of 2FA within this provider is independent of the 2FA configuration in Home Assistant. If you enable 2FA in Home Assistant, and it is also enabled in Synology, you will have to enter 2 2FA codes. + +The provider requires DSM 7.0 or newer. + +## Installation + +### Home Assistant Container + +Use this package's container instead of the Home Assistant one. + +``` +ghcr.io/sdebruyn/hass-auth-synology:latest +``` + +### Home Assistant Core + +The installation will have to be redone everytime you update Home Assistant. + +1. Make sure the Home Assistant virtualenv is activated: `source bin/activate` +2. Install this package: `pip3 install hass-auth-synology` +3. Run the installation command: `hass-auth-synology install` + +### Home Assistant Supervised + +The installation will have to be redone everytime you update Home Assistant. + +1. Search for the “SSH & Web Terminal” add-on in the add-on store and install it. +2. Configure the username and password/authorized_keys options. +3. Start the “SSH & Web Terminal” add-on +4. Run the following code through the web terminal: + ```shell + pip3 install hass-auth-synology + hass-auth-synology install + ``` +5. You can now disable and remove the “SSH & Web Terminal” add-on again. + +## Configuration + +Add the following to your Home Assistant configuration: + +```yaml +homeassistant: + auth_providers: + - type: synology + host: nas.local + port: 443 + secure: true + verify_cert: true +``` + +* `host`: IP address or hostname of your NAS. +* `port`: Port on which DSM is available. Make sure to use one corresponding to HTTP or HTTPS as configured with `secure` . +* `secure` (optional): Enable this to use HTTPS instead of HTTP. (default: false) +* `verify_cert` (optional): Enable this to verify the certificate when using HTTPS (default: false). +Make sure to disable this when using self-signed certificates or an IP address instead of a hostname. +The setting is ignored when `secure` is false. + +## Troubleshooting + +If any errors occur, make sure to check your Home Assistant logs. If the connection succeeds, but authentication fails, Synology DSM will output an error code. +The meaning of the error code can be found [in the Synology DSM Login API documentation](https://global.download.synology.com/download/Document/Software/DeveloperGuide/Os/DSM/All/enu/DSM_Login_Web_API_Guide_enu.pdf). + +Feel free to open an issue on GitHub if you encounter any issues. + +## License & attribution + +Apache v2.0 + +Test utilities under `tests` are coming from [Home Assistant Core](https://github.com/home-assistant/core). + + +%package help +Summary: Development documents and examples for hass-auth-synology +Provides: python3-hass-auth-synology-doc +%description help +# Authentication provider using Synology DSM users for Home Assistant + + + + + + + +The Synology authentication provider lets you authenticate using the users in your Synology DSM. Anyone with a user account on your Synology NAS will be able to login. + +The provider supports 2-factor authentication, according to what is configured in DSM. +When logging in, there will be a field to enter the 2FA code. The field is optional, but it should be used if your account in DSM requires 2FA. Otherwise, it can be left empty. + +The use of 2FA within this provider is independent of the 2FA configuration in Home Assistant. If you enable 2FA in Home Assistant, and it is also enabled in Synology, you will have to enter 2 2FA codes. + +The provider requires DSM 7.0 or newer. + +## Installation + +### Home Assistant Container + +Use this package's container instead of the Home Assistant one. + +``` +ghcr.io/sdebruyn/hass-auth-synology:latest +``` + +### Home Assistant Core + +The installation will have to be redone everytime you update Home Assistant. + +1. Make sure the Home Assistant virtualenv is activated: `source bin/activate` +2. Install this package: `pip3 install hass-auth-synology` +3. Run the installation command: `hass-auth-synology install` + +### Home Assistant Supervised + +The installation will have to be redone everytime you update Home Assistant. + +1. Search for the “SSH & Web Terminal” add-on in the add-on store and install it. +2. Configure the username and password/authorized_keys options. +3. Start the “SSH & Web Terminal” add-on +4. Run the following code through the web terminal: + ```shell + pip3 install hass-auth-synology + hass-auth-synology install + ``` +5. You can now disable and remove the “SSH & Web Terminal” add-on again. + +## Configuration + +Add the following to your Home Assistant configuration: + +```yaml +homeassistant: + auth_providers: + - type: synology + host: nas.local + port: 443 + secure: true + verify_cert: true +``` + +* `host`: IP address or hostname of your NAS. +* `port`: Port on which DSM is available. Make sure to use one corresponding to HTTP or HTTPS as configured with `secure` . +* `secure` (optional): Enable this to use HTTPS instead of HTTP. (default: false) +* `verify_cert` (optional): Enable this to verify the certificate when using HTTPS (default: false). +Make sure to disable this when using self-signed certificates or an IP address instead of a hostname. +The setting is ignored when `secure` is false. + +## Troubleshooting + +If any errors occur, make sure to check your Home Assistant logs. If the connection succeeds, but authentication fails, Synology DSM will output an error code. +The meaning of the error code can be found [in the Synology DSM Login API documentation](https://global.download.synology.com/download/Document/Software/DeveloperGuide/Os/DSM/All/enu/DSM_Login_Web_API_Guide_enu.pdf). + +Feel free to open an issue on GitHub if you encounter any issues. + +## License & attribution + +Apache v2.0 + +Test utilities under `tests` are coming from [Home Assistant Core](https://github.com/home-assistant/core). + + +%prep +%autosetup -n hass-auth-synology-0.4.28 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-hass-auth-synology -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.28-1 +- Package Spec generated @@ -0,0 +1 @@ +9e47bbf10b3c06956fc26e0c3dbc74d6 hass-auth-synology-0.4.28.tar.gz |