if (entityGroup.equals(currentGroup.getName())) { return true;
EntitiesDescriptor entityGroup = (EntitiesDescriptor) entityDescriptor.getParent(); while (entityGroup != null) { if (rpConfigs.containsKey(entityGroup.getName())) { log.debug("Relying party configuration found for {} as member of metadata group {}", relyingPartyEntityID, entityGroup.getName()); return rpConfigs.get(entityGroup.getName());
log.trace("Processing EntitiesDescriptor group: {}", entitiesDescriptor.getName()); verifySignature(entitiesDescriptor, entitiesDescriptor.getName(), true); while(entitiesIter.hasNext()) { EntitiesDescriptor entitiesChild = entitiesIter.next(); log.trace("Processing EntitiesDescriptor member: {}", entitiesChild.getName()); try { processEntityGroup(entitiesChild); } catch (FilterException e) { log.error("EntitiesDescriptor '{}' failed signature verification, removing from metadata provider", entitiesChild.getName()); toRemove.add(entitiesChild);
if (entityRoles == null || entityRoles.isEmpty()) { log.trace("Filtering out entity descriptor {} from entity group {}", entityDescriptor .getEntityID(), descriptor.getName()); emptyEntityDescriptors.add(entityDescriptor); .getEntitiesDescriptors().isEmpty())) { log.trace("Filtering out entity descriptor {} from entity group {}", entitiesDescriptor .getName(), descriptor.getName()); emptyEntitiesDescriptors.add(entitiesDescriptor);
/** * Get the name of the parent element of an {@link Extensions} element in metadata, mostly * useful for logging purposes. * * If the parent is an EntityDescriptor, return the entityID value. If an EntitiesDescriptor, * return the name value. * * @param extensions the Extensions element * @return the Extensions element's parent's name */ protected String getExtensionsParentName(Extensions extensions) { XMLObject parent = extensions.getParent(); if (parent == null) { return null; } if (parent instanceof EntityDescriptor) { return ((EntityDescriptor) parent).getEntityID(); } else if (extensions.getParent() instanceof EntitiesDescriptor) { return ((EntitiesDescriptor) parent).getName(); } return null; }
/** * Gets the entities descriptor with the given name. * * @param name name of the entities descriptor * @param rootDescriptor the root descriptor to search in * * @return the EntitiesDescriptor with the given name */ protected EntitiesDescriptor getEntitiesDescriptorByName(String name, EntitiesDescriptor rootDescriptor) { EntitiesDescriptor descriptor = null; if (DatatypeHelper.safeEquals(name, rootDescriptor.getName()) && isValid(rootDescriptor)) { descriptor = rootDescriptor; } else { List<EntitiesDescriptor> childDescriptors = rootDescriptor.getEntitiesDescriptors(); if (childDescriptors == null || childDescriptors.isEmpty()) { return null; } for (EntitiesDescriptor childDescriptor : childDescriptors) { childDescriptor = getEntitiesDescriptorByName(name, childDescriptor); if (childDescriptor != null) { descriptor = childDescriptor; } } } return descriptor; }
log.trace("Checking to see if EntitiesDescriptor {} contains the requested descriptor", descriptor.getName()); List<EntityDescriptor> entityDescriptors = descriptor.getEntityDescriptors(); if (entityDescriptors != null && !entityDescriptors.isEmpty()) {