{"record":{"id":"48ca5872ad1ee3a5","repo":"apereo/cas","slug":"skipped-registration-of-since-no-metadata-ent","errorCode":null,"errorMessage":"Skipped registration of [{}] since no metadata entity ids could be found","messagePattern":"Skipped registration of \\[(.+?)\\] since no metadata entity ids could be found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"support/cas-server-support-saml-sp-integrations/src/main/java/org/apereo/cas/util/SamlSPUtils.java","lineNumber":85,"sourceCode":"\n        FunctionUtils.doIfNotBlank(sp.getNameIdFormat(), _ -> service.setRequiredNameIdFormat(sp.getNameIdFormat()));\n\n        val attributes = CoreAuthenticationUtils.transformPrincipalAttributesListIntoMultiMap(attributesToRelease);\n        val policy = new ChainingAttributeReleasePolicy();\n        policy.addPolicies(new ReturnMappedAttributeReleasePolicy().setAllowedAttributes(CollectionUtils.wrap(attributes)));\n        service.setAttributeReleasePolicy(policy);\n\n        service.setMetadataCriteriaRoles(SPSSODescriptor.DEFAULT_ELEMENT_NAME.getLocalPart());\n        service.setMetadataCriteriaRemoveEmptyEntitiesDescriptors(true);\n        service.setMetadataCriteriaRemoveRolelessEntityDescriptors(true);\n\n\n        FunctionUtils.doIfNotBlank(sp.getSignatureLocation(), _ -> service.setMetadataSignatureLocation(sp.getSignatureLocation()));\n\n        val entityIDList = determineEntityIdList(sp, resolver, service);\n\n        if (entityIDList.isEmpty()) {\n            LOGGER.warn(\"Skipped registration of [{}] since no metadata entity ids could be found\", sp.getName());\n            return null;\n        }\n        val entityIds = org.springframework.util.StringUtils.collectionToDelimitedString(entityIDList, \"|\");\n        service.setMetadataCriteriaDirection(PredicateFilter.Direction.INCLUDE.name());\n        service.setMetadataCriteriaPattern(entityIds);\n\n        LOGGER.debug(\"Registering saml service [{}] by entity id [{}]\", sp.getName(), entityIds);\n        service.setServiceId(entityIds);\n\n        service.setSignAssertions(sp.getSignAssertions());\n        service.setSignResponses(TriStateBoolean.fromBoolean(sp.isSignResponses()));\n\n        return service;\n    }\n\n    private static List<String> determineEntityIdList(final AbstractSamlSPProperties sp,\n                                                      final SamlRegisteredServiceCachingMetadataResolver resolver,\n                                                      final SamlRegisteredService service) throws Exception {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-saml-sp-integrations/src/main/java/org/apereo/cas/util/SamlSPUtils.java#L67-L103","documentation":"SamlSPUtils.newSamlServiceProviderService registers a SAML SP service in the CAS service registry. It first resolves the SP metadata to determine the entity IDs covered by the metadata; if the resolved entity ID list is empty, the SP cannot be matched by the metadata criteria pattern, so the registration is skipped with this warning and null is returned instead of a service.","triggerScenarios":"Calling newSamlServiceProviderService with a SAML SP definition whose metadata source (URL/file/resource) yields no parseable entity IDs: metadata URL unreachable, metadata file missing/empty, metadata signed but signature location wrong so parsing fails, or metadata contains no SPSSODescriptor elements.","commonSituations":"Typo in the metadata URL in the SP integration properties; firewall/DNS blocking the IdP metadata endpoint at startup; metadata cached from a failed fetch; configuring an SP whose metadata is an IdP-only descriptor.","solutions":["Verify the SP metadata location/URL is reachable and returns valid SAML metadata (open it in a browser or curl it).","If metadata is signed, confirm the signature location (certificate) is correct so OpenSAML can parse the document.","Check the configured SP definition's entityIds/metadata fields in the support module properties; supply entityIds explicitly if metadata cannot be resolved.","Inspect earlier log lines for metadata fetch/parse exceptions that preceded this warning."],"exampleFix":"// before\nSAML_SP_METADATA = \"https://sp.example.org/metadata-wrong-path\";\n// after\nSAML_SP_METADATA = \"https://sp.example.org/saml/metadata\"; // reachable, returns valid SP metadata","handlingStrategy":"validation","validationCode":"val metadata = fetchAndParseMetadata(sp.getMetadataLocation());\nif (metadata == null || metadata.getEntityDescriptors().isEmpty()) {\n    LOGGER.warn(\"SP [{}] metadata yields no entity descriptors; fix metadata location first\", sp.getName());\n    return null;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Curl the metadata URL during deployment checks before starting CAS.","Keep metadata signature certificates alongside SP definitions and validate them in CI.","Prefer local metadata copies for critical SPs to avoid network flakiness at startup."],"tags":["saml","metadata","service-registry","configuration"],"backgroundTag":"empty-result-set","analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}