333 Commits

Author SHA1 Message Date
iFargle
2033f80258 Reverting to 0.6.1 2023-05-02 12:25:07 +09:00
Marek Pikuła
d4169f1af4 For now, disable pylint warnings in renderer
To be revisited in future.

Signed-off-by: Marek Pikuła <marek.pikula@embevity.com>
2023-04-21 06:31:51 +00: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
358c0086af Apply black and isort auto formatting
Signed-off-by: Marek Pikuła <marek.pikula@embevity.com>
2023-04-21 05:50:28 +00:00
iFargle
19a229c595 test 2023-04-02 10:05:29 +09:00
iFargle
04deed6b73 Update app versions 2023-04-02 08:50:36 +09:00
iFargle
35c8dda9ef test 2023-04-02 08:39:43 +09:00
iFargle
bc2f920805 test 2023-04-02 08:35:13 +09:00
iFargle
d8e1a9bdad breakin' things 2023-04-02 08:27:35 +09:00
iFargle
be690c2e82 test 2023-03-30 10:38:40 +09:00
iFargle
43d215c7a6 test 2023-03-29 19:31:45 +09:00
iFargle
c481bd979f test 2023-03-29 18:15:13 +09:00
iFargle
b10799a5e6 test 2023-03-29 18:04:07 +09:00
iFargle
ffca3fd596 test 2023-03-29 17:58:52 +09:00
iFargle
245f20dffc test 2023-03-29 16:28:02 +09:00
iFargle
d4e17f2506 test 2023-03-29 14:58:57 +09:00
iFargle
2e89d834f2 test 2023-03-29 14:52:47 +09:00
iFargle
0c8ea25548 test 2023-03-29 14:49:02 +09:00
iFargle
7cd114ba49 test 2023-03-29 14:48:45 +09:00
iFargle
ad04c537d7 test 2023-03-29 14:42:54 +09:00
iFargle
06b29e3e7d Typo 2023-03-29 14:36:47 +09:00
iFargle
bbf2e60d75 test 2023-03-29 14:34:59 +09:00
iFargle
df7ba56b54 test 2023-03-29 14:34:35 +09:00
iFargle
ad503b3763 test 2023-03-29 14:30:57 +09:00
iFargle
18cf03b033 test 2023-03-29 14:19:57 +09:00
iFargle
95a323e39e test 2023-03-29 14:11:58 +09:00
iFargle
d9ed0da5e1 test 2023-03-29 14:07:59 +09:00
iFargle
c48d095e64 test 2023-03-29 14:03:57 +09:00
iFargle
303487ebda add json 2023-03-29 14:03:41 +09:00
iFargle
0473290e95 test 2023-03-29 13:59:34 +09:00
iFargle
6f174790eb test 2023-03-29 12:39:09 +09:00
iFargle
463fa617c4 test 2023-03-29 12:33:23 +09:00
iFargle
ebc4faa981 test 2023-03-29 12:26:23 +09:00
iFargle
3b7fb94404 test 2023-03-29 12:21:28 +09:00
iFargle
d801f7bbeb test 2023-03-29 12:20:18 +09:00
iFargle
842d288a0f test 2023-03-29 12:12:05 +09:00
iFargle
ee6875fb3a test 2023-03-29 12:09:19 +09:00
iFargle
05c858af94 test 2023-03-29 10:09:50 +09:00
iFargle
aea231d6bf test 2023-03-29 10:06:21 +09:00
iFargle
2ae8ff0ad3 test 2023-03-29 09:53:24 +09:00
iFargle
fbe3735ebf test 2023-03-28 23:59:05 +09:00
iFargle
6a7a873fc6 test 2023-03-28 23:02:14 +09:00
iFargle
bda35b1a32 test 2023-03-28 22:53:55 +09:00
iFargle
810eaf2bf0 test 2023-03-28 22:45:45 +09:00
iFargle
f847dda274 test 2023-03-28 22:36:40 +09:00
iFargle
acfe1b10eb test 2023-03-28 22:28:41 +09:00
iFargle
1173823ba1 test 2023-03-28 22:20:19 +09:00
iFargle
20650de29e test 2023-03-28 22:16:25 +09:00
iFargle
fefa05e9f9 test 2023-03-28 22:06:33 +09:00
iFargle
33808ae943 test 2023-03-28 21:56:59 +09:00