fix(07): NTLM support for Exchange EWS + crypto key init timing fix
Tessera CI/CD / Lint & Type Check (push) Waiting to run
Tessera CI/CD / Tests (push) Blocked by required conditions
Tessera CI/CD / Build & Deploy (push) Blocked by required conditions

- ExchangeInboxProvider rewritten to use httpntlm + raw EWS SOAP:
  FindItem / GetItem / GetAttachment via NTLM challenge-response.
  No longer requires Basic Auth on Exchange EWS virtual directory.
  Folder name mapped to EWS DistinguishedFolderId (Inbox/SentItems/etc).
- CalendarCryptoService: move key init from onModuleInit to constructor
  so MailModule.forRootAsync() factory can call decrypt() before NestJS
  lifecycle hooks execute (startup crash when SmtpConfig row has password).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 10:02:48 +02:00
parent 3b2a36cd61
commit a4e03830c1
4 changed files with 330 additions and 200 deletions
+2 -1
View File
@@ -20,14 +20,15 @@
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.0.0",
"@nestjs/schedule": "^6.1.3",
"cron": "4.4.0",
"@prisma/client": "^6.0.0",
"@tessera/shared": "workspace:*",
"argon2": "^0.44.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.15.1",
"cookie-parser": "^1.4.7",
"cron": "4.4.0",
"ews-javascript-api": "0.15.3",
"httpntlm": "^1.8.13",
"imapflow": "^1.4.3",
"ldapts": "^8.1.8",
"node-ical": "0.26.1",