Develop - #317
Merged
Merged
Develop#317
Conversation
…leware + configura M2M Entra CanaryCredentialDetectionMiddleware (PR #308) injetava ICanaryAlertService (Scoped) via construtor. Middleware convencional é construído uma unica vez no boot, resolvendo do provider raiz — isso e sempre invalido para servico Scoped e derruba a aplicacao inteira na inicializacao (InvalidOperationException: Cannot resolve scoped service ... from root provider), reproduzido tanto em Development quanto em Production. Evidencia: todo deploy de dev desde o merge da PR #308 (2026-09-05 11:32) falhou no smoke test (/health/ready sem resposta apos restart) — o que vinha sendo investigado como instabilidade do SQL Server externo (.51) era, na verdade, este crash de boot. Fix: move ICanaryAlertService do construtor para parametro de InvokeAsync (injecao por metodo, resolvida por request a partir do RequestServices). Testes unitarios ajustados (instanciavam o middleware manualmente sem passar pelo container DI real, por isso nunca pegaram o bug). Tambem configura Authentication:ServiceClient:Authority/Audience (Parte 1 do ADR M2M, issues #218/#221) com os valores reais do App Registration provisionado no tenant Entra compartilhado com o BFF (LayoutParserReact) — nao sao segredo (metadados publicos OIDC), client_secret nunca passa pela API. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…oped-di-crash fix(security): corrige crash de boot no CanaryCredentialDetectionMiddleware + configura M2M Entra
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.