]> git.proxmox.com Git - pve-installer.git/commit - proxmox-auto-installer/Cargo.toml
auto-installer: fetch: add http plugin to fetch answer
authorAaron Lauterer <a.lauterer@proxmox.com>
Wed, 17 Apr 2024 12:30:55 +0000 (14:30 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Apr 2024 12:31:37 +0000 (14:31 +0200)
commit1ca401af93a20c125bfd4c4ae07936444617e36a
tree64f5a18d9825715e582d4c1d2785c5ba88ecee04
parent9b9754a53f642d3241e287f8d05a838d5c835e5e
auto-installer: fetch: add http plugin to fetch answer

This plugin will send a HTTP POST request with identifying sysinfo to
fetch an answer file. The provided sysinfo can be used to identify the
system and generate a matching answer file on demand.

The URL to send the request to, can be defined in two ways. Via a custom
DHCP option or a TXT record on a predefined subdomain, relative to the
search domain received via DHCP.

Additionally it is possible to specify a SHA256 SSL fingerprint. This
can be useful if a self-signed certificate is used or the URL is using
an IP address instead of an FQDN. Even with a trusted cert, it can be
used to pin this specific certificate.

The certificate fingerprint can either be placed on the `proxmoxinst`
partition and needs to be called `cert_fingerprint.txt`, or it can be
provided in a second custom DHCP option or a TXT record.
If no fingerprint is provided, we switch rustls to native-certs and
native-tls.

Tested-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-installer/Cargo.toml
proxmox-auto-installer/src/bin/proxmox-fetch-answer.rs
proxmox-auto-installer/src/fetch_plugins/http.rs [new file with mode: 0644]
proxmox-auto-installer/src/fetch_plugins/mod.rs
proxmox-auto-installer/src/fetch_plugins/utils/mod.rs
proxmox-auto-installer/src/fetch_plugins/utils/post.rs [new file with mode: 0644]
unconfigured.sh