{"id":15086080,"url":"https://github.com/losenmann/auth-radius","last_synced_at":"2026-02-10T20:01:47.642Z","repository":{"id":255508688,"uuid":"852833461","full_name":"Losenmann/auth-radius","owner":"Losenmann","description":"Python script for Home Assistant that adding authentication via RADIUS","archived":false,"fork":false,"pushed_at":"2024-11-12T13:10:45.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T11:32:51.344Z","etag":null,"topics":["authentication","hacs","hacs-custom","home-assistant","homeassistant","radius","radius-accounting"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Losenmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T14:03:37.000Z","updated_at":"2024-11-12T12:57:41.000Z","dependencies_parsed_at":"2025-01-23T11:39:36.359Z","dependency_job_id":null,"html_url":"https://github.com/Losenmann/auth-radius","commit_stats":null,"previous_names":["losenmann/auth-radius"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Losenmann%2Fauth-radius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Losenmann%2Fauth-radius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Losenmann%2Fauth-radius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Losenmann%2Fauth-radius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Losenmann","download_url":"https://codeload.github.com/Losenmann/auth-radius/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960451,"owners_count":20375101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","hacs","hacs-custom","home-assistant","homeassistant","radius","radius-accounting"],"created_at":"2024-09-25T07:30:23.673Z","updated_at":"2025-03-17T01:42:46.953Z","avatar_url":"https://github.com/Losenmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth RADIUS\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n[![Home Assistant](https://img.shields.io/badge/home%20assistant-%2341BDF5.svg?style=for-the-badge\u0026logo=home-assistant\u0026logoColor=white)](https://www.home-assistant.io)\n[![HACS](https://img.shields.io/badge/HACS-Custom-41BDF5.svg?style=for-the-badge)](https://hacs.xyz)\n[![Release](https://img.shields.io/github/release/Losenmann/auth-radius/all.svg?style=for-the-badge)](https://github.com/Losenmann/auth-radius/releases)\n[![Maintainer](https://img.shields.io/badge/MAINTAINER-%40Losenmann-red?style=for-the-badge)](https://github.com/Losenmann)\n\nPython script for Home Assistant adding authentication via RADIUS\\\nThe project is based on the library [pyrad](https://github.com/pyradius/pyrad.git)\n\n## Overview\nThe script is designed to authenticate users in Home Assistant via a RADIUS server. This allows you to centrally manage user access.\u003cbr\u003e\nThe script supports 2 launch modes: [auth_providers](#usage-in-auth_provider-mode) and [CLI](#usage-in-cli-mode).\nFor correct operation, you must add to the [dictionary](./dictionary) in the RADIUS server dictionary file.\n\n## Install\n[![](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=losenmann\u0026repository=auth-radius\u0026category=python_script)\n\n- **Method 1.** [HACS](https://hacs.xyz) \u003e Python Script \u003e Add \u003e Auth Radius \u003e Install\n\n- **Method 2.** Copy the manually  `auth-radius.py` from [latest release](https://github.com/Losenmann/auth-radius/releases/latest) to path `/config/python_scripts`\n\n## Usage in auth_provider mode\n### Setupe\n- **Home Assistant**\n   1. Set connection parameters in the `secrets.yaml` file\n      ```yaml\n      radius_server: \"dns_or_ip_addreess_radius_server\"\n      radius_secret: \"radius_server_secret\"\n      ```\n   2. In the `configuration.yaml` file add the configuration, the authentication order matters\n      ```yaml\n      homeassistant:\n        auth_providers:\n          - type: command_line\n            command: '/usr/local/bin/python'\n            args: ['/config/python_scripts/auth-radius.py', '-m']\n            meta: true\n          - type: homeassistant\n      ```\n\u003e [!NOTE]\n\u003e You can remove the `meta: true` directive so that the script does not write some variables to standard output to populate the user account created in Home Assistant with additional data\n\n- **RADIUS**\n   1. Add data from the file [dictionary](./dictionary) to the RADIUS server's `dictionary` file\n   2. Set the user's `Hass-Group` attribute to `system-users`\n\n      | Attribute | Type | Value | Description |\n      | :-- | :--: | :-----: | :---------- |\n      | `Hass-Group` | string | system-users \u003cbr\u003e system-admin | User group |\n      | `Hass-Local-Only` | byte | 0 \u003cbr\u003e 1 | Local login only \u003cbr\u003e (Defaults to 0) |\n      | `Hass-Is-Active` | byte  | 0 \u003cbr\u003e 1 | Activate user account \u003cbr\u003e (Defaults to 1) |\n\n## Usage in CLI mode\nIn CLI mode, you need to set execution permissions `chmod +x ./python_scripts/auth-ldap.py`\u003cbr\u003e\nOr run via Python `python ./python_scripts/auth-radius.py`\n\u003e [!NOTE]\n\u003e RADIUS connection parameters can be configured in `secrets.yaml`, see point 1 of the chapter [Usage in auth_provider mode](#usage-in-auth_provider-mode)\n```\n./python_scripts/auth-radius.py -U 'username' -P 'password' -s 'radius.example.com' -S 'secret'\n```\n\n## Script arguments\n\u003e [!IMPORTANT]\n\u003e When using keys, keys take precedence over values ​​from secret.yaml and variables passed from Home Assistant\n\n| key  | type | description |\n| :--- | :--: | :---------- |\n| `-h` | boolean | Get help information |\n| `-m` | boolean | Enable meta to output credentials to stdout \u003cbr\u003e (Defaults to False) |\n| `-U` | string  | Username |\n| `-P` | string  | Password |\n| `-s` | string  | RADIUS server \u003cbr\u003e (Defaults from `secrets.yaml`) |\n| `-S` | string  | RADIUS secret \u003cbr\u003e (Defaults from `secrets.yaml`) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flosenmann%2Fauth-radius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flosenmann%2Fauth-radius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flosenmann%2Fauth-radius/lists"}