Repository navigation
feat: TLS 1.3 no broker MQTT e no Traefik → backend (#78) - #89
Merged
Merged
Conversation
…ão declaram o RNF04 fechado (#78)
Owner
Author
|
O mTLS Traefik ↔ backend, que esta PR não cobre, é acompanhado na #90. |
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.
Fecha #78.
O que muda
tls_version tlsv1.3nomosquitto.conf. O TLS 1.2 é recusado no handshake; o backend e o app do ACS reconectam em 1.3.ApiTlsConfig(lib/src/config/api_tls_config.dart). ComAPI_TLS_CERT_PATHeAPI_TLS_KEY_PATHdefinidas, o apiServer sobe em HTTPS com TLS 1.3 como mínimo (o padrão dodart:ioé 1.2). Sem as duas, segue em HTTP, que é o caminho do Render (backend/DEPLOY.md). Com só uma, o boot falha, para um erro de digitação não cair em texto claro.traefik-initemite uma segunda folha (runtime/backend/, CNsinalacs-serverpod) assinada pela CA de dev do RPC. O Traefik usa oserversTransportbackend-tls(serverName+rootCAs, seminsecureSkipVerify) e o labelscheme=https. O healthcheck do compose passou a usar https com--cacert.relic_io, que chamaHttpServer.bindSecuresemrequestClientCertificate, então o backend não tem como exigir o certificado do Traefik.scripts/qa/tls_invariants.shganhou o Grupo F (broker: 1.3 aceita, 1.2 recusa) e o Grupo E (8080 interna: texto claro não responde, 1.3 com a CA responde, 1.2 recusa, nenhuminsecureSkipVerifyativo).dev_key_permissions_test.shconfere os modos da folha do backend e que aca.keynão vai pararuntime/backend/. Oe2e_stack.sh uproda otraefik-initantes do--no-deps; sem isso, umruntime/anterior a esta PR deixava o backend em laço de restart.PROGRESS.md,docs/auditoria-prd/2026-10-15-lacunas-prd.md,CLAUDE.md,backend/CLAUDE.md,backend/DEPLOY.md,apps/CLAUDE.md,development.yaml.Provas
tls_invariants.sh15/15,mtls_invariants.sh4/4,api_tls_config_test.dart7/7. O teste unitário sobe umHttpServer.bindSecurereal e negocia comopenssl s_client.dart test -j 1: 1388 passando na árvore final.emulator-5554):e2e.sh --emulator(paciente e smoke do ACS),acs_full_e2e.sheadmin_alertas_escalonar_e2e.sh. Este último pausa o Traefik por 120 s, e o backend se recuperou sozinho.serverNameerrado, o Traefik responde 500 (x509: certificate is valid for … not nome-errado). Com uminsecureSkipVerify: trueativo, o Grupo E falha. Sem o mínimo 1.3, o teste unitário falha.O que continua aberto
REQUIRE_SSL false), backend → Gorush (http), as portas internas 8082/8083 e o painel do Traefik (8081).requestClientCertificate).docker compose restart traefik serverpod. Isso ainda não está documentado.tls_invariants.shaceitaria os labelsscheme=https/serverstransportmesmo comentados. A falha ainda apareceria no e2e.init.shnão é atômica.ApiTlsConfignão remove espaços em volta dos caminhos. O boot ainda falha, só a mensagem de erro fica pior.