Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78ae8c2b9e |
@@ -76,5 +76,3 @@ Removed: `PI_MAIN_*` (the SSH password login; the old secrets are deleted by Bry
|
||||
## FTPS to production
|
||||
|
||||
The production package offers FTP over TLS. `deploy/upload-production.sh` forces explicit FTPS (`AUTH TLS`): `ftp:ssl-force yes`, `ftp:ssl-protect-data yes` and `ftp:ssl-protect-list yes`, so login, listings and files are encrypted, and the session refuses to fall back to plain FTP. The certificate of the server is checked (`ssl:verify-certificate yes`); if the host turns out to have a non-public certificate, record what is needed (the CA file) and ask Bryan before relaxing anything. The mode is passive. Use a separate FTP account with rights only on the folder of the prerendered pages and a unique strong password that only exists as the secret `PROD_HOST_PASSWORD`. The script uploads in three rounds (everything except HTML, then all HTML, then cleaning up old files) into the prerendered-pages folder of the CMS host (`PROD_DEPLOY_PATH`, the exact folder is still open, see `aidlc-docs/features/asf-production-iis/plan.md`, A2). It does not put a `web.config` there and deletes nothing outside that folder; the host and its `web.config` come from the CMS pipeline. `PROD_HOST_PORT` is optional (default 21). The tests (`e2e/deployScripts.e2e.ts`) check the lftp settings with a fake lftp and the upload with a local `file:` target; the real FTPS connection is tested by Bryan with the `PROD_HOST_*` secrets.
|
||||
|
||||
**Known issue (2026-11-19): the certificate chain of the hoster has expired.** The FTPS login fails on the certificate check ("certificate chain uses expired certificate", seen in the CMS run 911). For the first rollout Bryan decided to upload once without certificate verification, on the release branch only (`release/asf-prod-2026-11-19`: `set ssl:verify-certificate no`, with the comment "EENMALIG"). TLS itself stays forced (`ssl-force`, `AUTH TLS`, protected data and listings), but the identity of the server is then not checked. On `master` the check stays on (`yes`). After the rollout: have the hoster renew the chain and put the check back on the release branch (or drop that branch); every later production upload runs with verification.
|
||||
|
||||
@@ -59,6 +59,9 @@ wants() { [ "$pass" = all ] || [ "$pass" = "$1" ]; }
|
||||
tls="set ftp:ssl-allow yes; set ftp:ssl-auth TLS; set ftp:ssl-force yes; set ftp:ssl-protect-data yes; set ftp:ssl-protect-list yes; set ssl:verify-certificate yes;"
|
||||
settings="$tls set ftp:passive-mode on; set net:max-retries 3; set xfer:make-backup no;"
|
||||
|
||||
# --no-perms: de IIS-FTP kent SITE CHMOD niet ('500 SITE: command not
|
||||
# understood'); zonder deze optie probeert lftp na elke upload de rechten te
|
||||
# zetten en stopt de ronde met een fout.
|
||||
# Elke opdracht krijgt een eigen lftp-sessie, zodat het script bij een mislukte
|
||||
# ronde stopt (set -e) voordat de volgende ronde begint: de HTML gaat nooit
|
||||
# omhoog na een mislukte asset-ronde (FR-PR-18).
|
||||
@@ -82,17 +85,17 @@ run_lftp() {
|
||||
# de naam storen de oude release niet.
|
||||
if wants 1; then
|
||||
echo "== Ronde 1: alles behalve HTML"
|
||||
run_lftp "mirror --reverse --verbose --exclude-glob '*.html' $dist/ $remote/;"
|
||||
run_lftp "mirror --reverse --no-perms --verbose --exclude-glob '*.html' $dist/ $remote/;"
|
||||
fi
|
||||
# Ronde 2: alle HTML, ook de geneste pagina's en 404.html. Pas nu verwijst
|
||||
# iets naar de nieuwe assets.
|
||||
if wants 2; then
|
||||
echo "== Ronde 2: alle HTML"
|
||||
run_lftp "mirror --reverse --verbose --include-glob '*.html' $dist/ $remote/;"
|
||||
run_lftp "mirror --reverse --no-perms --verbose --include-glob '*.html' $dist/ $remote/;"
|
||||
fi
|
||||
# Ronde 3: opruimen als laatste, zodat bezoekers met de oude HTML hun oude
|
||||
# assets nog vinden tot de nieuwe HTML helemaal staat.
|
||||
if wants 3; then
|
||||
echo "== Ronde 3: oude bestanden opruimen"
|
||||
run_lftp "mirror --reverse --delete --verbose $dist/ $remote/;"
|
||||
run_lftp "mirror --reverse --no-perms --delete --verbose $dist/ $remote/;"
|
||||
fi
|
||||
|
||||
@@ -694,6 +694,8 @@ printf '%s\\n' "$2" >> '${slash(log)}'
|
||||
expect(sessions).toHaveLength(3);
|
||||
for (const commands of sessions) {
|
||||
expect(commands).toContain('set xfer:make-backup no;');
|
||||
// De IIS-FTP kent SITE CHMOD niet
|
||||
expect(commands).toContain('mirror --reverse --no-perms ');
|
||||
expect(commands).toContain('set ftp:ssl-allow yes;');
|
||||
expect(commands).toContain('set ftp:ssl-auth TLS;');
|
||||
expect(commands).toContain('set ftp:ssl-force yes;');
|
||||
|
||||
Reference in New Issue
Block a user