diff --git a/src/main/kotlin/com/restapi/AppAccessManager.kt b/src/main/kotlin/com/restapi/AppAccessManager.kt index de65e6b..68d65f7 100644 --- a/src/main/kotlin/com/restapi/AppAccessManager.kt +++ b/src/main/kotlin/com/restapi/AppAccessManager.kt @@ -60,6 +60,15 @@ class AppAccessManager : AccessManager { //if role is allowed, or enforcement is turned off or no roles are explicitly allowed handler.handle(ctx) } else { + logger.warn( + "entity - {}, action {}, user roles = {}, allowed = {}, isAllowed? {}, enforce? {}", + entity, + action, + currentRoles(), + allowedRoles, + isAllowed, + appConfig.enforceRoleRestriction() + ) ctx.status(HttpStatus.FORBIDDEN).result("user not allowed to do this") } } diff --git a/src/main/kotlin/com/restapi/config/Auth.kt b/src/main/kotlin/com/restapi/config/Auth.kt index a0f5039..9175412 100644 --- a/src/main/kotlin/com/restapi/config/Auth.kt +++ b/src/main/kotlin/com/restapi/config/Auth.kt @@ -229,7 +229,7 @@ object Auth { .gt("refreshExpiresAt", LocalDateTime.now()) .findList() .onEach { - logger.warn("valid authToken for ${authUser.userName} is ${it.authToken}") + logger.warn("valid authToken for ${authUser.userName} is ${it.authToken.substring(0..10)}") } .firstOrNull { it.authToken.equals(authToken, ignoreCase = true) diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index ed0ecb9..c774523 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -22,6 +22,7 @@ +