1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/webvirtcloud
catborise 99eadaab31 fix(datasource): cloud-init endpoints work without login, keys need a unique name
The OpenStack-style cloud-init endpoints (index, meta_data.json,
user_data) are fetched by booting VMs, which do not log in. Since the
login-required middleware they redirected to the login page, so the
datasource has not worked. They are login_not_required now; they expose
a hostname and the public SSH keys of a VM's owners.

A VM is found by the reverse DNS name of the client address, and VM
names are not unique (only compute and UUID are). user_data merged the
owners of every VM with that name, so a user who named their VM like
another user's VM got their key into that VM at its next cloud-init
run. Keys are now given only when exactly one VM has the name.

The client address is the last X-Forwarded-For entry, which nginx in
the default setup appends; gunicorn listens on 127.0.0.1 only. The bare
except around the reverse lookup is narrowed to OSError.
2026-10-04 20:46:15 +03:00
..
__init__.py Initial commit 2015-02-27 10:53:51 +02:00
asgi.py fix references to django 3 migration 2021-06-15 14:29:20 +03:00
common_tags.py fix: render the 404 page for logged-in users 2026-10-04 01:08:11 +03:00
middleware.py fix(instances): failures reach the user; no redirect to other sites 2026-10-04 12:23:54 +03:00
serializers.py fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
settings-dev.py add white noise for static_root/staticfiles_dir problem for debug/non-debug running mode 2023-11-10 16:29:48 +03:00
settings.py.template fix(accounts): migrate no longer overrides the change-password permission 2026-10-04 20:26:53 +03:00
test_api_schema.py fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
test_authorization_matrix.py fix(datasource): cloud-init endpoints work without login, keys need a unique name 2026-10-04 20:46:15 +03:00
test_child_processes.py fix: stop ignoring SIGCHLD process-wide 2026-10-04 13:40:53 +03:00
test_common_tags.py fix: render the 404 page for logged-in users 2026-10-04 01:08:11 +03:00
urls-api.py fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
urls.py feat(api): migrate API documentation from drf-yasg to drf-spectacular 2026-09-25 08:08:36 +03:00
wsgi.py fix: stop ignoring SIGCHLD process-wide 2026-10-04 13:40:53 +03:00
wsgi_custom.py fix references to django 3 migration 2021-06-15 14:29:20 +03:00