SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); return null;
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); final List<Element> credentials = ElementSupport.getChildElements(element, AbstractCredentialParser.CREDENTIAL_ELEMENT_NAME); final BeanDefinitionBuilder resolver = BeanDefinitionBuilder.genericBeanDefinition(StaticCredentialResolver.class); resolver.addConstructorArgValue(SpringSupport.parseCustomElements(credentials, parserContext)); builder.addConstructorArgValue(resolver.getBeanDefinition()); } }
/** * Get the definition for the {@link org.opensaml.security.x509.PKIXTrustEvaluator}. This is purely a * {@link CertPathPKIXTrustEvaluator} constructed with whatever ValidationOptions we provide. * * @param element what to parse * @param parserContext the context to parse inside * @return the definition */ protected BeanDefinition getPKIXTrustEvaluator(@Nonnull final Element element, @Nonnull final ParserContext parserContext) { final BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CertPathPKIXTrustEvaluator.class); final List<Element> validationOptionsElements = ElementSupport.getChildElements(element, PKIXValidationOptionsParser.ELEMENT_NAME); if (null != validationOptionsElements && !validationOptionsElements.isEmpty()) { builder.addConstructorArgValue(SpringSupport.parseCustomElements(validationOptionsElements, parserContext)); } return builder.getBeanDefinition(); }
/** {@inheritDoc} */ @Override protected void doNativeParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doNativeParse(element, parserContext, builder); final List<Element> childProviders = ElementSupport.getChildElements(element, MetadataNamespaceHandler.METADATA_ELEMENT_NAME); builder.addPropertyValue("resolvers", SpringSupport.parseCustomElements(childProviders, parserContext)); } }
/** * {@inheritDoc} */ @Override public BeanDefinition parse(final Element config, final ParserContext context) { final Map<QName, List<Element>> configChildren = ElementSupport.getIndexedChildElements(config); List<Element> children; children = configChildren.get(BaseAttributeDefinitionParser.ELEMENT_NAME); SpringSupport.parseCustomElements(children, context); children = configChildren.get(AbstractDataConnectorParser.ELEMENT_NAME); SpringSupport.parseCustomElements(children, context); children = configChildren.get(new QName(AttributeResolverNamespaceHandler.NAMESPACE, "PrincipalConnector")); if (null != children && !children.isEmpty()) { DeprecationSupport.warn(ObjectType.ELEMENT, "<PrincipalConnector>", context.getReaderContext().getResource().getDescription(), "(https://wiki.shibboleth.net/confluence/display/IDP30/NameIDConsumptionConfiguration)"); } SpringSupport.parseCustomElements(children, context); return null; }
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); final List<Element> credentials = ElementSupport.getChildElements(element, AbstractCredentialParser.CREDENTIAL_ELEMENT_NAME); final BeanDefinitionBuilder resolver = BeanDefinitionBuilder.genericBeanDefinition(StaticCredentialResolver.class); resolver.addConstructorArgValue(SpringSupport.parseCustomElements(credentials, parserContext)); builder.addConstructorArgValue(resolver.getBeanDefinition()); builder.addConstructorArgValue(DefaultSecurityConfigurationBootstrap .buildBasicInlineKeyInfoCredentialResolver()); } }
/** * Get the definition for the {@link org.opensaml.security.x509.PKIXValidationInformationResolver}. This is * constructed from the Trusted names and the Validation Info. * * @param element what to parse * @param parserContext the context to parse inside * @return the definition */ protected BeanDefinition getPKIXValidationInformationResolver(@Nonnull final Element element, @Nonnull final ParserContext parserContext) { final List<Element> validationInfoElements = ElementSupport.getChildElements(element, VALIDATION_INFO); final List<Element> trustedNameElements = ElementSupport.getChildElements(element, TRUSTED_NAMES); final BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(StaticPKIXValidationInformationResolver.class); builder.addConstructorArgValue(SpringSupport.parseCustomElements(validationInfoElements, parserContext)); builder.addConstructorArgValue(SpringSupport.getElementTextContentAsManagedList(trustedNameElements)); return builder.getBeanDefinition(); }
/** {@inheritDoc} */ @Override protected void doParse(@Nonnull final Element configElement, @Nonnull final ParserContext parserContext, @Nonnull final BeanDefinitionBuilder builder) { super.doParse(configElement, parserContext, builder); final String myId = builder.getBeanDefinition().getAttribute("qualifiedId").toString(); builder.addPropertyValue("id", myId); final List<Element> ruleElementsBasic = ElementSupport.getChildElementsByTagNameNS(configElement, AttributeFilterBasicNamespaceHandler.NAMESPACE, "Rule"); final List<Element> ruleElementsAfp = ElementSupport.getChildElementsByTagNameNS(configElement, BaseFilterParser.NAMESPACE, "Rule"); final List<Element> ruleElements = new ArrayList<>(ruleElementsBasic.size() + ruleElementsAfp.size()); ruleElements.addAll(ruleElementsBasic); ruleElements.addAll(ruleElementsAfp); builder.addPropertyValue("subsidiaries", SpringSupport.parseCustomElements(ruleElements, parserContext)); } }
/** {@inheritDoc} */ @Override protected void doParse(@Nonnull final Element configElement, @Nonnull final ParserContext parserContext, @Nonnull final BeanDefinitionBuilder builder) { super.doParse(configElement, parserContext, builder); final String myId = builder.getBeanDefinition().getAttribute("qualifiedId").toString(); builder.addPropertyValue("id", myId); final List<Element> ruleElementsBasic = ElementSupport.getChildElementsByTagNameNS(configElement, AttributeFilterBasicNamespaceHandler.NAMESPACE, "Rule"); final List<Element> ruleElementsAfp = ElementSupport.getChildElementsByTagNameNS(configElement, BaseFilterParser.NAMESPACE, "Rule"); final List<Element> ruleElements = new ArrayList<>(ruleElementsAfp.size() + ruleElementsBasic.size()); ruleElements.addAll(ruleElementsBasic); ruleElements.addAll(ruleElementsAfp); builder.addPropertyValue("subsidiaries", SpringSupport.parseCustomElements(ruleElements, parserContext)); } }
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { DeprecationSupport.warn(ObjectType.XSITYPE, TYPE_NAME.toString(), parserContext.getReaderContext().getResource().getDescription(), null); final List<Element> children = ElementSupport.getChildElements(element, AbstractMetadataProviderParser.METADATA_FILTER_ELEMENT_NAME); if (null != children && !children.isEmpty()) { builder.addPropertyValue("filters", SpringSupport.parseCustomElements(children, parserContext)); } }
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); final List<Element> childEngines = ElementSupport.getChildElements(element, AbstractMetadataProviderParser.TRUST_ENGINE_ELEMENT_NAME); final List<Element> childEngineRefs = ElementSupport.getChildElements(element, SecurityNamespaceHandler.TRUST_ENGINE_REF); final List<BeanMetadataElement> allChildren = new ManagedList<>(childEngines.size()+ childEngineRefs.size()); allChildren.addAll(SpringSupport.parseCustomElements(childEngines, parserContext)); for (final Element ref:childEngineRefs) { final String reference = StringSupport.trimOrNull(ref.getAttributeNS(null, "ref")); if (null != reference) { allChildren.add(new RuntimeBeanReference(StringSupport.trim(reference))); } } builder.addConstructorArgValue(allChildren); } }
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { builder.setInitMethodName("initialize"); builder.setDestroyMethodName("destroy"); builder.setLazyInit(true); final List<Element> children = ElementSupport.getChildElements(element, MetadataNamespaceHandler.METADATA_NODE_PROC_ELEMENT_NAME); if (null != children && !children.isEmpty()) { builder.addPropertyValue("nodeProcessors", SpringSupport.parseCustomElements(children, parserContext)); } }
builder.addPropertyValue("negation", SpringSupport.parseCustomElements(ruleElements, parserContext).get(0));
/** {@inheritDoc} */ @Override protected void doParse(@Nonnull final Element config, @Nonnull final ParserContext parserContext, @Nonnull final BeanDefinitionBuilder builder) { super.doParse(config, parserContext, builder); final List<Element> returnElems = ElementSupport.getChildElements(config, RETURN_VALUE_ELEMENT_NAME_AD); returnElems.addAll(ElementSupport.getChildElements(config, RETURN_VALUE_ELEMENT_NAME_RESOLVER)); String returnValue = null; if (null != returnElems && returnElems.size() > 0) { returnValue = StringSupport.trimOrNull(returnElems.get(0).getTextContent()); } if (null == returnValue) { throw new BeanCreationException("Attribute Definition: ValueMap must have a ReturnValue"); } final List<Element> sourceValueElements = ElementSupport.getChildElements(config, SourceValueParser.TYPE_NAME_AD); sourceValueElements.addAll(ElementSupport.getChildElements(config, SourceValueParser.TYPE_NAME_RESOLVER)); if (null == sourceValueElements || sourceValueElements.size() == 0) { throw new BeanCreationException("Attribute Definition: ValueMap must have at least one SourceValue"); } final ManagedList<BeanDefinition> sourceValues = SpringSupport.parseCustomElements(sourceValueElements, parserContext); log.debug("AttributeDefinition(ValueMap): return value: {}, {} source values ", returnValue, sourceValues.size()); log.trace("AttributeDefinition(ValueMap): source values: {}", sourceValues); builder.addPropertyValue("sourceValues", sourceValues); builder.addPropertyValue("returnValue", returnValue); }
SpringSupport.parseCustomElements(configChildren.get(RelyingPartyParser.ELEMENT_NAME), parserContext); if (null != relyingParties && relyingParties.size() > 0) { builder.addPropertyValue("relyingPartyConfigurations", relyingParties); SpringSupport.parseCustomElements(configChildren.get(DefaultRelyingPartyParser.ELEMENT_NAME), parserContext); builder.addPropertyValue("defaultConfiguration", defaultRps.get(0)); SpringSupport.parseCustomElements(configChildren.get(AnonymousRelyingPartyParser.ELEMENT_NAME), parserContext); builder.addPropertyValue("unverifiedConfiguration", anonRps.get(0)); SpringSupport.parseCustomElements(configChildren.get(MetadataNamespaceHandler.METADATA_ELEMENT_NAME), parserContext); SpringSupport.parseCustomElements(configChildren.get(SecurityNamespaceHandler.CREDENTIAL_ELEMENT_NAME), parserContext); SpringSupport.parseCustomElements(configChildren.get(AbstractMetadataProviderParser.TRUST_ENGINE_ELEMENT_NAME), parserContext);
final List<BeanDefinition> valueMaps = SpringSupport.parseCustomElements(valueMapElements, parserContext);
SpringSupport.parseCustomElements(ElementSupport.getChildElements(element, PROFILE_CONFIGURATION), parserContext); builder.addPropertyValue("profileConfigurations", profileConfigurations);
SpringSupport.parseCustomElements(permitValueRule, parserContext); log.debug("permitValueRules {}", permitValueRules); builder.addPropertyValue("matcher", permitValueRules.get(0)); SpringSupport.parseCustomElements(denyValueRule, parserContext); log.debug("denyValueRules {}", denyValueRules); builder.addPropertyValue("matcher", denyValueRules.get(0));
if (filters.size() == 1) { builder.addPropertyValue("metadataFilter", SpringSupport.parseCustomElements(filters, parserContext)); } else if (filters.size() > 1) { chainBuilder.addPropertyValue("filters", SpringSupport.parseCustomElements(filters, parserContext)); builder.addPropertyValue("metadataFilter", chainBuilder.getBeanDefinition()); parserContext.getReaderContext().getResource().getDescription(), "Inside <Filter>"); SpringSupport.parseCustomElements(trustEngines, parserContext);
log.debug("{} Adding {} encoders", getLogPrefix(), attributeEncoders.size()); builder.addPropertyValue("attributeEncoders", SpringSupport.parseCustomElements(attributeEncoders, parserContext));