{"id":18376873,"url":"https://github.com/bbc/nmos-auth-server","last_synced_at":"2025-12-30T15:38:03.388Z","repository":{"id":49190016,"uuid":"141139078","full_name":"bbc/nmos-auth-server","owner":"bbc","description":"AMWA NMOS BCP-003-02 Authorisation Server","archived":false,"fork":false,"pushed_at":"2021-06-24T10:11:04.000Z","size":10688,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-22T06:51:13.812Z","etag":null,"topics":["bcp-003","nmos","oauth2-authentication","oauth2-server","rd-project","rd-section-apmm","rd-stability-green","security"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-16T12:59:49.000Z","updated_at":"2024-06-19T19:45:41.000Z","dependencies_parsed_at":"2022-08-19T04:40:51.761Z","dependency_job_id":null,"html_url":"https://github.com/bbc/nmos-auth-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fnmos-auth-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fnmos-auth-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fnmos-auth-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fnmos-auth-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbc","download_url":"https://codeload.github.com/bbc/nmos-auth-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247547614,"owners_count":20956585,"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":["bcp-003","nmos","oauth2-authentication","oauth2-server","rd-project","rd-section-apmm","rd-stability-green","security"],"created_at":"2024-11-06T00:25:13.682Z","updated_at":"2025-12-13T21:04:23.432Z","avatar_url":"https://github.com/bbc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!---NAME---\u003e\n# AMWA NMOS BCP-003-02 Authorisation Server Implementation\n\u003c!---/NAME---\u003e\n\nA Flask-based implementation of an OAuth2 Authorisation Server\nbased on [AMWA NMOS BCP-003-02](https://amwa-tv.github.io/nmos-api-security/best-practice-authorisation.html) using [RFC 6749](https://tools.ietf.org/html/rfc6749). The API implemented here is a candidate to become the proposed specification AMWA NMOS IS-10.\n\nThe server produces access tokens in the form of [JSON Web Tokens](https://tools.ietf.org/html/rfc7519). Dynamic Client Registration is also supported in line with [RFC 7591](https://tools.ietf.org/html/rfc7591).\n\nThe core of the implementation uses the [Authlib](https://authlib.org/) Library, and is based on the [Authlib OAuth2 Server Example](https://github.com/authlib/example-oauth2-server).\n\n**Please Check the [README.md](https://github.com/bbc/nmos-auth-server/tree/master/nmosauth) in the `nmosauth` directory for more in-depth instructions on starting the AMWA NMOS Authorisation Server and registering a client.**\n\n## Installation\n\n### System Requirements\n\n*   Linux (untested on Windows and Mac)\n*   Python 3.x\n*   Python Pip3\n\n### Python3 Requirements\n\nThese should be installed automatically as part of the install process.\n\n* six\n* nmoscommon\n* Flask\n* sqlalchemy\n* Flask-SQLAlchemy\n* Authlib\u003e=1.1\n* Flask-Cors\n* requests\n* gevent\n* systemd\n* pyopenssl\n\n### Python Installation\n\nDue to the installation needing to install files into system directories (`/var/nmosauth` for system files and `/usr/bin` for executable files) the `--no-binary` flag must be set in order to pull the source distribution from PyPi and not a Wheel (built) distribution.\nTo install from pip:\n\n```bash\n# Install From Pip\n$ sudo pip3 install nmos-auth --no-binary nmos-auth\n```\n\nFor pip3 installations from source:\n\n```bash\n# Change to top-level directory\n$ cd nmos-auth-server\n\n# Install via pip locally\n$ sudo pip3 install . --no-binary nmos-auth\n```\n\nFor basic setuptools installations:\n\n```bash\n# Install Python setuptools\n$ sudo pip3 install setuptools\n\n# Install the package\n$ cd nmos-auth-server\n$ sudo python3 setup.py install\n```\n\n### Testing\n\nTesting of the package can be achieved using tox:\n```bash\n# Install tox\nsudo pip3 install tox\n\n# Run tests using tox environment for Python3\ncd nmos-auth-server\ntox -e py3\n```\n\n### Debian\n\nFor use as a Debian package (on Ubuntu/Debian systems):\n\n```bash\nmake deb\ncd dist/\nsudo dpkg -i \u003cname of package\u003e.deb\n```\n\n**NOTE FOR USE ON R\u0026D NETWORK**: If there is a dependency clash during installation, you may need to install `python-sqlalchemy` using:\n\n`sudo apt-get install python-sqlalchemy=1.0.11+ds1-1ubuntu2`\n\n**NOTE WHEN INSTALLING VIA DEBIAN PACKAGE**: The version of cryptography and pyOpenSSL on the Ubuntu Xenial mirrors are out-of-date. Please install both Cryptography and PyOpenSSL via Pip for compatible versions.\n\n\n## Usage\n\n### Basic Usage\n\nFor pure Python usage:\n\n```bash\n# Execute service file\n$ sudo /usr/bin/nmosauth\n```\nIf installing via a Debian package (e.g. using apt-get, dpkg, etc), Systemd service files should be placed in system directories. The service can be restarted using:\n\n```bash\n# Run Service using SystemD\nsudo systemctl restart python3-nmos-auth\n```\n\n### Getting Started\n\nPlease Check the [README.md](https://github.com/bbc/nmos-auth-server/tree/master/nmosauth) in the `nmosauth` directory for more in-depth instructions on starting the NMOS Authorisation Server and registering a client.\n\n**You can now navigate to `http://127.0.0.1:4999/x-nmos/auth/v1.0/home/` to find the Home Page of the authorization server** in order to perform any admin tasks, such as registering users and clients.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fnmos-auth-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc%2Fnmos-auth-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fnmos-auth-server/lists"}