refactor(apicore-sync): API key and shop feed only, no password login
The sync now talks to ApiCore exclusively through the secured shop interface: GET /shop-sync with an API key as bearer token. Removed: - the email/password service-account login (and its MFA handling), - the fallback to ApiCore's general read endpoints (/harvests, /products, /extractions, /bottling-batches, /apiaries). A missing interface (404) or a rejected key (401/403) now stops the run with a specific message instead of falling back. APICORE_SYNC_EMAIL and APICORE_SYNC_PASSWORD are gone from .env.example, README and the k8s secret template; the system status needs APICORE_API_KEY. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
55be1fe881
commit
3bc0693e4d
10 files changed
+248
-548
No files matched your search
+6
-20
@@ -91,29 +91,15 @@ NEXT_PUBLIC_TURNSTILE_SITE_KEY=
|
||||
SMTP_USER=
|
||||
SMTP_FROM="Wabenhain <[email protected]>"
|
||||
|
||||
# ApiCore-Synchronisierung (optional). Zwei Knoepfe nutzen sie: admin/ernten
|
||||
# -> "ApiCore-Synchronisierung" (Ernten + Chargen) und admin/produkte ->
|
||||
# "ApiCore-Synchronisierung" (Produktkatalog). Ohne diese drei Werte zeigen
|
||||
# beide einen Konfigurationsfehler statt eines Ergebnisses. ApiCore ist ein
|
||||
# separates Projekt (NestJS-Backend) mit reinem E-Mail/Passwort-Login (kein
|
||||
# API-Key-Mechanismus) — hier IDEALERWEISE die Zugangsdaten eines
|
||||
# dedizierten, MFA-freien Service-Kontos eintragen, nicht die eines echten
|
||||
# Admin-Zugangs. Benoetigte Berechtigung (in ApiCore unter Benutzer & Rollen
|
||||
# eine eigene Rolle anlegen, die NUR diese eine Berechtigung hat):
|
||||
# shop-sync:read freigegebene Shop-Daten (GET /shop-sync) — liefert nur
|
||||
# Ernte-Fakten, Artikelstamm und Abfuellungen, keine Notizen
|
||||
# Nur fuer aeltere ApiCore-Staende ohne /shop-sync (Rueckfall) noetig:
|
||||
# harvests:read, products:read, extractions:read, bottling:read, apiaries:read
|
||||
# ApiCore-Synchronisierung (optional). Der Sync-Knopf im Admin-Dashboard holt
|
||||
# Ernten, Chargen und Produkte aus ApiCores Shop-Schnittstelle (GET
|
||||
# /shop-sync). Zugang ausschliesslich per API-Schluessel: in ApiCore unter
|
||||
# Verwaltung -> Automatisierung -> API-Schluessel anlegen (Berechtigung
|
||||
# "Shop-Daten lesen"). Kein Benutzerkonto, kein Passwort, jederzeit
|
||||
# widerrufbar. Ohne beide Werte meldet der Knopf einen Konfigurationsfehler.
|
||||
# Details siehe src/lib/apicore-client.ts.
|
||||
APICORE_API_URL=
|
||||
# Empfohlen: API-Schluessel aus ApiCore → Verwaltung → Automatisierung →
|
||||
# API-Schluessel (Berechtigung "Shop-Daten lesen"). Kein Passwort, keine MFA,
|
||||
# jederzeit widerrufbar. Ist er gesetzt, werden die beiden Werte darunter
|
||||
# nicht gebraucht.
|
||||
APICORE_API_KEY=
|
||||
# Nur fuer aeltere ApiCore-Staende ohne API-Schluessel:
|
||||
APICORE_SYNC_EMAIL=
|
||||
APICORE_SYNC_PASSWORD=
|
||||
|
||||
# DHL Parcel DE Shipping API ("Post & Parcel Germany", developer.dhl.com) —
|
||||
# ermoeglicht das Erstellen von DHL-Versandmarken per Knopfdruck im
|
||||
|
||||
Reference in new issue
Block a user