2 * Copyright 2001-2010 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * MetadataSchemaValidators.cpp
20 * Schema-based validators for SAML 2.0 Metadata classes.
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
27 #include <xmltooling/encryption/Encryption.h>
28 #include <xmltooling/validation/Validator.h>
29 #include <xmltooling/validation/ValidatorSuite.h>
31 using namespace opensaml::saml2md;
32 using namespace opensaml::saml2;
33 using namespace opensaml;
34 using namespace xmltooling;
36 using samlconstants::SAML20MD_NS;
37 using samlconstants::SAML20MD_QUERY_EXT_NS;
38 using samlconstants::SAML20MD_ALGSUPPORT_NS;
39 using samlconstants::SAML20MD_ENTITY_ATTRIBUTE_NS;
40 using samlconstants::SAML20MD_UI_NS;
41 using samlconstants::SAML1MD_NS;
42 using samlconstants::IDP_DISCOVERY_PROTOCOL_NS;
43 using samlconstants::SP_REQUEST_INIT_NS;
48 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
49 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
50 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
51 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,Company);
52 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,EmailAddress);
53 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,GivenName);
54 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
55 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,SurName);
56 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
58 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,localizedNameType);
59 XMLOBJECTVALIDATOR_REQUIRE(localizedNameType,TextContent);
60 XMLOBJECTVALIDATOR_REQUIRE(localizedNameType,Lang);
61 END_XMLOBJECTVALIDATOR;
63 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,localizedURIType);
64 XMLOBJECTVALIDATOR_REQUIRE(localizedURIType,TextContent);
65 XMLOBJECTVALIDATOR_REQUIRE(localizedURIType,Lang);
66 END_XMLOBJECTVALIDATOR;
68 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,OrganizationName);
69 XMLOBJECTVALIDATOR_REQUIRE(OrganizationName,TextContent);
70 XMLOBJECTVALIDATOR_REQUIRE(OrganizationName,Lang);
71 END_XMLOBJECTVALIDATOR;
73 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,OrganizationDisplayName);
74 XMLOBJECTVALIDATOR_REQUIRE(OrganizationDisplayName,TextContent);
75 XMLOBJECTVALIDATOR_REQUIRE(OrganizationDisplayName,Lang);
76 END_XMLOBJECTVALIDATOR;
78 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,OrganizationURL);
79 XMLOBJECTVALIDATOR_REQUIRE(OrganizationURL,TextContent);
80 XMLOBJECTVALIDATOR_REQUIRE(OrganizationURL,Lang);
81 END_XMLOBJECTVALIDATOR;
83 class SAML_DLLLOCAL checkWildcardNS {
85 void operator()(const XMLObject* xmlObject) const {
86 const XMLCh* ns=xmlObject->getElementQName().getNamespaceURI();
87 if (XMLString::equals(ns,SAML20MD_NS) || !ns || !*ns) {
88 throw ValidationException(
89 "Object contains an illegal extension child element ($1).",
90 params(1,xmlObject->getElementQName().toString().c_str())
96 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Extensions);
97 if (!ptr->hasChildren())
98 throw ValidationException("Extensions must have at least one child element.");
99 const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
100 for_each(anys.begin(),anys.end(),checkWildcardNS());
101 END_XMLOBJECTVALIDATOR;
103 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Organization);
104 XMLOBJECTVALIDATOR_NONEMPTY(Organization,OrganizationName);
105 XMLOBJECTVALIDATOR_NONEMPTY(Organization,OrganizationDisplayName);
106 XMLOBJECTVALIDATOR_NONEMPTY(Organization,OrganizationURL);
107 END_XMLOBJECTVALIDATOR;
109 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,ContactPerson);
110 /* Pending errata decision.
111 if (!ptr->hasChildren())
112 throw ValidationException("ContactPerson must have at least one child element.");
114 if (!XMLString::equals(ptr->getContactType(),ContactPerson::CONTACT_TECHNICAL) &&
115 !XMLString::equals(ptr->getContactType(),ContactPerson::CONTACT_SUPPORT) &&
116 !XMLString::equals(ptr->getContactType(),ContactPerson::CONTACT_ADMINISTRATIVE) &&
117 !XMLString::equals(ptr->getContactType(),ContactPerson::CONTACT_BILLING) &&
118 !XMLString::equals(ptr->getContactType(),ContactPerson::CONTACT_OTHER))
119 throw ValidationException("ContactPerson contactType must be one of the defined values.");
120 END_XMLOBJECTVALIDATOR;
122 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AdditionalMetadataLocation);
123 XMLOBJECTVALIDATOR_REQUIRE(AdditionalMetadataLocation,Namespace);
124 XMLOBJECTVALIDATOR_REQUIRE(AdditionalMetadataLocation,Location);
125 END_XMLOBJECTVALIDATOR;
127 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,KeyDescriptor);
128 XMLOBJECTVALIDATOR_REQUIRE(KeyDescriptor,KeyInfo);
130 !XMLString::equals(ptr->getUse(),KeyDescriptor::KEYTYPE_ENCRYPTION) &&
131 !XMLString::equals(ptr->getUse(),KeyDescriptor::KEYTYPE_SIGNING))
132 throw ValidationException("KeyDescriptor use must be empty or one of the defined values.");
133 END_XMLOBJECTVALIDATOR;
135 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,RoleDescriptor);
136 XMLOBJECTVALIDATOR_REQUIRE(RoleDescriptor,ProtocolSupportEnumeration);
137 END_XMLOBJECTVALIDATOR;
139 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EndpointType);
140 XMLOBJECTVALIDATOR_REQUIRE(EndpointType,Binding);
141 XMLOBJECTVALIDATOR_REQUIRE(EndpointType,Location);
142 const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
143 for_each(anys.begin(),anys.end(),checkWildcardNS());
144 END_XMLOBJECTVALIDATOR;
146 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,IndexedEndpointType,EndpointType);
147 EndpointTypeSchemaValidator::validate(xmlObject);
148 XMLOBJECTVALIDATOR_REQUIRE_INTEGER(IndexedEndpointType,Index);
149 END_XMLOBJECTVALIDATOR;
151 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ArtifactResolutionService,IndexedEndpointType);
152 IndexedEndpointTypeSchemaValidator::validate(xmlObject);
153 END_XMLOBJECTVALIDATOR;
155 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,SingleLogoutService,EndpointType);
156 EndpointTypeSchemaValidator::validate(xmlObject);
157 END_XMLOBJECTVALIDATOR;
159 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ManageNameIDService,EndpointType);
160 EndpointTypeSchemaValidator::validate(xmlObject);
161 END_XMLOBJECTVALIDATOR;
163 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,SingleSignOnService,EndpointType);
164 EndpointTypeSchemaValidator::validate(xmlObject);
165 END_XMLOBJECTVALIDATOR;
167 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,NameIDMappingService,EndpointType);
168 EndpointTypeSchemaValidator::validate(xmlObject);
169 END_XMLOBJECTVALIDATOR;
171 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AssertionIDRequestService,EndpointType);
172 EndpointTypeSchemaValidator::validate(xmlObject);
173 END_XMLOBJECTVALIDATOR;
175 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,IDPSSODescriptor,RoleDescriptor);
176 RoleDescriptorSchemaValidator::validate(xmlObject);
177 XMLOBJECTVALIDATOR_NONEMPTY(IDPSSODescriptor,SingleSignOnService);
178 END_XMLOBJECTVALIDATOR;
180 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,ServiceName);
181 XMLOBJECTVALIDATOR_REQUIRE(ServiceName,TextContent);
182 XMLOBJECTVALIDATOR_REQUIRE(ServiceName,Lang);
183 END_XMLOBJECTVALIDATOR;
185 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,ServiceDescription);
186 XMLOBJECTVALIDATOR_REQUIRE(ServiceDescription,TextContent);
187 XMLOBJECTVALIDATOR_REQUIRE(ServiceDescription,Lang);
188 END_XMLOBJECTVALIDATOR;
190 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,RequestedAttribute);
191 XMLOBJECTVALIDATOR_REQUIRE(RequestedAttribute,Name);
192 END_XMLOBJECTVALIDATOR;
194 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AttributeConsumingService);
195 XMLOBJECTVALIDATOR_REQUIRE_INTEGER(AttributeConsumingService,Index);
196 XMLOBJECTVALIDATOR_NONEMPTY(AttributeConsumingService,ServiceName);
197 XMLOBJECTVALIDATOR_NONEMPTY(AttributeConsumingService,RequestedAttribute);
198 END_XMLOBJECTVALIDATOR;
200 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AssertionConsumerService,IndexedEndpointType);
201 IndexedEndpointTypeSchemaValidator::validate(xmlObject);
202 END_XMLOBJECTVALIDATOR;
204 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,SPSSODescriptor,RoleDescriptor);
205 RoleDescriptorSchemaValidator::validate(xmlObject);
206 XMLOBJECTVALIDATOR_NONEMPTY(SPSSODescriptor,AssertionConsumerService);
207 END_XMLOBJECTVALIDATOR;
209 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AuthnQueryService,EndpointType);
210 EndpointTypeSchemaValidator::validate(xmlObject);
211 END_XMLOBJECTVALIDATOR;
213 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AuthnAuthorityDescriptor,RoleDescriptor);
214 RoleDescriptorSchemaValidator::validate(xmlObject);
215 XMLOBJECTVALIDATOR_NONEMPTY(AuthnAuthorityDescriptor,AuthnQueryService);
216 END_XMLOBJECTVALIDATOR;
218 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AuthzService,EndpointType);
219 EndpointTypeSchemaValidator::validate(xmlObject);
220 END_XMLOBJECTVALIDATOR;
222 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,PDPDescriptor,RoleDescriptor);
223 RoleDescriptorSchemaValidator::validate(xmlObject);
224 XMLOBJECTVALIDATOR_NONEMPTY(PDPDescriptor,AuthzService);
225 END_XMLOBJECTVALIDATOR;
227 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AttributeService,EndpointType);
228 EndpointTypeSchemaValidator::validate(xmlObject);
229 END_XMLOBJECTVALIDATOR;
231 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AttributeAuthorityDescriptor,RoleDescriptor);
232 RoleDescriptorSchemaValidator::validate(xmlObject);
233 XMLOBJECTVALIDATOR_NONEMPTY(AttributeAuthorityDescriptor,AttributeService);
234 END_XMLOBJECTVALIDATOR;
236 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AffiliationDescriptor);
237 XMLOBJECTVALIDATOR_REQUIRE(AffiliationDescriptor,AffiliationOwnerID);
238 XMLOBJECTVALIDATOR_NONEMPTY(AffiliationDescriptor,AffiliateMember);
239 END_XMLOBJECTVALIDATOR;
241 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EntityDescriptor);
242 XMLOBJECTVALIDATOR_REQUIRE(EntityDescriptor,EntityID);
243 if (ptr->getRoleDescriptors().empty() &&
244 ptr->getIDPSSODescriptors().empty() &&
245 ptr->getSPSSODescriptors().empty() &&
246 ptr->getAuthnAuthorityDescriptors().empty() &&
247 ptr->getAttributeAuthorityDescriptors().empty() &&
248 ptr->getPDPDescriptors().empty()) {
250 if (!ptr->getAffiliationDescriptor())
251 throw ValidationException("EntityDescriptor must have at least one child role or affiliation descriptor.");
253 else if (ptr->getAffiliationDescriptor()) {
254 throw ValidationException("EntityDescriptor cannot have both an AffiliationDescriptor and role descriptors.");
256 END_XMLOBJECTVALIDATOR;
258 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EntitiesDescriptor);
259 if (ptr->getEntityDescriptors().empty() && ptr->getEntitiesDescriptors().empty())
260 throw ValidationException("EntitiesDescriptor must contain at least one child descriptor.");
261 END_XMLOBJECTVALIDATOR;
263 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,SourceID);
265 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,DiscoveryResponse,IndexedEndpointType);
266 IndexedEndpointTypeSchemaValidator::validate(xmlObject);
267 END_XMLOBJECTVALIDATOR;
269 BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,RequestInitiator,EndpointType);
270 EndpointTypeSchemaValidator::validate(xmlObject);
271 END_XMLOBJECTVALIDATOR;
273 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EntityAttributes);
274 if (!ptr->hasChildren())
275 throw ValidationException("EntityAttributes must contain at least one child element.");
276 END_XMLOBJECTVALIDATOR;
278 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,DigestMethod);
279 XMLOBJECTVALIDATOR_REQUIRE(DigestMethod,Algorithm);
280 END_XMLOBJECTVALIDATOR;
282 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,SigningMethod);
283 XMLOBJECTVALIDATOR_REQUIRE(SigningMethod,Algorithm);
284 END_XMLOBJECTVALIDATOR;
286 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,DisplayName);
287 XMLOBJECTVALIDATOR_REQUIRE(DisplayName,TextContent);
288 XMLOBJECTVALIDATOR_REQUIRE(DisplayName,Lang);
289 END_XMLOBJECTVALIDATOR;
291 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Description);
292 XMLOBJECTVALIDATOR_REQUIRE(Description,TextContent);
293 XMLOBJECTVALIDATOR_REQUIRE(Description,Lang);
294 END_XMLOBJECTVALIDATOR;
296 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Logo);
297 XMLOBJECTVALIDATOR_REQUIRE(Logo,TextContent);
298 XMLOBJECTVALIDATOR_REQUIRE_INTEGER(Logo,Height);
299 XMLOBJECTVALIDATOR_REQUIRE_INTEGER(Logo,Width);
300 END_XMLOBJECTVALIDATOR;
302 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,InformationURL);
303 XMLOBJECTVALIDATOR_REQUIRE(InformationURL,TextContent);
304 XMLOBJECTVALIDATOR_REQUIRE(InformationURL,Lang);
305 END_XMLOBJECTVALIDATOR;
307 BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,PrivacyStatementURL);
308 XMLOBJECTVALIDATOR_REQUIRE(PrivacyStatementURL,TextContent);
309 XMLOBJECTVALIDATOR_REQUIRE(PrivacyStatementURL,Lang);
310 END_XMLOBJECTVALIDATOR;
312 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,IPHint);
313 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,DomainHint);
314 XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,GeolocationHint);
318 #define REGISTER_ELEMENT(cname) \
319 q=xmltooling::QName(SAML20MD_NS,cname::LOCAL_NAME); \
320 XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \
321 SchemaValidators.registerValidator(q,new cname##SchemaValidator())
323 #define REGISTER_TYPE(cname) \
324 q=xmltooling::QName(SAML20MD_NS,cname::TYPE_NAME); \
325 XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \
326 SchemaValidators.registerValidator(q,new cname##SchemaValidator())
328 #define REGISTER_ELEMENT_UI(cname) \
329 q=xmltooling::QName(SAML20MD_UI_NS,cname::LOCAL_NAME); \
330 XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \
331 SchemaValidators.registerValidator(q,new cname##SchemaValidator())
333 #define REGISTER_TYPE_UI(cname) \
334 q=xmltooling::QName(SAML20MD_UI_NS,cname::TYPE_NAME); \
335 XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \
336 SchemaValidators.registerValidator(q,new cname##SchemaValidator())
338 #define REGISTER_ELEMENT_UI_NOVAL(cname) \
339 q=xmltooling::QName(SAML20MD_UI_NS,cname::LOCAL_NAME); \
340 XMLObjectBuilder::registerBuilder(q,new cname##Builder());
342 #define REGISTER_TYPE_UI_NOVAL(cname) \
343 q=xmltooling::QName(SAML20MD_UI_NS,cname::TYPE_NAME); \
344 XMLObjectBuilder::registerBuilder(q,new cname##Builder());
346 void opensaml::saml2md::registerMetadataClasses() {
348 REGISTER_ELEMENT(AdditionalMetadataLocation);
349 REGISTER_ELEMENT(AffiliateMember);
350 REGISTER_ELEMENT(AffiliationDescriptor);
351 REGISTER_ELEMENT(ArtifactResolutionService);
352 REGISTER_ELEMENT(AssertionConsumerService);
353 REGISTER_ELEMENT(AssertionIDRequestService);
354 REGISTER_ELEMENT(AttributeAuthorityDescriptor);;
355 REGISTER_ELEMENT(AttributeConsumingService);
356 REGISTER_ELEMENT(AttributeProfile);
357 REGISTER_ELEMENT(AttributeService);
358 REGISTER_ELEMENT(AuthnAuthorityDescriptor);
359 REGISTER_ELEMENT(AuthnQueryService);
360 REGISTER_ELEMENT(AuthzService);
361 REGISTER_ELEMENT(Company);
362 REGISTER_ELEMENT(ContactPerson);
363 REGISTER_ELEMENT(EmailAddress);
364 REGISTER_ELEMENT(EntitiesDescriptor);
365 REGISTER_ELEMENT(EntityDescriptor);
366 REGISTER_ELEMENT(Extensions);
367 REGISTER_ELEMENT(GivenName);
368 REGISTER_ELEMENT(IDPSSODescriptor);
369 REGISTER_ELEMENT(KeyDescriptor);
370 REGISTER_ELEMENT(ManageNameIDService);
371 REGISTER_ELEMENT(NameIDFormat);
372 REGISTER_ELEMENT(NameIDMappingService);
373 REGISTER_ELEMENT(Organization);
374 REGISTER_ELEMENT(OrganizationDisplayName);
375 REGISTER_ELEMENT(OrganizationName);
376 REGISTER_ELEMENT(OrganizationURL);
377 REGISTER_ELEMENT(PDPDescriptor);
378 REGISTER_ELEMENT(RequestedAttribute);
379 REGISTER_ELEMENT(RoleDescriptor);
380 REGISTER_ELEMENT(ServiceDescription);
381 REGISTER_ELEMENT(ServiceName);
382 REGISTER_ELEMENT(SingleLogoutService);
383 REGISTER_ELEMENT(SingleSignOnService);
384 REGISTER_ELEMENT(SPSSODescriptor);
385 REGISTER_ELEMENT(SurName);
386 REGISTER_ELEMENT(TelephoneNumber);
387 REGISTER_TYPE(AdditionalMetadataLocation);
388 REGISTER_TYPE(AffiliationDescriptor);
389 REGISTER_TYPE(AttributeAuthorityDescriptor);;
390 REGISTER_TYPE(AttributeConsumingService);
391 REGISTER_TYPE(AuthnAuthorityDescriptor);
392 REGISTER_TYPE(ContactPerson);
393 REGISTER_TYPE(EndpointType);
394 REGISTER_TYPE(EntitiesDescriptor);
395 REGISTER_TYPE(EntityDescriptor);
396 REGISTER_TYPE(Extensions);
397 REGISTER_TYPE(IDPSSODescriptor);
398 REGISTER_TYPE(IndexedEndpointType);
399 REGISTER_TYPE(KeyDescriptor);
400 REGISTER_TYPE(localizedNameType);
401 REGISTER_TYPE(localizedURIType);
402 REGISTER_TYPE(Organization);
403 REGISTER_TYPE(PDPDescriptor);
404 REGISTER_TYPE(RequestedAttribute);
405 REGISTER_TYPE(SPSSODescriptor);
407 q=xmltooling::QName(SAML20MD_NS,xmlencryption::EncryptionMethod::LOCAL_NAME);
408 XMLObjectBuilder::registerBuilder(q,new xmlencryption::EncryptionMethodBuilder());
410 q=xmltooling::QName(SAML1MD_NS,SourceID::LOCAL_NAME);
411 XMLObjectBuilder::registerBuilder(q,new SourceIDBuilder());
412 SchemaValidators.registerValidator(q,new SourceIDSchemaValidator());
414 q=xmltooling::QName(IDP_DISCOVERY_PROTOCOL_NS,DiscoveryResponse::LOCAL_NAME);
415 XMLObjectBuilder::registerBuilder(q,new DiscoveryResponseBuilder());
416 SchemaValidators.registerValidator(q,new DiscoveryResponseSchemaValidator());
418 q=xmltooling::QName(SP_REQUEST_INIT_NS,RequestInitiator::LOCAL_NAME);
419 XMLObjectBuilder::registerBuilder(q,new RequestInitiatorBuilder());
420 SchemaValidators.registerValidator(q,new RequestInitiatorSchemaValidator());
422 q=xmltooling::QName(SAML20MD_QUERY_EXT_NS,ActionNamespace::LOCAL_NAME);
423 XMLObjectBuilder::registerBuilder(q,new ActionNamespaceBuilder());
424 SchemaValidators.registerValidator(q,new ActionNamespaceSchemaValidator());
426 q=xmltooling::QName(SAML20MD_QUERY_EXT_NS,AuthnQueryDescriptorType::TYPE_NAME);
427 XMLObjectBuilder::registerBuilder(q,new AuthnQueryDescriptorTypeBuilder());
428 SchemaValidators.registerValidator(q,new RoleDescriptorSchemaValidator());
430 q=xmltooling::QName(SAML20MD_QUERY_EXT_NS,AttributeQueryDescriptorType::TYPE_NAME);
431 XMLObjectBuilder::registerBuilder(q,new AttributeQueryDescriptorTypeBuilder());
432 SchemaValidators.registerValidator(q,new RoleDescriptorSchemaValidator());
434 q=xmltooling::QName(SAML20MD_QUERY_EXT_NS,AuthzDecisionQueryDescriptorType::TYPE_NAME);
435 XMLObjectBuilder::registerBuilder(q,new AuthzDecisionQueryDescriptorTypeBuilder());
436 SchemaValidators.registerValidator(q,new RoleDescriptorSchemaValidator());
438 q=xmltooling::QName(SAML20MD_ENTITY_ATTRIBUTE_NS,EntityAttributes::LOCAL_NAME);
439 XMLObjectBuilder::registerBuilder(q,new EntityAttributesBuilder());
440 SchemaValidators.registerValidator(q,new EntityAttributesSchemaValidator());
442 q=xmltooling::QName(SAML20MD_ENTITY_ATTRIBUTE_NS,EntityAttributes::TYPE_NAME);
443 XMLObjectBuilder::registerBuilder(q,new EntityAttributesBuilder());
444 SchemaValidators.registerValidator(q,new EntityAttributesSchemaValidator());
446 q=xmltooling::QName(SAML20MD_ALGSUPPORT_NS,DigestMethod::LOCAL_NAME);
447 XMLObjectBuilder::registerBuilder(q,new DigestMethodBuilder());
448 SchemaValidators.registerValidator(q,new DigestMethodSchemaValidator());
450 q=xmltooling::QName(SAML20MD_ALGSUPPORT_NS,DigestMethod::TYPE_NAME);
451 XMLObjectBuilder::registerBuilder(q,new DigestMethodBuilder());
452 SchemaValidators.registerValidator(q,new DigestMethodSchemaValidator());
454 q=xmltooling::QName(SAML20MD_ALGSUPPORT_NS,SigningMethod::LOCAL_NAME);
455 XMLObjectBuilder::registerBuilder(q,new SigningMethodBuilder());
456 SchemaValidators.registerValidator(q,new SigningMethodSchemaValidator());
458 q=xmltooling::QName(SAML20MD_ALGSUPPORT_NS,SigningMethod::TYPE_NAME);
459 XMLObjectBuilder::registerBuilder(q,new SigningMethodBuilder());
460 SchemaValidators.registerValidator(q,new SigningMethodSchemaValidator());
462 REGISTER_ELEMENT_UI(DisplayName);
463 REGISTER_ELEMENT_UI(Description);
464 REGISTER_ELEMENT_UI(Logo);
465 REGISTER_ELEMENT_UI(InformationURL);
466 REGISTER_ELEMENT_UI(PrivacyStatementURL);
467 REGISTER_ELEMENT_UI(IPHint);
468 REGISTER_ELEMENT_UI(DomainHint);
469 REGISTER_ELEMENT_UI(GeolocationHint);
470 REGISTER_TYPE_UI(Logo);
471 REGISTER_ELEMENT_UI_NOVAL(UIInfo);
472 REGISTER_ELEMENT_UI_NOVAL(DiscoHints);
473 REGISTER_TYPE_UI_NOVAL(UIInfo);
474 REGISTER_TYPE_UI_NOVAL(DiscoHints);