1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/conf
catborise 1c60696ea1 feat(accounts): API tokens for scripts and tools
The REST API took only the login session, so a script could not use it
without a browser. A user now makes API tokens on the profile page (API
Tokens tab): a name, and an expiry of 30, 90 or 365 days or none. The
token is shown once, on a page that is not cached, and then kept only as
a SHA-512 digest; the list shows its name, first characters, creation
and expiry, and a token is deleted there. Tools send it as
"Authorization: Token wvc_...", and act as its user, with that user's
permissions. Making and deleting a token is logged, without the token.

A password alone (HTTP Basic) still does not reach the API, as it would
skip the OTP second factor: a token is made in a session that passed the
login and its OTP. The token class comes first, so a refused request gets
401 with its challenge instead of 403.

django-rest-knox 5.1.0 provides the tokens (accounts.ApiToken adds the
name); settings.py takes "knox", KNOX_TOKEN_MODEL and REST_KNOX from the
template.
2026-10-24 23:14:27 +03:00
..
daemon feat(console): a working serial console 2026-10-17 19:43:09 +03:00
nginx feat(console): a working serial console 2026-10-17 19:43:09 +03:00
runit build: systemd runs the panel on hosts instead of supervisor 2026-10-17 23:18:26 +03:00
systemd build: computes run gstfsd as a systemd unit instead of under supervisor 2026-10-17 23:42:41 +03:00
install-lib.sh fix(settings): ALLOWED_HOSTS lists the server's names instead of accepting any host 2026-10-07 16:31:51 +03:00
requirements-ldap.txt build: LDAP login's packages are optional 2026-10-18 22:50:11 +03:00
requirements.txt feat(accounts): API tokens for scripts and tools 2026-10-24 23:14:27 +03:00
test-vm.xml test(instances): isolate the live libvirt suite on shared hosts 2026-10-04 01:08:11 +03:00
test_install_lib.sh fix(settings): ALLOWED_HOSTS lists the server's names instead of accepting any host 2026-10-07 16:31:51 +03:00