Commit Graph

26 Commits

Author SHA1 Message Date
Ajay Tripathi
05db2f5282 [deploy] Add support for bare metal installation and document the same 2023-05-06 01:01:43 +05:30
iFargle
2033f80258 Reverting to 0.6.1 2023-05-02 12:25:07 +09:00
Albert Copeland
9aeea628d2 Update pyproject.toml 2023-04-21 19:53:37 +09:00
iFargle
128c5d1d76 Update version 2023-04-21 19:31:16 +09:00
Marek Pikuła
fe7a3667d4 Complete the major refactor
Major part of #73

Unfortunately, it wasn't possible to split it to multiple smaller
commits, since the changes touched the entire application substantially.
Here is a short list of major changes:

1. Create a separate library (headscale-api), which is used as a
   convenient abstraction layer providing Pythonic interface with
   Pydantic. Headscale API is fully asynchronous library, benefitting
   from improved concurrency for backend requests thus increasing page
   load speed, e.g., on "Machines" page.
2. Create a common common, validated with flask-pydantic API passthrough
   layer from GUI to the backend.
3. Move authentication to a separate (auth.py), consolidating the
   functionality in a single place (with better place for expansion in
   the future).
4. Move configuration management to a separate module (config.py). Use
   Pydantic's BaseSettings for reading values from environment, with
   extensive validation and error reporting.
5. Reduce the number of health checks.
    - Now, most are performed during server initialization. If any test
      fails, the server is started in tainted mode, with only the error
      page exposed (thus reducing the surface of attack in invalid
      state).
    - Key checks are implicit in the requests to the backend and
      guarded by `@headscale.key_check_guard` decorator.
    - Key renewal is moved to server-side scheduler.
6. Introduce type hints to the level satisfactory for mypy static
   analysis. Also, enable some other linters in CI and add optional
   pre-commit hooks.
7. Properly handle some error states. Instead of returning success and
   handling different responses, if something fails, there is HTTP error
   code and standard response for it.
8. General formatting, small rewrites for clarity and more idiomatic
   Python constructs.

Signed-off-by: Marek Pikuła <marek.pikula@embevity.com>
2023-04-21 06:02:29 +00:00
Marek Pikuła
74b53cad21 Add more development tools
- black
- isort
- ruff
- pre-comit
- mypy
- pydocstyle

Signed-off-by: Marek Pikuła <marek.pikula@embevity.com>
2023-04-21 05:50:28 +00:00
iFargle
04deed6b73 Update app versions 2023-04-02 08:50:36 +09:00
iFargle
ff28413b04 test 2023-03-21 18:26:39 +09:00
Matthew Cengia
55a60c7204 pyproject.toml: Install linter and auto-formatter in dev environment
Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
2023-03-19 18:12:59 +11:00
iFargle
35c3c8b5ff Update app versions 2023-03-17 21:33:59 +09:00
iFargle
c24185f494 Update versions 2023-03-17 18:43:52 +09:00
iFargle
63a05ce25b Update Versions 2023-03-03 13:34:11 +09:00
iFargle
23b1b19bf3 Small CSS fixes 2023-02-28 21:41:42 +09:00
iFargle
8e6d84d36a Update app version for final tsts 2023-02-28 13:29:31 +09:00
iFargle
339e812441 Update PyProject.toml version 2023-02-23 18:50:41 +09:00
iFargle
8be2aea293 test 2023-02-20 20:13:31 +09:00
iFargle
b54c9e323e test 2023-02-20 20:08:39 +09:00
iFargle
ea3c5b1be6 test 2023-02-20 18:47:19 +09:00
iFargle
d3cc4c43ee Testing flask-providers-oidc 2023-02-20 08:19:53 +09:00
iFargle
b6509213ce test 2023-02-19 20:02:52 +09:00
iFargle
b97991b073 Test 2023-02-19 19:58:56 +09:00
iFargle
8c8e071ab2 Add flask-sqlalchemy 2023-02-19 18:51:32 +09:00
iFargle
01efd82612 Update to Python 3.11 and use flaskoidc instead of Flask-OIDC 2023-02-17 12:30:52 +09:00
iFargle
eacfe502de Update docs and version numbers. Final push for BasicAuth support 2023-02-16 22:28:15 +09:00
iFargle
f77472653a Tseting basic/oidc auth 2023-02-16 20:17:36 +09:00
iFargle
dd7126a771 Testing poetry 2023-02-08 10:21:59 +09:00