Compare commits

..
Author SHA1 Message Date
SluijsensandClaude Sonnet 5.5 78ae8c2b9e Upload: mirror --no-perms (the IIS FTP does not support SITE CHMOD)
Continuous Integration / check (pull_request) Successful in 3m9s
Continuous Integration / build-test (pull_request) Skipped
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 9m44s
Continuous Integration / deploy-production (pull_request) Skipped
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 09:57:14 +01:00
3 changed files with 8 additions and 5 deletions
-2
View File
@@ -76,5 +76,3 @@ Removed: `PI_MAIN_*` (the SSH password login; the old secrets are deleted by Bry
## FTPS to production ## 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. 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.
+6 -3
View File
@@ -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;" 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;" 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 # 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 # ronde stopt (set -e) voordat de volgende ronde begint: de HTML gaat nooit
# omhoog na een mislukte asset-ronde (FR-PR-18). # omhoog na een mislukte asset-ronde (FR-PR-18).
@@ -82,17 +85,17 @@ run_lftp() {
# de naam storen de oude release niet. # de naam storen de oude release niet.
if wants 1; then if wants 1; then
echo "== Ronde 1: alles behalve HTML" 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 fi
# Ronde 2: alle HTML, ook de geneste pagina's en 404.html. Pas nu verwijst # Ronde 2: alle HTML, ook de geneste pagina's en 404.html. Pas nu verwijst
# iets naar de nieuwe assets. # iets naar de nieuwe assets.
if wants 2; then if wants 2; then
echo "== Ronde 2: alle HTML" 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 fi
# Ronde 3: opruimen als laatste, zodat bezoekers met de oude HTML hun oude # Ronde 3: opruimen als laatste, zodat bezoekers met de oude HTML hun oude
# assets nog vinden tot de nieuwe HTML helemaal staat. # assets nog vinden tot de nieuwe HTML helemaal staat.
if wants 3; then if wants 3; then
echo "== Ronde 3: oude bestanden opruimen" 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 fi
+2
View File
@@ -694,6 +694,8 @@ printf '%s\\n' "$2" >> '${slash(log)}'
expect(sessions).toHaveLength(3); expect(sessions).toHaveLength(3);
for (const commands of sessions) { for (const commands of sessions) {
expect(commands).toContain('set xfer:make-backup no;'); 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-allow yes;');
expect(commands).toContain('set ftp:ssl-auth TLS;'); expect(commands).toContain('set ftp:ssl-auth TLS;');
expect(commands).toContain('set ftp:ssl-force yes;'); expect(commands).toContain('set ftp:ssl-force yes;');