fix: pki.root_key_warning silences the warning of vpn-router-ca status and /ca about the root key on the router.
Release / release (push) Successful in 24s
Release / release (push) Successful in 24s
This commit is contained in:
1 parent
c19b195ea0
commit
e11c88f0de
5 files changed
+19
-5
No files matched your search
@@ -144,6 +144,7 @@ must have the type shown below; an unknown section or setting is an error.
|
|||||||
| `pki` | `s2s_name` | string | `VPN Router Site-to-Site CA` | Common name of the site-to-site issuing CA |
|
| `pki` | `s2s_name` | string | `VPN Router Site-to-Site CA` | Common name of the site-to-site issuing CA |
|
||||||
| `pki` | `issuing_cas` | object | | The general-purpose issuing CAs, each a name and `{name, templates, acme}` (see Certificates) |
|
| `pki` | `issuing_cas` | object | | The general-purpose issuing CAs, each a name and `{name, templates, acme}` (see Certificates) |
|
||||||
| `pki` | `templates` | object | | Certificate templates, each a name and the options it changes or defines (see Certificates) |
|
| `pki` | `templates` | object | | Certificate templates, each a name and the options it changes or defines (see Certificates) |
|
||||||
|
| `pki` | `root_key_warning` | boolean | `true` | `vpn-router-ca status` and `/ca` warn while the root key is on the router; `false` silences that warning |
|
||||||
| `metrics` | `enabled` | boolean | `true` | The metrics service: collection, history and `/metrics` |
|
| `metrics` | `enabled` | boolean | `true` | The metrics service: collection, history and `/metrics` |
|
||||||
| `metrics` | `listen` | string | `internal` | The interfaces `/metrics` is served on: `internal`, `external` or `both` |
|
| `metrics` | `listen` | string | `internal` | The interfaces `/metrics` is served on: `internal`, `external` or `both` |
|
||||||
| `metrics` | `port` | integer | `9464` | TCP port of `/metrics` |
|
| `metrics` | `port` | integer | `9464` | TCP port of `/metrics` |
|
||||||
@@ -506,7 +507,8 @@ expired.
|
|||||||
|
|
||||||
### Offline root
|
### Offline root
|
||||||
|
|
||||||
Keeping the root key off the router is recommended, not required. Export it, encrypted with a
|
Keeping the root key off the router is recommended, not required; while it is on the router,
|
||||||
|
`vpn-router-ca status` says so, unless `pki.root_key_warning` is `false`. Export it, encrypted with a
|
||||||
passphrase read from the first line of standard input, keep the file in a safe place, and remove
|
passphrase read from the first line of standard input, keep the file in a safe place, and remove
|
||||||
the key from the router:
|
the key from the router:
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
vpn-router (0.21.2-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
fix: pki.root_key_warning silences the warning of vpn-router-ca status and /ca about the root key on the router.
|
||||||
|
|
||||||
|
* pki.root_key_warning, true by default, set to false silences the
|
||||||
|
warning that the root key is on the router.
|
||||||
|
|
||||||
|
-- Slawomir Koszewski <slawek@koszewscy.waw.pl> Sat, 31 Oct 2026 10:00:00 +0100
|
||||||
|
|
||||||
vpn-router (0.21.1-1) unstable; urgency=medium
|
vpn-router (0.21.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
fix: vpn-router-ca status and /ca warn about a CRL the router signs only once vpn-router-pki.timer has not renewed it in time.
|
fix: vpn-router-ca status and /ca warn about a CRL the router signs only once vpn-router-pki.timer has not renewed it in time.
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ SCHEMA = {
|
|||||||
'https': {'enabled': True, 'email': '', 'web_port': 7444, 'manager_port': 7443, 'caddy_source': 'ubuntu'},
|
'https': {'enabled': True, 'email': '', 'web_port': 7444, 'manager_port': 7443, 'caddy_source': 'ubuntu'},
|
||||||
'pki': {'root_name': 'VPN Router Root CA', 'root_days': 7300, 'ca_days': 3650, 'key': 'rsa-4096',
|
'pki': {'root_name': 'VPN Router Root CA', 'root_days': 7300, 'ca_days': 3650, 'key': 'rsa-4096',
|
||||||
'crl_days': 7, 'root_crl_days': 180, 'publish': ['http'], 'p2s_name': 'VPN Router P2S CA',
|
'crl_days': 7, 'root_crl_days': 180, 'publish': ['http'], 'p2s_name': 'VPN Router P2S CA',
|
||||||
's2s_name': 'VPN Router Site-to-Site CA', 'issuing_cas': {}, 'templates': {}},
|
's2s_name': 'VPN Router Site-to-Site CA', 'issuing_cas': {}, 'templates': {},
|
||||||
|
'root_key_warning': True},
|
||||||
'metrics': {'enabled': True, 'listen': 'internal', 'port': 9464, 'https_port': 9465, 'service_account': 'metrics',
|
'metrics': {'enabled': True, 'listen': 'internal', 'port': 9464, 'https_port': 9465, 'service_account': 'metrics',
|
||||||
'otlp_endpoint': '', 'otlp_username': '', 'otlp_password': '',
|
'otlp_endpoint': '', 'otlp_username': '', 'otlp_password': '',
|
||||||
'keep_details': '24 hours', 'keep_hourly': '1 month', 'keep_daily': '3 months',
|
'keep_details': '24 hours', 'keep_hourly': '1 month', 'keep_daily': '3 months',
|
||||||
|
|||||||
@@ -931,7 +931,8 @@ def acme_url(cfg, name):
|
|||||||
|
|
||||||
|
|
||||||
def status(cfg):
|
def status(cfg):
|
||||||
"""The root, the issuing CAs, the retired CAs and the warnings, as /ca and vpn-router-ca status show them."""
|
"""The root, the issuing CAs, the retired CAs and the warnings, as /ca and vpn-router-ca status show them; the root
|
||||||
|
key on the router is a warning while pki.root_key_warning is true."""
|
||||||
moment = now()
|
moment = now()
|
||||||
soon = moment + datetime.timedelta(days=WARN_DAYS)
|
soon = moment + datetime.timedelta(days=WARN_DAYS)
|
||||||
state = read_state()
|
state = read_state()
|
||||||
@@ -956,7 +957,7 @@ def status(cfg):
|
|||||||
root = {'subject': common_name(root_cert), 'expires': iso(utc(root_cert, 'not_valid_after')), 'key': key,
|
root = {'subject': common_name(root_cert), 'expires': iso(utc(root_cert, 'not_valid_after')), 'key': key,
|
||||||
'crl_next_update': crl_of('root') if key or (ROOT_DIR / 'crl.pem').is_file() else None,
|
'crl_next_update': crl_of('root') if key or (ROOT_DIR / 'crl.pem').is_file() else None,
|
||||||
'crl_source': state['root_crl']}
|
'crl_source': state['root_crl']}
|
||||||
if key:
|
if key and cfg['pki']['root_key_warning']:
|
||||||
warnings.append('the root key is on the router; export it with vpn-router-ca root export-key and remove it '
|
warnings.append('the root key is on the router; export it with vpn-router-ca root export-key and remove it '
|
||||||
'with vpn-router-ca root remove-key to keep the root offline')
|
'with vpn-router-ca root remove-key to keep the root offline')
|
||||||
elif not (ROOT_DIR / 'crl.pem').is_file():
|
elif not (ROOT_DIR / 'crl.pem').is_file():
|
||||||
|
|||||||
@@ -91,7 +91,8 @@
|
|||||||
"server": {
|
"server": {
|
||||||
"days": 397
|
"days": 397
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"root_key_warning": true
|
||||||
},
|
},
|
||||||
"metrics": {
|
"metrics": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
Reference in new issue
Block a user