1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
Commit graph

36 commits

Author SHA1 Message Date
catborise
0fb0eb2bac feat(operations): jobs page 2026-10-14 23:27:57 +03:00
catborise
401c648944 fix(webvirtcloud): the API and browsable login cannot bypass OTP with a password
OTP (OTP_ENABLED) was enforced only by the HTML login form, but two other
doors let an enrolled user authenticate with a password and no token, so a
leaked password defeated the second factor. Both were reproduced with a
confirmed TOTP device: /api-auth/login/ (DRF's browsable-API login) created a
site-wide session, and DRF's default BasicAuthentication let every /api/v1/
endpoint accept HTTP Basic credentials.

The api-auth/ include is removed, so the only interactive login is the
OTP-aware form at /accounts/login/; the browsable API still works with the
session that form sets. REST_FRAMEWORK now pins DEFAULT_AUTHENTICATION_CLASSES
to SessionAuthentication only, so the API requires a session and no longer
accepts a password over HTTP Basic. A session therefore implies the OTP factor
was met. Password-based programmatic API access is intentionally dropped.

The authorization matrix drops its rest_framework:login/logout allowlist
entries (the routes are gone). New tests assert the browsable login route is
removed, HTTP Basic is rejected on the API, Basic is not a default auth class,
and a session still reaches the API. Verified live with OTP_ENABLED that
/api-auth/login/ is 404 and an API Basic request is 403.
2026-10-07 09:57:40 +03:00
catborise
67364e2a05 feat(api): migrate API documentation from drf-yasg to drf-spectacular
- Replace abandoned drf-yasg with drf-spectacular and drf-spectacular-sidecar
- Configure OpenAPI 3.0 schema generation and offline sidecar assets in settings
- Update schema, Swagger UI, and ReDoc routes in webvirtcloud/urls.py
- Add backwards-compatible AutoSchema fallback for existing settings installations
- Remove 130 obsolete legacy drf-yasg static assets
- Update upgrade instructions in README.md and project documentation
2026-09-25 08:08:36 +03:00
catborise
cfce71ec2b
Rest framework (#24)
* Add rest framework for API: First Commit

* modify some shell scripts to make variable references safer; modify some python scripts to reduce the code complexity and cyclomatic complexity of functions.

* Add REST API for some webvirtcloud functions. Instance list/delete/create, compute list/delete/create, storages-network list/retrieve. Add swagger and redoc for API interface

* update requirements

Co-authored-by: herengui <herengui@uniontech.com>
2022-08-22 15:12:33 +03:00
catborise
508e3609be lint with black python. convert f style strings to old one. some small fixes 2020-11-05 12:34:31 +03:00
catborise
922a8e62d1 fix some linter warnings 2020-09-25 15:57:17 +03:00
catborise
6bbebdd37c not push only try to import debug_toolbar if settings.debug is true 2020-07-22 11:24:01 +03:00
catborise
b5b43b71bd add dev options to settings + url 2020-07-17 15:27:57 +03:00
catborise
2d5c701789 Add Settings page: Move theme & lang changer to settings page 2020-06-04 12:03:26 +03:00
Real-Gecko
2a0d240038 Fix admin urls not included into main urls.py 2020-05-27 18:41:34 +06:00
catborise
4d40de1b55 Python3 & Django 2.2 Migration - Fix & Updates 2020-03-16 16:59:45 +03:00
catborise
c79a635923 change compute name, hostaname, details char size. url.py typo fix 2020-01-21 15:26:35 +03:00
catborise
25e6381fc9 add Compute instances tab. Minimal invasion. minimal change. keep structure 2018-09-28 13:33:21 +03:00
catborise
35bc8c67e4 Add NWFilters 2018-09-21 19:11:17 +03:00
catborise
ace30ca952 Libxml2 converted to lxml, django framework upgrade to 1.11.x and some bug fixes 2018-06-27 10:20:51 +03:00
Ing. Jan KRCMAR
82eb5abe52 add new application datasource. provides basic interface for cloud-init tool (hostname, root ssh authorized keys) 2018-06-13 10:50:36 +02:00
Jan Krcmar
027bbbc776 Merge remote-tracking branch 'andrem/master' 2016-03-23 10:54:25 +01:00
Jan Krcmar
6afcd00e2e logs view adds paging ability
settings.LOGS_PER_PAGE controls logs count per page
2016-03-23 10:38:33 +01:00
andrem
84fe28e9d7 adjust path to storage for url. 2016-03-17 17:19:55 -03:00
Retspen
2aa5558df7 Fixed pep8 2015-04-06 10:51:50 +03:00
Retspen
35da9ad193 Added 404 and fixed urls 2015-04-02 15:39:40 +03:00
Retspen
ea41412aac Move tempates 2015-04-02 11:48:40 +03:00
Retspen
8b39d4e429 Adde urls for app 2015-04-02 09:37:46 +03:00
Retspen
a4fffee182 Change timers for ajax 2015-03-23 15:47:47 +02:00
Retspen
4a17f08740 Added graph scale for instance 2015-03-20 12:06:32 +02:00
Retspen
02570cd826 Added ChartJS 2015-03-19 15:37:16 +02:00
Retspen
02ae7336ea Refactor users page 2015-03-18 17:13:44 +02:00
Retspen
5ba82e29aa Little fix user page 2015-03-16 15:46:44 +02:00
Retspen
d3bdec0380 Move links and rebuild pages 2015-03-04 15:43:29 +02:00
Retspen
8f5ccb3519 Add new rule and tags 2015-03-03 16:53:10 +02:00
Retspen
5960e94da5 Add logs and block for templates 2015-03-03 11:34:09 +02:00
Retspen
55e93a9087 Add users and users VMs
;
2015-03-02 17:31:25 +02:00
Retspen
29b05745ad Added users page 2015-03-02 10:52:07 +02:00
Retspen
2ed6ca6518 Clean header 2015-02-27 14:44:44 +02:00
Retspen
dd5f98cbe8 build new tree 2015-02-27 11:28:22 +02:00
Retspen
4d48e79341 Initial commit 2015-02-27 10:53:51 +02:00