{"id":20863758,"url":"https://github.com/noxphx/noxcrux","last_synced_at":"2025-05-12T10:31:51.256Z","repository":{"id":41202801,"uuid":"325266997","full_name":"noxPHX/noxcrux","owner":"noxPHX","description":"Password Horcruxes","archived":false,"fork":false,"pushed_at":"2023-01-17T14:05:14.000Z","size":1421,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T05:28:10.658Z","etag":null,"topics":["api","django","docker","docker-compose","password","python","rest","security","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noxPHX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-12-29T11:21:34.000Z","updated_at":"2024-01-19T10:27:56.000Z","dependencies_parsed_at":"2023-02-10T10:00:53.679Z","dependency_job_id":null,"html_url":"https://github.com/noxPHX/noxcrux","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noxPHX%2Fnoxcrux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noxPHX%2Fnoxcrux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noxPHX%2Fnoxcrux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noxPHX%2Fnoxcrux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noxPHX","download_url":"https://codeload.github.com/noxPHX/noxcrux/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253720001,"owners_count":21952938,"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":["api","django","docker","docker-compose","password","python","rest","security","self-hosted"],"created_at":"2024-11-18T05:31:57.872Z","updated_at":"2025-05-12T10:31:50.869Z","avatar_url":"https://github.com/noxPHX.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"noxcrux_server/static/images/logo_readme.svg\"\u003e\n\u003c/div\u003e\n\n# noxcrux 🔒\nnoxcrux is a Django web application and API which allows you to manage passwords horcruxes to improve your online security.  \n\n## Introduction 🖋️\nThe persons intended by this project are people who are a minimum aware of online security risks and already use a password manager.  \n\nnoxcrux was inspired by the security mechanism of password salting/peppering and the concept of horcruxes from the universe of Harry Potter.  \nThe aim of this project is to split passwords in multiple horcruxes to mitigate the single point of failure risk induced by password managers.  \n\n**Password horcruxes are not 2FA/MFA and does not pretend to replace it at all.** A password is a sole factor (knowledge) and noxcrux allows you to distribute it across multiple locations.\n\nThe project is still in early development stage (see the [features](#features) and the [Kanban section](#kanban-%EF%B8%8F) below) but the end goal is to offer to the users multiple servers to connect to and distribute their online accounts access security to different places.  \n\nA web extension will be later developed to allow end users to easily manage their servers and to retrieve and assemble their complete password when they want to log in to a website.  \n\n### Demo\nHere is a link of a live demo of this project:  \nhttps://hydrogen.noxcrux.com/\n\n⚠️ **This is for demonstration purposes only, you should not rely on it.** ⚠️  \n⚠️ **I do not guarantee any SLA and I may shut down the service or wipe the database without any warrant.** ⚠️\n\n## Table of contents 📋\nSee below the top level parts of this README:  \n\n+ [Technologies](#technologies-%EF%B8%8F)\n+ [Features](#features-)\n+ [Getting Started](#getting-started-%EF%B8%8F)\n+ [Docker](#docker-)\n+ [API Reference](#api-reference-)\n+ [Kanban](#kanban-%EF%B8%8F)\n+ [Contributing](#contributing-)\n+ [Support](#support-%EF%B8%8F)\n+ [Licence](#licence-)\n\n## Technologies ⚙️\nnoxcrux is powered by [Django](https://www.djangoproject.com/), a well-known python web framework, and [Django Rest Framework](https://www.django-rest-framework.org/) for the API.  \nIt also makes use of [Bootstrap](https://getbootstrap.com/) and [jQuery](https://jquery.com/) for the web interface.  \n\nHere is a table with these main tools, and their current version:  \n\n| Tool                  | Version |\n|-----------------------|:-------:|\n| Django                |   3.2   |\n| Django Rest Framework |  3.12   |\n| Bootstrap             |   4.6   |\n| jQuery                |   3.6   |\n\n## Features ✅\nHere is a list of the main features provided by this project:  \n+ [x] **Zero-Knowledge End-to-End Encrypted horcruxes**\n+ [x] Complete horcrux management\n+ [x] Horcrux generator\n+ [x] Horcrux sharing \u0026 friends management\n+ [x] Personal account management\n+ [x] Active sessions management\n+ [x] 2-Factor authentication\n+ [x] Self-served API reference\n+ [x] Brute-force protection\n+ [x] Easy \u0026 Secure deployment with Docker\n\n## Getting Started 🛠️\nHere is what you need to do to get a noxcrux server up \u0026 running. This is also the recommended way to install it for a development setup.\n\nFollowing are the commands to build the application straight from the sources, find below the [Docker instructions](#docker) for a production-ready environment or to just quickly get a server running.\n\n### Prerequisites\nnoxcrux is being developed and tested on debian-based GNU/Linux distributions, so you will see below the commands for them, but you might know how to adapt them.\n\nDjango is a python web framework so first you need python and pip to later install modules.  \nI bet you already have them both installed but just in case, here are the commands.  \n\n⚠️ **python3 is required and noxcrux is being developed and tested against python 3.8+** ⚠️\n```bash\nsudo apt update \u0026\u0026 sudo apt upgrade\nsudo apt install python3 python3-pip\n```\n\n### Modules\nFetch the code from the repository and enter the folder.  \n```bash\ngit clone https://github.com/noxPHX/noxcrux.git \u0026\u0026 cd noxcrux\n```\nInstall Django and the other modules.  \n```bash\npip3 install -r requirements.txt\n```\nIdeally, you may setup a virtual environment if you do not want to mess with your host dependencies.\n```bash\nsudo apt install python3-venv\npython3 -m venv ./.venv/\nsource .venv/bin/activate\npip3 install -r requirements.txt\n```\n\n### SASS\nnoxcrux makes use of [SASS](https://sass-lang.com/), so you need to compile SCSS files into regular CSS files because these files are not tracked by git.  \nIn order to install it, follow the instructions from https://sass-lang.com/.  \nI personally prefer to grab the latest release from https://github.com/sass/dart-sass/releases and untar the file somewhere in my path to be able to use it.  \n```bash\nwget -O /tmp/sass.tgz https://github.com/sass/dart-sass/releases/download/1.54.4/dart-sass-1.54.4-linux-x64.tar.gz\ntar -xzf /tmp/sass.tgz -C /tmp\nmv /tmp/dart-sass/* /usr/local/bin\nrm -r /tmp/sass.tgz /tmp/dart-sass\n```\n\n### Database\nnoxcrux uses PostgreSQL as database engine, for an easy setup you can use [Docker](https://docs.docker.com/get-docker/) and [Compose](https://docs.docker.com/compose/) and simply running the following commands in the docker directory:\n```bash\ncd docker\necho 'noxcrux_db_passwd' \u003e secrets/noxcrux_db_passwd.txt\ndocker-compose up -d noxcrux_db\n```\nOtherwise, you can check how to install and configure PostgreSQL manually [here](https://www.postgresqltutorial.com/postgresql-getting-started/).\n\n### Configuration\nIn order to properly run the application, you might want to define some environment variables.  \nFind below a table with each variable, their description, type and default value.  \n\n| Variable               | Description                             | Type                                                              | Default           |\n|------------------------|-----------------------------------------|-------------------------------------------------------------------|-------------------|\n| DEBUG                  | Enable or disable debug mode            | Boolean                                                           | True              |\n| REGISTRATION_OPEN      | Enable or disable user registration     | Boolean                                                           | True              |\n| NOXCRUX_INSTANCE       | A name to display for your instance     | String                                                            | PROD              |\n| ALLOWED_HOSTS          | Allowed hosts to access the application | Comma-separated values (eg \"localhost,127.0.0.1\")                 | *                 |\n| DB_HOST                | Database IP address or hostname         | String (eg \"172.26.0.74\" if using the noxcrux_db container)       | 172.26.0.74       |\n| DB_PORT                | Database port                           | String                                                            | 5432              |\n| DB_NAME                | Database name                           | String                                                            | noxcrux           |\n| DB_USER                | Database user                           | String                                                            | noxcrux           |\n| DB_PASSWORD            | Database password                       | String                                                            | noxcrux_db_passwd |\n| CORS_ALLOW_ALL_ORIGINS | Enable or disable all origins for CORS  | Boolean                                                           | False             |\n| CORS_ALLOWED_ORIGINS   | Allowed origins for CORS                | Comma-separated values (eg \"https://localhost,https://127.0.0.1\") | http://localhost  |\n\nFor the last step of the configuration, you need to generate your secret key for Django, the following command will suffice:\n```bash\npython3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' \u003e secret_key.txt\n```\nIf you cannot use python (eg with Docker setup), you can use this plain bash command:\n```bash\ncat /dev/urandom | tr -dc 'a-z0-9\\!\\@\\#\\$\\%\\^\\\u0026\\*\\(\\-\\_\\=\\+\\)' | head -c 50 \u003e secret_key.txt\n```\n\n### Final steps\nBefore running the server there are only the database migrations left:\n```bash\npython3 manage.py migrate\n```\nFinally, start the server.  \n```bash\npython3 manage.py runserver\n```\n\n## Docker 🐳\n### Stack\nThe `docker-compose.yaml` file defines 3 services:\n+ **noxcrux_db**, which is a PostgreSQL container with a volume to persists the database\n+ **noxcrux_web**, which contains gunicorn serving the python application\n+ **noxcrux_nginx**, a nginx container which handles SSL and serve static files thanks to a shared volume with **noxcrux_web**\n\n### Requirements\nFor a quick \u0026 easy setup you can use [Docker](https://docs.docker.com/get-docker/) and [Compose](https://docs.docker.com/compose/), the following versions are the minimal requirements:\n\n| Tool          | Version |\n|:-------------:|:-------:|\n| Docker        | 19      |\n| Compose       | 1.29    |\n\n### Setup\nI do not provide (yet) an image on the [Docker hub](https://hub.docker.com/) so you need to build your image locally.  \n\nThe instructions below are also valid for a production deployment.  \nFirst you need to fetch the code if you do not have already and enter the folder.  \n```bash\ngit clone https://github.com/noxPHX/noxcrux.git \u0026\u0026 cd noxcrux\n```\n\nAs of earlier, you need to generate the secret key, and you might want to adjust the environment variables in the `docker-compose.yaml` file. Please refer to the [Configuration](#configuration) section.\n\n### SSL\nThe Compose stack comes with a nginx container which needs a certificate and its private key as well as Diffie-Hellman parameters.\nFor the certificate, you can retrieve a free one from [Let's Encrypt](https://letsencrypt.org/) and place it in the `docker/ssl` folder.  \n\nOtherwise, you can quickly generate a self-signed certificate for testing purposes (for a production environment you need a valid certificate):\n```bash\nopenssl req -x509 -newkey rsa:4096 -nodes -keyout docker/ssl/privkey.pem -out docker/ssl/fullchain.pem -days 365 -subj '/CN=localhost' -addext \"subjectAltName=IP:127.0.0.1,IP:0.0.0.0\"\n```\n\nRegarding the D-H parameters you can generate them as follows:\n```bash\nopenssl dhparam -out docker/ssl/dhparams.pem 4096\n```\n*Depending on your machine, you might have time to grab a coffee* ☕\n\n### Run!\n\nWhen you are ready, these commands will suffice to build the images and run the application. \n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\n## API Reference 🔌\n### Swagger UI\n[Swagger UI](https://swagger.io/tools/swagger-ui/) is a tool which facilitates interaction with an API. Integrated in [DRF-Spectacular](https://github.com/tfranzel/drf-spectacular), simply running the application provides your own API reference, you can find it browsing the */web/api/docs* URL.  \nAlternatively, you can find it here : https://hydrogen.noxcrux.com/web/api/docs/\n\n### Schema\nIf you want to build your own OpenAPI schema, for instance to import it in your development tools, execute the following command.\n```bash\npython3 manage.py spectacular --file schema.yaml\n```\n\n## Kanban 🗃️\nYou can find the Kanban of the project in the [dedicated GitHub section](https://github.com/noxPHX/noxcrux/projects/1).  \nYou will find there more information about upcoming features and backlog ideas.\n\n### End-to-end encryption milestone\nZero-Knowledge End-to-End Encryption of horcruxes is an important milestone of this project.  \nThis feature was released with the v2.0.0 tag and is looking for review.  \nThe security model of the approach is soon to be disclosed.  \n\n## Contributing 🤝\nPull requests are welcome. For major changes, please open a discussion first to talk about what you would like to change.\n\n### Bug reports\nPlease file an [issue](https://github.com/noxPHX/noxcrux/issues) if anything isn't working the way it is expected.\n\n### Security Policy\nPlease see the dedicated [Security Policy](https://github.com/noxPHX/noxcrux/security/policy) page.  \n\n## Support ⭐️\nGive a ⭐️ if you like this project and want to support it!\n\n## Licence 📃\n[GNU General Public Licence v3.0](https://github.com/noxPHX/noxcrux/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoxphx%2Fnoxcrux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoxphx%2Fnoxcrux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoxphx%2Fnoxcrux/lists"}