Endurecer MFA: logout borra mfa_trusted y recuerdo de dispositivo administrable#16
Closed
AtlasLabs797 wants to merge 1 commit into
Closed
Endurecer MFA: logout borra mfa_trusted y recuerdo de dispositivo administrable#16AtlasLabs797 wants to merge 1 commit into
mfa_trusted y recuerdo de dispositivo administrable#16AtlasLabs797 wants to merge 1 commit into
Conversation
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.
Motivation
mfa_trustedactiva trasPOST /api/auth/logout, permitiendo omitir MFA en ese navegador hasta 90 días. Esta corrección se asocia a la versiónV-01.07.Description
mfa_trusteden el endpointPOST /api/auth/logoutpara revocar el bypass MFA en el cliente (AuthController.cs).mfa_remember_device_enabledymfa_remember_daysenAuthServicey solo emito el token de dispositivo confiable si la opción está habilitada; el valor por defecto es62días y se clampa a1..180(AuthService.cs).GET/PUT /api/configuracion) y en los DTOs (ConfiguracionController.cs,ConfiguracionDtos.cs) y añadí valores seed seguros (false,62) enSeedData.cs.AuthControllerTests(logout borramfa_trusted) yAuthServiceTests(ajustado el umbral de expiración a ~62 días). También registré el cambio enDocumentacion/DOCUMENTACION_CAMBIOS.md.Testing
AuthControllerTestsyAuthServiceTestspara validar la nueva lógica y la ventana por defecto.dotnet test --filter "FullyQualifiedName~AuthControllerTests|FullyQualifiedName~AuthServiceTests", pero el entorno de ejecución donde se hizo la modificación no tiene instaladodotnet(No such file or directory), por lo que las pruebas no se ejecutaron aquí.Documentacion/DOCUMENTACION_CAMBIOS.mdcompletadas; los tests están listos para ejecutarse en CI o en un entorno con SDK .NET disponible.Codex Task