Conversation
…d-de-sonarcloud refactor: improve security configurations and error handling in authe…
feat: add email field to user creation and improve notification sending
|
Caution Review failedThe pull request is closed. WalkthroughSe inyecta el secreto del cliente OAuth desde configuración; se habilita y configura CSRF con cookie y exclusión de /auth/register; se ajusta el manejo de error en logout a 500; el evento CreatedUserEvent incorpora email; servicios de registro y OAuth2 pasan email en el evento; envío Kafka pasa a ser asíncrono con callbacks. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Cliente
participant Navegador
participant App as App (Servidor)
participant CSRF as CSRF Repo (Cookie)
Cliente->>Navegador: Solicita /auth/register
Note over App,CSRF: CSRF habilitado con CookieCsrfTokenRepository
Navegador->>App: POST /auth/register (exento de CSRF)
App-->>Navegador: 200/resultado
Cliente->>Navegador: Solicita POST protegido
Navegador->>CSRF: Lee/escribe cookie XSRF
Navegador->>App: POST protegido + cabecera CSRF
App-->>Navegador: Respuesta según validación CSRF
sequenceDiagram
autonumber
participant Service as NotificationServiceImpl
participant Kafka as KafkaTemplate
participant Broker as Kafka Broker
Service->>Kafka: send(topic, payload)
note right of Kafka: Devuelve CompletableFuture
Kafka-->>Service: CompletableFuture<SendResult>
alt Éxito
Service->>Service: callback onSuccess (log offset)
Kafka->>Broker: Produce mensaje
else Error
Service->>Service: callback onFailure (log error)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Summary by CodeRabbit