mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
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. |
||
|---|---|---|
| .. | ||
| migrations | ||
| templates | ||
| __init__.py | ||
| models.py | ||
| test_datasource.py | ||
| tests.py | ||
| urls.py | ||
| views.py | ||