Log principals when it changes during auth refresh.
@@ -586,7 +586,8 @@ public class ServerCnx extends PulsarHandler {
// If the connection was already ready, it means we're doing a refresh
if (!StringUtils.isEmpty(authRole)) {
if (!authRole.equals(newAuthRole)) {
- log.warn("[{}] Principal cannot be changed during an authentication refresh", remoteAddress);
+ log.warn("[{}] Principal cannot change during an authentication refresh expected={} got={}",
+ remoteAddress, authRole, newAuthRole);
ctx.close();
} else {
log.info("[{}] Refreshed authentication credentials for role {}", remoteAddress, authRole);
