Author SHA1 Message Date
blandClaude Opus 5.5 43421f0923 dns: DMARC reports go to dmarc@, not the board's inbox
dns / dns (push) Successful in 4s
Each large mailbox provider mails post@ a daily XML report, and the
board forwards them on. dmarc@ is an address at Zoho, to be made there
before the zone is pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:06:53 +01:00
4 changed files with 23 additions and 38 deletions

No files matched your search

+11 -14
View File
@@ -80,11 +80,9 @@ jobs:
RAUTHY_API_KEY: ${{ secrets.RAUTHY_API_KEY }} RAUTHY_API_KEY: ${{ secrets.RAUTHY_API_KEY }}
RAUTHY_LANGUAGE: ${{ vars.RAUTHY_LANGUAGE }} RAUTHY_LANGUAGE: ${{ vars.RAUTHY_LANGUAGE }}
# The money service (README.md, "Payments"): Vipps's keys for the # The money service (README.md, "Payments"): Vipps's keys for the
# Medlemskap sales unit, read by kron alone. Unset, kron starts # Medlemskap sales unit, read by kron alone. All five are needed
# without them and asks for them on the treasurer's desk # once COMPOSE_PROFILES has `pay`; VIPPS_WEBHOOK_SECRET may wait,
# ("Tjenester som venter"), sealed to its own identity; set, they # kron then settles by asking Vipps every minute instead.
# are kron's from the env. VIPPS_WEBHOOK_SECRET may wait, kron
# then settles by asking Vipps every minute instead.
VIPPS_MSN: ${{ vars.VIPPS_MSN }} VIPPS_MSN: ${{ vars.VIPPS_MSN }}
VIPPS_CLIENT_ID: ${{ secrets.VIPPS_CLIENT_ID }} VIPPS_CLIENT_ID: ${{ secrets.VIPPS_CLIENT_ID }}
VIPPS_CLIENT_SECRET: ${{ secrets.VIPPS_CLIENT_SECRET }} VIPPS_CLIENT_SECRET: ${{ secrets.VIPPS_CLIENT_SECRET }}
@@ -177,16 +175,15 @@ jobs:
OAUTH2_CLIENT_ID=$CHAT_OAUTH2_CLIENT_ID OAUTH2_CLIENT_ID=$CHAT_OAUTH2_CLIENT_ID
OAUTH2_CLIENT_SECRET=$CHAT_OAUTH2_CLIENT_SECRET OAUTH2_CLIENT_SECRET=$CHAT_OAUTH2_CLIENT_SECRET
EOF EOF
# kron: Vipps's keys for the Medlemskap sales unit, when the # kron: Vipps's keys for the Medlemskap sales unit. Written even
# deploy holds them; none set, and kron asks for them through
# portal (kron refuses some set and some not). Written even
# without the profile, so the file compose names is there. # without the profile, so the file compose names is there.
{ cat > "$STAGE/kron.env" <<EOF
echo "WEBHOOK_SECRET=$VIPPS_WEBHOOK_SECRET" VIPPS_MSN=$VIPPS_MSN
for name in VIPPS_MSN VIPPS_CLIENT_ID VIPPS_CLIENT_SECRET VIPPS_SUBSCRIPTION_KEY; do VIPPS_CLIENT_ID=$VIPPS_CLIENT_ID
if [ -n "${!name}" ]; then echo "$name=${!name}"; fi VIPPS_CLIENT_SECRET=$VIPPS_CLIENT_SECRET
done VIPPS_SUBSCRIPTION_KEY=$VIPPS_SUBSCRIPTION_KEY
} > "$STAGE/kron.env" WEBHOOK_SECRET=$VIPPS_WEBHOOK_SECRET
EOF
# Rauthy's secrets. The first admin is the vel's first person. # Rauthy's secrets. The first admin is the vel's first person.
cat > "$STAGE/rauthy.env" <<EOF cat > "$STAGE/rauthy.env" <<EOF
ENC_KEYS=$RAUTHY_ENC_KEY ENC_KEYS=$RAUTHY_ENC_KEY
+5 -14
View File
@@ -126,7 +126,7 @@ Run workflow**. Set them with `gt` (`gt variable set NAME --body ...`,
| `VIPPS_LOGIN_CLIENT_ID`, `VIPPS_LOGIN_CLIENT_SECRET` | variable, secret | repo | Vipps Login (the login sales unit's keys from portal.vippsmobilepay.no): the deploy keeps Vipps as a sign-in provider in Rauthy with them (`rauthy-providers.sh`) | | `VIPPS_LOGIN_CLIENT_ID`, `VIPPS_LOGIN_CLIENT_SECRET` | variable, secret | repo | Vipps Login (the login sales unit's keys from portal.vippsmobilepay.no): the deploy keeps Vipps as a sign-in provider in Rauthy with them (`rauthy-providers.sh`) |
| `PAY_HOST` | variable | repo | where the money service answers: `betaling.tomtervel.no` (DNS in `dns/`, a kasse Caddy block) | | `PAY_HOST` | variable | repo | where the money service answers: `betaling.tomtervel.no` (DNS in `dns/`, a kasse Caddy block) |
| `VIPPS_MSN` | variable | repo | the Medlemskap sales unit's merchant serial number, `1192072` | | `VIPPS_MSN` | variable | repo | the Medlemskap sales unit's merchant serial number, `1192072` |
| `VIPPS_CLIENT_ID`, `VIPPS_CLIENT_SECRET`, `VIPPS_SUBSCRIPTION_KEY` | secret | repo | optional: the Medlemskap sales unit's ePayment keys (For developers, API keys, production), read by kron alone. Unset (with `VIPPS_MSN` unset too), kron asks for them on the treasurer's desk instead | | `VIPPS_CLIENT_ID`, `VIPPS_CLIENT_SECRET`, `VIPPS_SUBSCRIPTION_KEY` | secret | repo | the Medlemskap sales unit's ePayment keys (For developers, API keys, production), read by kron alone |
| `VIPPS_WEBHOOK_SECRET` | secret | repo | what Vipps signs its webhooks with, from `vipps-webhook.sh register`; unset, kron refuses webhooks and asks Vipps about each open payment every minute instead | | `VIPPS_WEBHOOK_SECRET` | secret | repo | what Vipps signs its webhooks with, from `vipps-webhook.sh register`; unset, kron refuses webhooks and asks Vipps about each open payment every minute instead |
A variable is printed wherever a workflow echoes it, and this repo's run A variable is printed wherever a workflow echoes it, and this repo's run
@@ -157,24 +157,15 @@ the Medlemskap sales unit and sends the person into Vipps, and a fresh
one each time the last ran out (Vipps's own expire after ten minutes). one each time the last ran out (Vipps's own expire after ten minutes).
Once they have paid, kron captures the reserved amount and says `paid` Once they have paid, kron captures the reserved amount and says `paid`
on the bus; portal moves the household to `betalt`, grants `medlemmer`, on the bus; portal moves the household to `betalt`, grants `medlemmer`,
and mails them. Vipps's keys live in `kron.env`, or, from kron 0.2, are and mails them. Vipps's keys live in `kron.env` and nowhere else; portal
given once on the treasurer's desk: started without them, kron asks on never calls Vipps. `PAY_URL` in `portal.env` is what lets the content
the bus and portal shows the ask under "Tjenester som venter" to the
`kasserer` group (a passkey sign-in); the secret fields are sealed to
kron's own identity (`kron_data` volume, `KRON_IDENTITY_FILE`) before
anything else sees them, kron tries them against Vipps and keeps them
sealed in its own bucket. Portal never holds a value and never calls
Vipps. The identity volume is never copied or backed up with the data:
a lost host means giving the keys again, which is a form. `PAY_URL` in `portal.env` is what lets the content
leave `by_hand: true` out of a `payment:`; portal never calls that leave `by_hand: true` out of a `payment:`; portal never calls that
address either. address either.
Going live, in order: Going live, in order:
1. Set `PAY_HOST`. The keys: either `VIPPS_MSN` and the three key 1. Set `PAY_HOST`, `VIPPS_MSN` and the three key secrets (table above).
secrets (table above; in `pass` as `tomtervel/vipps/medlemskap`), or The keys are in `pass` as `tomtervel/vipps/medlemskap`. The host
none of them, and the treasurer gives them on their desk once kron
is up (step 3). The host
script must know `kron.env` (this repo's `deploy-tomtervel`, optional script must know `kron.env` (this repo's `deploy-tomtervel`, optional
files): on kasse, `sudo install -m 0755 -o root -g root files): on kasse, `sudo install -m 0755 -o root -g root
/srv/tomtervel/infrastructure/deploy-tomtervel /usr/local/bin/deploy-tomtervel` /srv/tomtervel/infrastructure/deploy-tomtervel /usr/local/bin/deploy-tomtervel`
-9
View File
@@ -166,14 +166,6 @@ services:
VIPPS_ENV: prod VIPPS_ENV: prod
PUBLIC_URL: https://${PAY_HOST:-no-host-set} PUBLIC_URL: https://${PAY_HOST:-no-host-set}
LISTEN_ADDR: 0.0.0.0:3000 LISTEN_ADDR: 0.0.0.0:3000
# kron's own identity, made on first start: what the Vipps keys
# given through portal (the treasurer's "Tjenester som venter")
# are sealed to. On its own volume, never copied anywhere. With
# no VIPPS_* in kron.env, kron waits to be given them.
KRON_IDENTITY_FILE: /var/lib/kron/identity
KRON_LANG: nb
volumes:
- kron_data:/var/lib/kron
ports: ports:
- "127.0.0.1:3080:3000" - "127.0.0.1:3080:3000"
depends_on: depends_on:
@@ -226,7 +218,6 @@ services:
volumes: volumes:
garage_data: garage_data:
kron_data:
caddy_data: caddy_data:
caddy_config: caddy_config:
nats_data: nats_data:
+7 -1
View File
@@ -63,7 +63,13 @@ D("tomtervel.no", REG_NONE, DnsProvider(DSP_CLOUDFLARE),
// Reports only, to start. Tighten to p=quarantine once the reports // Reports only, to start. Tighten to p=quarantine once the reports
// show both Zoho and kasse passing. // show both Zoho and kasse passing.
TXT("_dmarc", "v=DMARC1; p=none; rua=mailto:post@tomtervel.no"), //
// The reports (a daily XML file from each large mailbox provider) go
// to dmarc@, not the board's post@. dmarc@ is an address at Zoho, made
// in Zoho Mail's admin before this is pushed: otherwise they bounce.
// Another domain in rua= needs its own consent record there
// (tomtervel.no._report._dmarc.<that domain>).
TXT("_dmarc", "v=DMARC1; p=none; rua=mailto:dmarc@tomtervel.no"),
// Zoho's DKIM key, as it stands today: on the zone's apex, where no // Zoho's DKIM key, as it stands today: on the zone's apex, where no
// receiver looks for it, so mail from Zoho is unsigned in effect. Zoho // receiver looks for it, so mail from Zoho is unsigned in effect. Zoho