feat(connect): Skatteverket data calls through the connector with a per-company canary (#2209)

CONNECT_SKV_CANARY_COMPANIES mirrors the bank canary: the listed companies'
user-token Skatteverket calls (skattekonto, moms, AGI) go through the
connector's data proxy while this installation still has its own credentials
and keeps refreshing the tokens on its own OAuth client. Callers without a
company id (OAuth start, token exchange, environment reporting) keep the
plain rule: own credentials win. This is how hosted moves its Skatteverket
traffic to Connect a few companies at a time before dropping its own keys.

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
This commit is contained in:
Jakob Wennberg
2026-09-03 14:41:11 +02:00
committed by GitHub
co-authored by Jakob Wennberg
parent 65bd675f43
commit d900fea1a8
7 changed files with 89 additions and 13 deletions
+3
View File
@@ -115,6 +115,9 @@ RECEIPT_HUNT_COMPANY_IDS=
# even while this installation has its own Enable Banking credentials. Lets an
# installation move upstream by upstream, a few companies at a time.
# CONNECT_BANK_CANARY_COMPANIES=
# Same switch for Skatteverket: listed companies send their user-token data
# calls (skattekonto, moms, AGI) through the connector's data proxy.
# CONNECT_SKV_CANARY_COMPANIES=
# Outbound email (invoices, reminders). Pick one provider. Resend is what
# hosted runs; SMTP is for self-hosts that want mail on their own relay.
# EMAIL_PROVIDER=resend|smtp # optional; RESEND_API_KEY wins, else SMTP_HOST