Link ING and other European banks through Enable Banking

- Docker passes ENABLE_BANKING_APP_ID and ENABLE_BANKING_PRIVATE_KEY through
- transactions are keyed on entry_reference: Enable Banking says transaction_id
  may change between fetches, which imported rows twice
- a key pasted on one line keeps its own PEM label (PKCS#1 keys broke before)
- nginx keeps X-Forwarded-Proto/Host from a reverse proxy, so return links are https
- README: how to set up the app, the keys, and https if Enable Banking needs it

Checked against Enable Banking's API docs and tested end to end against a stand-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MangaValkandClaude Opus 5.5 committed 2026-11-17 15:16:53 +01:00
1 parent cc22098868
commit ea53718e5d
6 files changed
+101 -7

No files matched your search

+15
View File
@@ -92,3 +92,18 @@ assert.equal(validCpf("123"), false);
}
console.log("feeds: ok");
// Enable Banking: transaction_id "may change" between fetches, entry_reference doesn't, so it is the id when both come.
{
const a = ebTxn({ transaction_id: "x1", entry_reference: "ref-9", booking_date: "2026-11-02", transaction_amount: { amount: "3.50" }, credit_debit_indicator: "DBIT", status: "BOOK" }, "u1")!;
const b = ebTxn({ transaction_id: "x2", entry_reference: "ref-9", booking_date: "2026-11-02", transaction_amount: { amount: "3.50" }, credit_debit_indicator: "DBIT", status: "BOOK" }, "u1")!;
assert.equal(a.plaid_transaction_id, b.plaid_transaction_id);
}
// A key pasted on one line keeps its own label, PKCS#1 included, and still signs.
{
const { generateKeyPairSync, createPrivateKey: load } = await import("node:crypto");
const rsa = generateKeyPairSync("rsa", { modulusLength: 2048 }).privateKey.export({ type: "pkcs1", format: "pem" }).toString();
const oneLine = rsa.replace(/\n/g, "");
assert.equal(pemFrom(oneLine), rsa);
assert.ok(load(pemFrom(oneLine)));
}