KEYCLOAK-7961 Avoid sending back-channel logout requests to disabled clients

This commit is contained in:
Thomas Darimont 2020-02-03 21:51:05 +01:00 committed by Stian Thorgersen
parent e134cae795
commit f426ed6de6
2 changed files with 9 additions and 0 deletions

View file

@ -389,6 +389,10 @@ public class AuthenticationManager {
return true;
}
if (!client.isEnabled()) {
return false;
}
try {
setClientLogoutAction(logoutAuthSession, client.getId(), AuthenticationSessionModel.Action.LOGGING_OUT);

View file

@ -215,6 +215,11 @@ public class ResourceAdminManager {
protected GlobalRequestResult logoutClient(RealmModel realm, ClientModel resource, int notBefore) {
if (!resource.isEnabled()) {
return new GlobalRequestResult();
}
List<String> mgmtUrls = getAllManagementUrls(resource);
if (mgmtUrls.isEmpty()) {
logger.debug("No management URL or no registered cluster nodes for the client " + resource.getClientId());