Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7efacfa3bb |
No files matched your search
@@ -1704,8 +1704,11 @@ appliances, and ACME is used only when it is set to `acme`: a public name that r
|
|||||||
server and port 80 reachable from the internet are rarely ready when a server is installed. The
|
server and port 80 reachable from the internet are rarely ready when a server is installed. The
|
||||||
file a new installation writes has it empty, and that installation's first setup chooses it and
|
file a new installation writes has it empty, and that installation's first setup chooses it and
|
||||||
writes it into the file: `ca` when the Servers Issuing CA has its certificate after the PKI is
|
writes it into the file: `ca` when the Servers Issuing CA has its certificate after the PKI is
|
||||||
provisioned, as with a root the server creates, else `self-signed`. An upgrade makes no choice: a
|
provisioned, as with a root the server creates, else `self-signed`. Until a setup run has
|
||||||
configuration that names a source keeps it, and one that names none is self-signed. Whether
|
succeeded, a file that does not set it is taken as empty, so a configuration written by hand or by
|
||||||
|
a tool in place of the installer's file gets the same choice. An upgrade makes no choice: a
|
||||||
|
configuration that names a source keeps it, and once a run has succeeded, one that names none is
|
||||||
|
self-signed. Whether
|
||||||
HTTPS is on is an installer question and is always respected, and so is
|
HTTPS is on is an installer question and is always respected, and so is
|
||||||
`https.disable_auto_redirect`, which keeps Caddy's plain HTTP site of the Manager from
|
`https.disable_auto_redirect`, which keeps Caddy's plain HTTP site of the Manager from
|
||||||
redirecting to HTTPS (ADR-21).
|
redirecting to HTTPS (ADR-21).
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.44.1 - 2026-11-24 18:23:42 +0100
|
||||||
|
|
||||||
|
fix: a configuration that names no HTTPS certificate source gets the first setup's choice, and the
|
||||||
|
development VM of lm-dev-vm.py is named by --fqdn, so its HTTPS sites answer a name that resolves
|
||||||
|
to it.
|
||||||
|
|
||||||
|
- Until a setup run has succeeded, a linux-manager.json without https.certificate, such as one
|
||||||
|
written in place of the installer's, is taken as empty: the first setup chooses ca when the
|
||||||
|
Servers Issuing CA has its certificate, else self-signed, and writes it into the file. On a
|
||||||
|
server already set up, a file without it stays self-signed.
|
||||||
|
- lm-dev-vm.py --fqdn (LXD_DEV_FQDN, lm-dev.test by default) is the VM's wan.local_fqdn, the
|
||||||
|
placeholder @FQDN@ of tests/remote/configs/dev.json, and the name of the HTTPS addresses it
|
||||||
|
prints.
|
||||||
|
|
||||||
## 0.44.0 - 2026-11-24 18:06:34 +0100
|
## 0.44.0 - 2026-11-24 18:06:34 +0100
|
||||||
|
|
||||||
feature: the CA certificates and CRLs are always published over HTTP and HTTPS on the status and
|
feature: the CA certificates and CRLs are always published over HTTP and HTTPS on the status and
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ must have the type shown below; an unknown section or setting is an error.
|
|||||||
| `https` | `web_port` | integer | `7444` | HTTPS port of the status web service |
|
| `https` | `web_port` | integer | `7444` | HTTPS port of the status web service |
|
||||||
| `https` | `manager_port` | integer | `7443` | HTTPS port of the Manager |
|
| `https` | `manager_port` | integer | `7443` | HTTPS port of the Manager |
|
||||||
| `https` | `disable_auto_redirect` | boolean | `false` | The Manager answers on its plain HTTP port instead of redirecting there to its HTTPS address while `enabled` is `true`; the status page never redirects |
|
| `https` | `disable_auto_redirect` | boolean | `false` | The Manager answers on its plain HTTP port instead of redirecting there to its HTTPS address while `enabled` is `true`; the status page never redirects |
|
||||||
| `https` | `certificate` | string | `self-signed` | Where the certificate of `wan.local_fqdn` comes from: `self-signed`, `ca`, `acme` or `external`; empty in a new installation's file, for its first setup to choose `ca` or `self-signed` and write it here (see HTTPS) |
|
| `https` | `certificate` | string | `self-signed` | Where the certificate of `wan.local_fqdn` comes from: `self-signed`, `ca`, `acme` or `external`; empty in a new installation's file, or absent before the first successful setup, for its first setup to choose `ca` or `self-signed` and write it here (see HTTPS) |
|
||||||
| `https` | `self_signed_days` | integer | `365` | Days the self-signed certificate is valid, 1 to 3650 |
|
| `https` | `self_signed_days` | integer | `365` | Days the self-signed certificate is valid, 1 to 3650 |
|
||||||
| `https` | `acme_provider` | string | `letsencrypt` | The ACME CA of the server and of the web sites with `tls` `acme`: `letsencrypt`, `zerossl` or `custom` (see HTTPS) |
|
| `https` | `acme_provider` | string | `letsencrypt` | The ACME CA of the server and of the web sites with `tls` `acme`: `letsencrypt`, `zerossl` or `custom` (see HTTPS) |
|
||||||
| `https` | `acme_url` | string | | The `https://` ACME directory URL of `custom` |
|
| `https` | `acme_url` | string | | The `https://` ACME directory URL of `custom` |
|
||||||
@@ -1639,11 +1639,13 @@ is on or not.
|
|||||||
### The server's certificate
|
### The server's certificate
|
||||||
|
|
||||||
`https.certificate` says where the certificate of `wan.local_fqdn` comes from; it is `self-signed`
|
`https.certificate` says where the certificate of `wan.local_fqdn` comes from; it is `self-signed`
|
||||||
when the file does not set it, and ACME only when it is set to `acme`. The file a new installation
|
when the file of a server already set up does not set it, and ACME only when it is set to `acme`. The file a new installation
|
||||||
writes has it empty, and that installation's first setup chooses it and writes it into the file:
|
writes has it empty, and that installation's first setup chooses it and writes it into the file:
|
||||||
`ca` when the root CA and the Servers Issuing CA are available, as with a root the server creates,
|
`ca` when the root CA and the Servers Issuing CA are available, as with a root the server creates,
|
||||||
else `self-signed`, as with an offline root, a Simple CA root that has not signed yet, or a
|
else `self-signed`, as with an offline root, a Simple CA root that has not signed yet, or a
|
||||||
directory that cannot be reached. A source chosen later, in the Manager or the file, stays.
|
directory that cannot be reached. Until a setup run has succeeded, a file that does not set it,
|
||||||
|
such as one written in place of the installer's, gets the same choice. A source chosen later, in
|
||||||
|
the Manager or the file, stays.
|
||||||
|
|
||||||
| Source | The certificate |
|
| Source | The certificate |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|||||||
+8
-3
@@ -11,7 +11,9 @@ engine made from the file's otp_url, unless --no-otp is given; lm-dev-otp-code.p
|
|||||||
otp_url the file lacks, or all of them when there is no file, is generated and kept in the file, so a VM made again
|
otp_url the file lacks, or all of them when there is no file, is generated and kept in the file, so a VM made again
|
||||||
has the same password and token until they are deleted from the file.
|
has the same password and token until they are deleted from the file.
|
||||||
The VM gets a configuration from tests/remote/configs/ (--config, dev.json by default), whose @ETH0@ is the
|
The VM gets a configuration from tests/remote/configs/ (--config, dev.json by default), whose @ETH0@ is the
|
||||||
interface of its default route, @CIDR0@ its network and @PSK@ a generated key. The VM gets an AppRole of its own in the project's Vault
|
interface of its default route, @CIDR0@ its network, @FQDN@ --fqdn (LXD_DEV_FQDN, lm-dev.test by default), and @PSK@ a
|
||||||
|
generated key; the Manager and the status web service answer HTTPS for that name, which has to resolve to the
|
||||||
|
listen address. The VM gets an AppRole of its own in the project's Vault
|
||||||
(lm_dev.enrol_instance), with which it reads the debconf preseed with the admin's password and the
|
(lm_dev.enrol_instance), with which it reads the debconf preseed with the admin's password and the
|
||||||
configuration with its key, kept there as VM/preseed and VM/config, and its TOTP key, generated or from otp_url; no
|
configuration with its key, kept there as VM/preseed and VM/config, and its TOTP key, generated or from otp_url; no
|
||||||
secret is an argument or on standard input, so create needs a project with a Vault
|
secret is an argument or on standard input, so create needs a project with a Vault
|
||||||
@@ -60,6 +62,8 @@ def main():
|
|||||||
parser.add_argument('--listen', default=setting('LXD_LISTEN', None),
|
parser.add_argument('--listen', default=setting('LXD_LISTEN', None),
|
||||||
help="outside a test project, the LXD host address the proxies listen on (LXD_LISTEN, "
|
help="outside a test project, the LXD host address the proxies listen on (LXD_LISTEN, "
|
||||||
"default the IPv4 address of the remote URL's host)")
|
"default the IPv4 address of the remote URL's host)")
|
||||||
|
parser.add_argument('--fqdn', default=setting('LXD_DEV_FQDN', 'lm-dev.test'),
|
||||||
|
help='the name of the VM in its configuration, @FQDN@ (LXD_DEV_FQDN, default lm-dev.test)')
|
||||||
parser.add_argument('--forward-address', default=setting('LXD_FORWARD_ADDRESS', None),
|
parser.add_argument('--forward-address', default=setting('LXD_FORWARD_ADDRESS', None),
|
||||||
help="with create in a test project, the forward's listen address, one of the uplink's routes "
|
help="with create in a test project, the forward's listen address, one of the uplink's routes "
|
||||||
"(LXD_FORWARD_ADDRESS); without it one is allocated")
|
"(LXD_FORWARD_ADDRESS); without it one is allocated")
|
||||||
@@ -229,7 +233,8 @@ def main():
|
|||||||
sys.exit(f'the package did not install; see {log}')
|
sys.exit(f'the package did not install; see {log}')
|
||||||
|
|
||||||
# Apply the configuration twice, as the server's certificates follow the first run.
|
# Apply the configuration twice, as the server's certificates follow the first run.
|
||||||
text = config.read_text(encoding='utf-8').replace('@ETH0@', nic).replace('@CIDR0@', str(interface.network))
|
text = config.read_text(encoding='utf-8').replace('@ETH0@', nic).replace('@CIDR0@', str(interface.network))\
|
||||||
|
.replace('@FQDN@', args.fqdn)
|
||||||
problem = hand_over(args.remote, args.project, args.vm, vault, 'config', text.replace('@PSK@', psk),
|
problem = hand_over(args.remote, args.project, args.vm, vault, 'config', text.replace('@PSK@', psk),
|
||||||
'/etc/linux-manager/linux-manager.json', '0600')
|
'/etc/linux-manager/linux-manager.json', '0600')
|
||||||
if problem:
|
if problem:
|
||||||
@@ -248,7 +253,7 @@ def main():
|
|||||||
if not args.no_otp:
|
if not args.no_otp:
|
||||||
print(f'administrator TOTP: otp_url in {credentials}; codes: bin/lm-dev-otp-code.py --project {args.project} '
|
print(f'administrator TOTP: otp_url in {credentials}; codes: bin/lm-dev-otp-code.py --project {args.project} '
|
||||||
f'--vm {args.vm}')
|
f'--vm {args.vm}')
|
||||||
print(f'manager: https://{args.listen}:7443/ status: https://{args.listen}:7444/ and http://{args.listen}:7081/ '
|
print(f'manager: https://{args.fqdn}:7443/ status: https://{args.fqdn}:7444/ and http://{args.listen}:7081/ '
|
||||||
f'ssh: {args.listen} port 2222')
|
f'ssh: {args.listen} port 2222')
|
||||||
print(f'shell: lxc exec {args.remote}:{args.vm} --project {args.project} -- su -l')
|
print(f'shell: lxc exec {args.remote}:{args.vm} --project {args.project} -- su -l')
|
||||||
print(f'remove: {sys.argv[0]} remove --remote {args.remote} --project {args.project} --vm {args.vm}')
|
print(f'remove: {sys.argv[0]} remove --remote {args.remote} --project {args.project} --vm {args.vm}')
|
||||||
|
|||||||
@@ -1095,6 +1095,9 @@ def main():
|
|||||||
f'set general.platform in {linuxmanager.CONFIG_FILE}')
|
f'set general.platform in {linuxmanager.CONFIG_FILE}')
|
||||||
progress('deferred', 'configuration', f'general.platform is none; set it in {linuxmanager.CONFIG_FILE}')
|
progress('deferred', 'configuration', f'general.platform is none; set it in {linuxmanager.CONFIG_FILE}')
|
||||||
return 0
|
return 0
|
||||||
|
# Until a run has succeeded, a file that names no HTTPS certificate source leaves the choice to this run.
|
||||||
|
if not SETUP_DONE.exists() and not linuxmanager.read_settings().get('https', {}).get('certificate'):
|
||||||
|
cfg['https']['certificate'] = ''
|
||||||
|
|
||||||
# The directory holds the PKI, which the configuration needs; its problem ends setup only after every other step.
|
# The directory holds the PKI, which the configuration needs; its problem ends setup only after every other step.
|
||||||
failed_step = 'user directory'
|
failed_step = 'user directory'
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ chosen certificate is available, the server serves a self-signed one and warns.
|
|||||||
|
|
||||||
The source is self-signed unless the configuration names another; ACME is used only when it is
|
The source is self-signed unless the configuration names another; ACME is used only when it is
|
||||||
chosen. The first setup of a new installation chooses the Servers Issuing CA when the root CA and
|
chosen. The first setup of a new installation chooses the Servers Issuing CA when the root CA and
|
||||||
that CA are available, as with a root the server creates, else self-signed.
|
that CA are available, as with a root the server creates, else self-signed; it does so also when
|
||||||
|
the configuration it is given names no source.
|
||||||
While HTTPS is on, the Manager's plain HTTP address redirects to its HTTPS address, unless the
|
While HTTPS is on, the Manager's plain HTTP address redirects to its HTTPS address, unless the
|
||||||
installer's `https_disable_auto_redirect` or `https.disable_auto_redirect` says otherwise; the
|
installer's `https_disable_auto_redirect` or `https.disable_auto_redirect` says otherwise; the
|
||||||
status page never redirects.
|
status page never redirects.
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ The configurations in `configs/` have placeholders that are filled in for each s
|
|||||||
|
|
||||||
- `@PSK@`: the pre-shared key, filled in on the Mac; the file reaches the server through the Vault;
|
- `@PSK@`: the pre-shared key, filled in on the Mac; the file reaches the server through the Vault;
|
||||||
- `@ETH0@` and `@ETH1@`: the names of its interfaces;
|
- `@ETH0@` and `@ETH1@`: the names of its interfaces;
|
||||||
- `@CIDR0@`: the network of its first address.
|
- `@CIDR0@`: the network of its first address;
|
||||||
|
- `@FQDN@`: in `dev.json`, the name of the dev VM, `--fqdn` of `lm-dev-vm.py`.
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
||||||
@@ -115,7 +116,8 @@ default, such as `LXD_REMOTE`, is required: without its option, the script stops
|
|||||||
{
|
{
|
||||||
"LXD_REMOTE": "my-remote",
|
"LXD_REMOTE": "my-remote",
|
||||||
"LXD_POOL": "default",
|
"LXD_POOL": "default",
|
||||||
"LXD_FORWARD_ADDRESS": "192.0.2.10"
|
"LXD_FORWARD_ADDRESS": "192.0.2.10",
|
||||||
|
"LXD_DEV_FQDN": "lm-dev.example.org"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -171,6 +173,7 @@ generate it. `remove` deletes the VM, its forward and what the Vault keeps for i
|
|||||||
| `--config` | | `dev.json` | The configuration from `configs/` |
|
| `--config` | | `dev.json` | The configuration from `configs/` |
|
||||||
| `--listen` | `LXD_LISTEN` | the remote URL's host | Outside a test project, the address the proxies listen on |
|
| `--listen` | `LXD_LISTEN` | the remote URL's host | Outside a test project, the address the proxies listen on |
|
||||||
| `--forward-address` | `LXD_FORWARD_ADDRESS` | allocated | In a test project, the forward's listen address, one of the uplink's routes, so a recreated VM keeps it |
|
| `--forward-address` | `LXD_FORWARD_ADDRESS` | allocated | In a test project, the forward's listen address, one of the uplink's routes, so a recreated VM keeps it |
|
||||||
|
| `--fqdn` | `LXD_DEV_FQDN` | `lm-dev.test` | The name of the VM, `@FQDN@` of `dev.json`: the Manager and the status web service answer HTTPS for it, so it has to resolve to the forward or proxy address |
|
||||||
| `--no-otp` | | off | With `create`, enrol no TOTP token for `admin` |
|
| `--no-otp` | | off | With `create`, enrol no TOTP token for `admin` |
|
||||||
| `--deb` | | the package built last | Outside a test project, the package to install |
|
| `--deb` | | the package built last | Outside a test project, the package to install |
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"general": {"platform": "generic"},
|
"general": {"platform": "generic"},
|
||||||
"interfaces": {"external": "@ETH0@"},
|
"interfaces": {"external": "@ETH0@"},
|
||||||
"wan": {"local_fqdn": "lm-dev.test"}
|
"wan": {"local_fqdn": "@FQDN@"}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user