From be0b6f800ddf54b62d31342576c917b4fb59533c Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 10 May 2006 03:12:31 +0000 Subject: [PATCH] Completed SAML 1 assertion schema, started test cases. --- .cdtproject | 3 + cpp-opensaml2.sln | 9 + saml/SAMLConfig.h | 2 + saml/saml1/core/Assertions.h | 97 ++++- saml/saml1/core/impl/AssertionsImpl.cpp | 450 ++++++++++++++++++--- .../saml1/core/impl/AssertionsSchemaValidators.cpp | 52 ++- samltest/.gitignore | 1 + samltest/Makefile.am | 33 ++ samltest/data/cert.pem | 16 + samltest/data/key.pem | 15 + .../data/saml1/core/impl/AdviceWithChildren.xml | Bin 0 -> 470 bytes .../data/saml1/core/impl/AssertionWithChildren.xml | Bin 0 -> 922 bytes .../saml1/core/impl/AttributeQueryWithChildren.xml | 6 + .../core/impl/AttributeStatementWithChildren.xml | Bin 0 -> 508 bytes .../data/saml1/core/impl/AttributeWithChildren.xml | Bin 0 -> 1012 bytes .../AudienceRestrictionConditionWithChildren.xml | Bin 0 -> 402 bytes .../core/impl/AuthenticationQueryWithChildren.xml | 4 + .../impl/AuthenticationStatementWithChildren.xml | Bin 0 -> 496 bytes .../AuthorizationDecisionQueryWithChildren.xml | 9 + .../AuthorizationDecisionStatementWithChildren.xml | Bin 0 -> 500 bytes .../saml1/core/impl/ConditionsWithChildren.xml | 2 + .../data/saml1/core/impl/EvidenceWithChildren.xml | Bin 0 -> 614 bytes samltest/data/saml1/core/impl/FullStatus.xml | 1 + samltest/data/saml1/core/impl/FullStatusCode.xml | 1 + .../data/saml1/core/impl/FullStatusMessage.xml | 1 + .../core/impl/RequestWithAssertionArtifact.xml | 6 + .../core/impl/RequestWithAssertionIDReference.xml | 4 + samltest/data/saml1/core/impl/RequestWithQuery.xml | 4 + .../data/saml1/core/impl/ResponseWithChildren.xml | 7 + .../core/impl/SubjectConfirmationWithChildren.xml | Bin 0 -> 468 bytes .../data/saml1/core/impl/SubjectWithChildren.xml | Bin 0 -> 346 bytes samltest/data/saml1/core/impl/singleAction.xml | Bin 0 -> 220 bytes .../saml1/core/impl/singleActionAttributes.xml | Bin 0 -> 322 bytes samltest/data/saml1/core/impl/singleAdvice.xml | Bin 0 -> 220 bytes samltest/data/saml1/core/impl/singleAssertion.xml | Bin 0 -> 302 bytes .../saml1/core/impl/singleAssertionArtifact.xml | Bin 0 -> 244 bytes .../core/impl/singleAssertionArtifactAttribute.xml | Bin 0 -> 310 bytes .../saml1/core/impl/singleAssertionAttributes.xml | Bin 0 -> 464 bytes .../saml1/core/impl/singleAssertionIDReference.xml | Bin 0 -> 248 bytes .../impl/singleAssertionIDReferenceContents.xml | Bin 0 -> 338 bytes samltest/data/saml1/core/impl/singleAttribute.xml | Bin 0 -> 226 bytes .../saml1/core/impl/singleAttributeAttributes.xml | Bin 0 -> 368 bytes .../saml1/core/impl/singleAttributeDesignator.xml | Bin 0 -> 246 bytes .../impl/singleAttributeDesignatorAttributes.xml | Bin 0 -> 388 bytes .../data/saml1/core/impl/singleAttributeQuery.xml | 1 + .../core/impl/singleAttributeQueryAttributes.xml | 3 + .../saml1/core/impl/singleAttributeStatement.xml | Bin 0 -> 244 bytes .../data/saml1/core/impl/singleAttributeValue.xml | Bin 0 -> 236 bytes .../core/impl/singleAttributeValueContents.xml | Bin 0 -> 316 bytes samltest/data/saml1/core/impl/singleAudience.xml | Bin 0 -> 218 bytes .../saml1/core/impl/singleAudienceAttributes.xml | Bin 0 -> 322 bytes .../impl/singleAudienceRestrictionCondition.xml | Bin 0 -> 264 bytes .../saml1/core/impl/singleAuthenticationQuery.xml | 1 + .../impl/singleAuthenticationQueryAttributes.xml | 3 + .../core/impl/singleAuthenticationStatement.xml | Bin 0 -> 254 bytes .../singleAuthenticationStatementAttributes.xml | Bin 0 -> 422 bytes .../saml1/core/impl/singleAuthorityBinding.xml | Bin 0 -> 244 bytes .../core/impl/singleAuthorityBindingAttributes.xml | Bin 0 -> 496 bytes .../core/impl/singleAuthorizationDecisionQuery.xml | 1 + .../singleAuthorizationDecisionQueryAttributes.xml | 3 + .../impl/singleAuthorizationDecisionStatement.xml | Bin 0 -> 268 bytes ...gleAuthorizationDecisionStatementAttributes.xml | Bin 0 -> 348 bytes ...orizationDecisionStatementAttributesInvalid.xml | Bin 0 -> 304 bytes samltest/data/saml1/core/impl/singleConditions.xml | Bin 0 -> 232 bytes .../saml1/core/impl/singleConditionsAttributes.xml | 3 + .../saml1/core/impl/singleConfirmationMethod.xml | Bin 0 -> 240 bytes .../impl/singleConfirmationMethodAttributes.xml | Bin 0 -> 312 bytes .../saml1/core/impl/singleDoNotCacheCondition.xml | Bin 0 -> 250 bytes samltest/data/saml1/core/impl/singleEvidence.xml | Bin 0 -> 228 bytes .../data/saml1/core/impl/singleNameIdentifier.xml | Bin 0 -> 236 bytes .../core/impl/singleNameIdentifierAttributes.xml | Bin 0 -> 398 bytes samltest/data/saml1/core/impl/singleRequest.xml | 4 + .../saml1/core/impl/singleRequestAttributes.xml | 6 + samltest/data/saml1/core/impl/singleResponse.xml | 4 + .../saml1/core/impl/singleResponseAttributes.xml | 6 + samltest/data/saml1/core/impl/singleStatus.xml | 1 + samltest/data/saml1/core/impl/singleStatusCode.xml | 1 + .../data/saml1/core/impl/singleStatusMessage.xml | 1 + samltest/data/saml1/core/impl/singleSubject.xml | Bin 0 -> 222 bytes .../saml1/core/impl/singleSubjectConfirmation.xml | Bin 0 -> 246 bytes .../core/impl/singleSubjectConfirmationData.xml | Bin 0 -> 250 bytes .../singleSubjectConfirmationDataAttributes.xml | Bin 0 -> 346 bytes .../data/saml1/core/impl/singleSubjectLocality.xml | Bin 0 -> 242 bytes .../core/impl/singleSubjectLocalityAttributes.xml | Bin 0 -> 378 bytes samltest/internal.h | 105 +++++ samltest/saml1/core/impl/ActionTest.cpp | 45 +++ samltest/saml1/core/impl/ActionTest.h | 71 ++++ samltest/samltest.cpp | 32 ++ samltest/samltest.h | 64 +++ samltest/samltest.vcproj | 277 +++++++++++++ 90 files changed, 1288 insertions(+), 67 deletions(-) create mode 100644 samltest/.gitignore create mode 100644 samltest/Makefile.am create mode 100644 samltest/data/cert.pem create mode 100644 samltest/data/key.pem create mode 100644 samltest/data/saml1/core/impl/AdviceWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AssertionWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AttributeQueryWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AttributeWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AuthorizationDecisionQueryWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/ConditionsWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/EvidenceWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/FullStatus.xml create mode 100644 samltest/data/saml1/core/impl/FullStatusCode.xml create mode 100644 samltest/data/saml1/core/impl/FullStatusMessage.xml create mode 100644 samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml create mode 100644 samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml create mode 100644 samltest/data/saml1/core/impl/RequestWithQuery.xml create mode 100644 samltest/data/saml1/core/impl/ResponseWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/SubjectWithChildren.xml create mode 100644 samltest/data/saml1/core/impl/singleAction.xml create mode 100644 samltest/data/saml1/core/impl/singleActionAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAdvice.xml create mode 100644 samltest/data/saml1/core/impl/singleAssertion.xml create mode 100644 samltest/data/saml1/core/impl/singleAssertionArtifact.xml create mode 100644 samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml create mode 100644 samltest/data/saml1/core/impl/singleAssertionAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAssertionIDReference.xml create mode 100644 samltest/data/saml1/core/impl/singleAssertionIDReferenceContents.xml create mode 100644 samltest/data/saml1/core/impl/singleAttribute.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeDesignator.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeQuery.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeStatement.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeValue.xml create mode 100644 samltest/data/saml1/core/impl/singleAttributeValueContents.xml create mode 100644 samltest/data/saml1/core/impl/singleAudience.xml create mode 100644 samltest/data/saml1/core/impl/singleAudienceAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthenticationQuery.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthenticationStatement.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorityBinding.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorityBindingAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorizationDecisionQuery.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml create mode 100644 samltest/data/saml1/core/impl/singleConditions.xml create mode 100644 samltest/data/saml1/core/impl/singleConditionsAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleConfirmationMethod.xml create mode 100644 samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleDoNotCacheCondition.xml create mode 100644 samltest/data/saml1/core/impl/singleEvidence.xml create mode 100644 samltest/data/saml1/core/impl/singleNameIdentifier.xml create mode 100644 samltest/data/saml1/core/impl/singleNameIdentifierAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleRequest.xml create mode 100644 samltest/data/saml1/core/impl/singleRequestAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleResponse.xml create mode 100644 samltest/data/saml1/core/impl/singleResponseAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleStatus.xml create mode 100644 samltest/data/saml1/core/impl/singleStatusCode.xml create mode 100644 samltest/data/saml1/core/impl/singleStatusMessage.xml create mode 100644 samltest/data/saml1/core/impl/singleSubject.xml create mode 100644 samltest/data/saml1/core/impl/singleSubjectConfirmation.xml create mode 100644 samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml create mode 100644 samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml create mode 100644 samltest/data/saml1/core/impl/singleSubjectLocality.xml create mode 100644 samltest/data/saml1/core/impl/singleSubjectLocalityAttributes.xml create mode 100644 samltest/internal.h create mode 100644 samltest/saml1/core/impl/ActionTest.cpp create mode 100644 samltest/saml1/core/impl/ActionTest.h create mode 100644 samltest/samltest.cpp create mode 100644 samltest/samltest.h create mode 100644 samltest/samltest.vcproj diff --git a/.cdtproject b/.cdtproject index 42e0853..abae0c2 100644 --- a/.cdtproject +++ b/.cdtproject @@ -57,6 +57,7 @@ + @@ -65,6 +66,8 @@ + + diff --git a/cpp-opensaml2.sln b/cpp-opensaml2.sln index a6e1762..19f31bb 100644 --- a/cpp-opensaml2.sln +++ b/cpp-opensaml2.sln @@ -3,6 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "saml", "saml\saml.vcproj", "{34DE3EA5-EA05-4261-8B63-A850FFB91768}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "samltest", "samltest\samltest.vcproj", "{8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}" + ProjectSection(ProjectDependencies) = postProject + {34DE3EA5-EA05-4261-8B63-A850FFB91768} = {34DE3EA5-EA05-4261-8B63-A850FFB91768} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -13,6 +18,10 @@ Global {34DE3EA5-EA05-4261-8B63-A850FFB91768}.Debug|Win32.Build.0 = Debug|Win32 {34DE3EA5-EA05-4261-8B63-A850FFB91768}.Release|Win32.ActiveCfg = Release|Win32 {34DE3EA5-EA05-4261-8B63-A850FFB91768}.Release|Win32.Build.0 = Release|Win32 + {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Debug|Win32.ActiveCfg = Debug|Win32 + {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Debug|Win32.Build.0 = Debug|Win32 + {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Release|Win32.ActiveCfg = Release|Win32 + {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/saml/SAMLConfig.h b/saml/SAMLConfig.h index 2b3540f..cd9dfa1 100644 --- a/saml/SAMLConfig.h +++ b/saml/SAMLConfig.h @@ -25,6 +25,8 @@ #include #include +#include + #include /** diff --git a/saml/saml1/core/Assertions.h b/saml/saml1/core/Assertions.h index 23cb0ef..eb138ae 100644 --- a/saml/saml1/core/Assertions.h +++ b/saml/saml1/core/Assertions.h @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,7 @@ namespace opensaml { */ namespace saml1 { + // Forward references class SAML_API Assertion; DECL_XMLOBJECT_SIMPLE(SAML_API,AssertionIDReference,Reference,SAML 1.x AssertionIDReference element); @@ -77,12 +79,25 @@ namespace opensaml { BEGIN_XMLOBJECT(SAML_API,NameIdentifier,xmltooling::SimpleElement,SAML 1.x NameIdentifier element); DECL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER); DECL_STRING_ATTRIB(Format,FORMAT); + DECL_XMLOBJECT_CONTENT(Name); /** NameIdentifierType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; - BEGIN_XMLOBJECT(SAML_API,SubjectConfirmationData,xmltooling::ElementProxy,SAML 1.x SubjectConfirmationData element); - END_XMLOBJECT; + /** SAML 1.x SubjectConfirmationData element */ + class SAML_API SubjectConfirmationData : public virtual xmltooling::ElementProxy, + public virtual xmltooling::AttributeExtensibleXMLObject, + public virtual xmltooling::ValidatingXMLObject + { + protected: + SubjectConfirmationData() {} + public: + virtual ~SubjectConfirmationData() {} + /** Type-specific clone method. */ + virtual SubjectConfirmationData* cloneSubjectConfirmationData() const=0; + /** Element local name. */ + static const XMLCh LOCAL_NAME[]; + }; BEGIN_XMLOBJECT(SAML_API,SubjectConfirmation,xmltooling::XMLObject,SAML 1.x SubjectConfirmation element); DECL_TYPED_CHILDREN(ConfirmationMethod); @@ -109,7 +124,7 @@ namespace opensaml { BEGIN_XMLOBJECT(SAML_API,SubjectLocality,xmltooling::XMLObject,SAML 1.x SubjectLocality element); DECL_STRING_ATTRIB(IPAddress,IPADDRESS); DECL_STRING_ATTRIB(DNSAddress,DNSADDRESS); - /** SubjectLocality local name */ + /** SubjectLocalityType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; @@ -117,7 +132,7 @@ namespace opensaml { DECL_XMLOBJECT_ATTRIB(AuthorityKind,AUTHORITYKIND,xmltooling::QName); DECL_STRING_ATTRIB(Location,LOCATION); DECL_STRING_ATTRIB(Binding,BINDING); - /** AuthorityBinding local name */ + /** AuthorityBindingType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; @@ -126,7 +141,70 @@ namespace opensaml { DECL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT); DECL_TYPED_CHILD(SubjectLocality); DECL_TYPED_CHILDREN(AuthorityBinding); - /** AuthenticationStatement local name */ + /** AuthenticationStatementType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + + BEGIN_XMLOBJECT(SAML_API,Action,xmltooling::SimpleElement,SAML 1.x Action element); + DECL_STRING_ATTRIB(Namespace,NAMESPACE); + DECL_XMLOBJECT_CONTENT(Value); + /** ActionType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + + BEGIN_XMLOBJECT(SAML_API,Evidence,xmltooling::XMLObject,SAML 1.x Evidence element); + DECL_TYPED_CHILDREN(AssertionIDReference); + DECL_TYPED_CHILDREN(Assertion); + /** EvidenceType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + + BEGIN_XMLOBJECT(SAML_API,AuthorizationDecisionStatement,SubjectStatement,SAML 1.x AuthorizationDecisionStatement element); + DECL_STRING_ATTRIB(Resource,RESOURCE); + DECL_STRING_ATTRIB(Decision,DECISION); + DECL_TYPED_CHILDREN(Action); + DECL_TYPED_CHILD(Evidence); + /** AuthorizationDecisionStatementType local name */ + static const XMLCh TYPE_NAME[]; + /** Permit Decision */ + static const XMLCh DECISION_PERMIT[]; + /** Deny Decision */ + static const XMLCh DECISION_DENY[]; + /** Indeterminate Decision */ + static const XMLCh DECISION_INDETERMINATE[]; + END_XMLOBJECT; + + BEGIN_XMLOBJECT(SAML_API,AttributeDesignator,xmltooling::XMLObject,SAML 1.x AttributeDesignator element); + DECL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME); + DECL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE); + /** AttributeDesignatorType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + + BEGIN_XMLOBJECT(SAML_API,Attribute,AttributeDesignator,SAML 1.x Attribute element); + DECL_XMLOBJECT_CHILDREN(AttributeValue); + /** AttributeType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + + /** SAML 1.x AttributeValue element */ + class SAML_API AttributeValue : public virtual xmltooling::ElementProxy, + public virtual xmltooling::AttributeExtensibleXMLObject, + public virtual xmltooling::ValidatingXMLObject + { + protected: + AttributeValue() {} + public: + virtual ~AttributeValue() {} + /** Type-specific clone method. */ + virtual AttributeValue* cloneAttributeValue() const=0; + /** Element local name. */ + static const XMLCh LOCAL_NAME[]; + }; + + BEGIN_XMLOBJECT(SAML_API,AttributeStatement,SubjectStatement,SAML 1.x AttributeStatement element); + DECL_TYPED_CHILDREN(Attribute); + /** AttributeStatementType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; @@ -153,16 +231,23 @@ namespace opensaml { static const XMLCh TYPE_NAME[]; END_XMLOBJECT; + DECL_SAML1OBJECTBUILDER(Action); DECL_SAML1OBJECTBUILDER(Advice); DECL_SAML1OBJECTBUILDER(Assertion); DECL_SAML1OBJECTBUILDER(AssertionIDReference); + DECL_SAML1OBJECTBUILDER(Attribute); + DECL_SAML1OBJECTBUILDER(AttributeDesignator); + DECL_SAML1OBJECTBUILDER(AttributeStatement); + DECL_SAML1OBJECTBUILDER(AttributeValue); DECL_SAML1OBJECTBUILDER(Audience); DECL_SAML1OBJECTBUILDER(AudienceRestrictionCondition); DECL_SAML1OBJECTBUILDER(AuthenticationStatement); + DECL_SAML1OBJECTBUILDER(AuthorizationDecisionStatement); DECL_SAML1OBJECTBUILDER(AuthorityBinding); - DECL_SAML1OBJECTBUILDER(DoNotCacheCondition); DECL_SAML1OBJECTBUILDER(Conditions); DECL_SAML1OBJECTBUILDER(ConfirmationMethod); + DECL_SAML1OBJECTBUILDER(DoNotCacheCondition); + DECL_SAML1OBJECTBUILDER(Evidence); DECL_SAML1OBJECTBUILDER(NameIdentifier); DECL_SAML1OBJECTBUILDER(Subject); DECL_SAML1OBJECTBUILDER(SubjectConfirmation); diff --git a/saml/saml1/core/impl/AssertionsImpl.cpp b/saml/saml1/core/impl/AssertionsImpl.cpp index 0ec6f0d..faf6978 100644 --- a/saml/saml1/core/impl/AssertionsImpl.cpp +++ b/saml/saml1/core/impl/AssertionsImpl.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -201,7 +202,10 @@ namespace opensaml { public AbstractXMLObjectUnmarshaller { public: - virtual ~NameIdentifierImpl() {} + virtual ~NameIdentifierImpl() { + XMLString::release(&m_Format); + XMLString::release(&m_NameQualifier); + } NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { @@ -226,43 +230,32 @@ namespace opensaml { IMPL_XMLOBJECT_CONTENT; protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL); + MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL); + } + void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(Format,FORMAT,NULL); PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL); } }; - class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, - public AbstractDOMCachingXMLObject, - public AbstractElementProxy, - public AbstractValidatingXMLObject, - public AbstractXMLObjectMarshaller, - public AbstractXMLObjectUnmarshaller + class SAML_DLLLOCAL SubjectConfirmationDataImpl + : public virtual SubjectConfirmationData, public AnyElementImpl, public AbstractValidatingXMLObject { public: virtual ~SubjectConfirmationDataImpl() {} SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) - : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + : AnyElementImpl(nsURI, localName, prefix, schemaType) { } SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) - : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractElementProxy(src), - AbstractValidatingXMLObject(src) { - for (list::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) { - if (*i) { - getXMLObjects().push_back((*i)->clone()); - } - } + : AnyElementImpl(src), AbstractValidatingXMLObject(src) { } IMPL_XMLOBJECT_CLONE(SubjectConfirmationData); - IMPL_XMLOBJECT_CONTENT; - - protected: - void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { - getXMLObjects().push_back(childXMLObject); - } }; class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation, @@ -411,6 +404,102 @@ namespace opensaml { } }; + class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality, + public AbstractChildlessElement, + public AbstractDOMCachingXMLObject, + public AbstractValidatingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller + { + public: + virtual ~SubjectLocalityImpl() { + XMLString::release(&m_IPAddress); + XMLString::release(&m_DNSAddress); + } + + SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + init(); + } + + SubjectLocalityImpl(const SubjectLocalityImpl& src) + : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + init(); + setIPAddress(src.getIPAddress()); + setDNSAddress(src.getDNSAddress()); + } + + void init() { + m_IPAddress=m_DNSAddress=NULL; + } + + IMPL_XMLOBJECT_CLONE(SubjectLocality); + IMPL_STRING_ATTRIB(IPAddress); + IMPL_STRING_ATTRIB(DNSAddress); + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL); + MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL); + } + + void processAttribute(const DOMAttr* attribute) { + PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL); + PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL); + } + }; + + class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding, + public AbstractChildlessElement, + public AbstractDOMCachingXMLObject, + public AbstractValidatingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller + { + public: + virtual ~AuthorityBindingImpl() { + delete m_AuthorityKind; + XMLString::release(&m_Location); + XMLString::release(&m_Binding); + } + + AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + init(); + } + + AuthorityBindingImpl(const AuthorityBindingImpl& src) + : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + init(); + setAuthorityKind(src.getAuthorityKind()); + setLocation(src.getLocation()); + setBinding(src.getBinding()); + } + + void init() { + m_AuthorityKind=NULL; + m_Location=m_Binding=NULL; + } + + IMPL_XMLOBJECT_CLONE(AuthorityBinding); + IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName); + IMPL_STRING_ATTRIB(Location); + IMPL_STRING_ATTRIB(Binding); + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL); + MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL); + MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL); + } + + void processAttribute(const DOMAttr* attribute) { + PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL); + PROC_STRING_ATTRIB(Location,LOCATION,NULL); + PROC_STRING_ATTRIB(Binding,BINDING,NULL); + } + }; + class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl { public: @@ -480,7 +569,8 @@ namespace opensaml { } }; - class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality, + class SAML_DLLLOCAL ActionImpl : public virtual Action, + public AbstractSimpleElement, public AbstractChildlessElement, public AbstractDOMCachingXMLObject, public AbstractValidatingXMLObject, @@ -488,44 +578,153 @@ namespace opensaml { public AbstractXMLObjectUnmarshaller { public: - virtual ~SubjectLocalityImpl() { - XMLString::release(&m_IPAddress); - XMLString::release(&m_DNSAddress); + virtual ~ActionImpl() { + XMLString::release(&m_Namespace); } - SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) { + } + + ActionImpl(const ActionImpl& src) + : AbstractXMLObject(src), AbstractSimpleElement(src), + AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + setNamespace(src.getNamespace()); + } + + IMPL_XMLOBJECT_CLONE(Action); + IMPL_STRING_ATTRIB(Namespace); + IMPL_XMLOBJECT_CONTENT; + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL); + } + + void processAttribute(const DOMAttr* attribute) { + PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL); + } + }; + + class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence, + public AbstractComplexElement, + public AbstractDOMCachingXMLObject, + public AbstractValidatingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller + { + public: + virtual ~EvidenceImpl() {} + + EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + } + + EvidenceImpl(const EvidenceImpl& src) + : AbstractXMLObject(src), + AbstractDOMCachingXMLObject(src), + AbstractValidatingXMLObject(src) { + + for (list::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) { + if (*i) { + AssertionIDReference* ref=dynamic_cast(*i); + if (ref) { + getAssertionIDReferences().push_back(ref->cloneAssertionIDReference()); + continue; + } + + Assertion* assertion=dynamic_cast(*i); + if (assertion) { + getAssertions().push_back(assertion->cloneAssertion()); + continue; + } + } + } + } + + IMPL_XMLOBJECT_CLONE(Evidence); + IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end()); + IMPL_TYPED_CHILDREN(Assertion,m_children.end()); + + protected: + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + PROC_TYPED_CHILDREN(AssertionIDReference,SAMLConstants::SAML1_NS,false); + PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML1_NS,true); + AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); + } + }; + + class SAML_DLLLOCAL AuthorizationDecisionStatementImpl + : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl + { + public: + virtual ~AuthorizationDecisionStatementImpl() { + XMLString::release(&m_Resource); + XMLString::release(&m_Decision); + } + + AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : SubjectStatementImpl(nsURI, localName, prefix, schemaType) { init(); } - SubjectLocalityImpl(const SubjectLocalityImpl& src) - : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src) : SubjectStatementImpl(src) { init(); - setIPAddress(src.getIPAddress()); - setDNSAddress(src.getDNSAddress()); + setResource(src.getResource()); + setDecision(src.getDecision()); + if (src.getEvidence()) + setEvidence(src.getEvidence()->cloneEvidence()); + VectorOf(Action) v=getActions(); + for (vector::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) { + if (*i) { + v.push_back((*i)->cloneAction()); + } + } } void init() { - m_IPAddress=m_DNSAddress=NULL; + SubjectStatementImpl::init(); + m_Resource=NULL; + m_Decision=NULL; + m_Evidence=NULL; + m_children.push_back(NULL); + m_pos_Evidence=m_pos_Subject; + m_pos_Evidence++; } - IMPL_XMLOBJECT_CLONE(SubjectLocality); - IMPL_STRING_ATTRIB(IPAddress); - IMPL_STRING_ATTRIB(DNSAddress); + IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement); + SubjectStatement* cloneSubjectStatement() const { + return cloneAuthorizationDecisionStatement(); + } + Statement* cloneStatement() const { + return cloneAuthorizationDecisionStatement(); + } + IMPL_STRING_ATTRIB(Resource); + IMPL_STRING_ATTRIB(Decision); + IMPL_TYPED_CHILD(Evidence); + IMPL_TYPED_CHILDREN(Action, m_pos_Evidence); protected: void marshallAttributes(DOMElement* domElement) const { - MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL); - MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL); + MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL); + MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL); + SubjectStatementImpl::marshallAttributes(domElement); + } + + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + PROC_TYPED_CHILD(Evidence,SAMLConstants::SAML1_NS,false); + PROC_TYPED_CHILDREN(Action,SAMLConstants::SAML1_NS,false); + SubjectStatementImpl::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { - PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL); - PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL); + PROC_STRING_ATTRIB(Resource,RESOURCE,NULL); + PROC_STRING_ATTRIB(Decision,DECISION,NULL); + SubjectStatementImpl::processAttribute(attribute); } }; - class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding, + class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator, public AbstractChildlessElement, public AbstractDOMCachingXMLObject, public AbstractValidatingXMLObject, @@ -533,46 +732,149 @@ namespace opensaml { public AbstractXMLObjectUnmarshaller { public: - virtual ~AuthorityBindingImpl() { - delete m_AuthorityKind; - XMLString::release(&m_Location); - XMLString::release(&m_Binding); + virtual ~AttributeDesignatorImpl() { + XMLString::release(&m_AttributeName); + XMLString::release(&m_AttributeNamespace); } - AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } - AuthorityBindingImpl(const AuthorityBindingImpl& src) + AttributeDesignatorImpl(const AttributeDesignatorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { init(); - setAuthorityKind(src.getAuthorityKind()); - setLocation(src.getLocation()); - setBinding(src.getBinding()); + setAttributeName(src.getAttributeName()); + setAttributeNamespace(src.getAttributeNamespace()); } void init() { - m_AuthorityKind=NULL; - m_Location=m_Binding=NULL; + m_AttributeName=m_AttributeNamespace=NULL; } - IMPL_XMLOBJECT_CLONE(AuthorityBinding); - IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName); - IMPL_STRING_ATTRIB(Location); - IMPL_STRING_ATTRIB(Binding); + IMPL_XMLOBJECT_CLONE(AttributeDesignator); + IMPL_STRING_ATTRIB(AttributeName); + IMPL_STRING_ATTRIB(AttributeNamespace); protected: void marshallAttributes(DOMElement* domElement) const { - MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL); - MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL); - MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL); + MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL); + MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL); } void processAttribute(const DOMAttr* attribute) { - PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL); - PROC_STRING_ATTRIB(Location,LOCATION,NULL); - PROC_STRING_ATTRIB(Binding,BINDING,NULL); + PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL); + PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL); + } + }; + + class SAML_DLLLOCAL AttributeImpl : public virtual Attribute, + public AbstractComplexElement, + public AbstractDOMCachingXMLObject, + public AbstractValidatingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller + { + public: + virtual ~AttributeImpl() { + XMLString::release(&m_AttributeName); + XMLString::release(&m_AttributeNamespace); + } + + AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + init(); + } + + AttributeImpl(const AttributeImpl& src) + : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + init(); + setAttributeName(src.getAttributeName()); + setAttributeNamespace(src.getAttributeNamespace()); + VectorOf(XMLObject) v=getAttributeValues(); + for (vector::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) { + if (*i) { + v.push_back((*i)->clone()); + } + } + } + + void init() { + m_AttributeName=m_AttributeNamespace=NULL; + } + + IMPL_XMLOBJECT_CLONE(Attribute); + AttributeDesignator* cloneAttributeDesignator() const { + return cloneAttribute(); + } + IMPL_STRING_ATTRIB(AttributeName); + IMPL_STRING_ATTRIB(AttributeNamespace); + IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end()); + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL); + MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL); + } + + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + getAttributeValues().push_back(childXMLObject); + } + + void processAttribute(const DOMAttr* attribute) { + PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL); + PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL); + } + }; + + class SAML_DLLLOCAL AttributeValueImpl + : public virtual AttributeValue, public AnyElementImpl, public AbstractValidatingXMLObject + { + public: + virtual ~AttributeValueImpl() {} + + AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AnyElementImpl(nsURI, localName, prefix, schemaType) { + } + + AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src), AbstractValidatingXMLObject(src) {} + + IMPL_XMLOBJECT_CLONE(AttributeValue); + }; + + class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl + { + public: + virtual ~AttributeStatementImpl() {} + + AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : SubjectStatementImpl(nsURI, localName, prefix, schemaType) { + init(); + } + + AttributeStatementImpl(const AttributeStatementImpl& src) : SubjectStatementImpl(src) { + VectorOf(Attribute) v=getAttributes(); + for (vector::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) { + if (*i) { + v.push_back((*i)->cloneAttribute()); + } + } + } + + IMPL_XMLOBJECT_CLONE(AttributeStatement); + SubjectStatement* cloneSubjectStatement() const { + return cloneAttributeStatement(); + } + Statement* cloneStatement() const { + return cloneAttributeStatement(); + } + IMPL_TYPED_CHILDREN(Attribute, m_children.end()); + + protected: + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + PROC_TYPED_CHILDREN(Attribute,SAMLConstants::SAML1_NS,true); + SubjectStatementImpl::processChildElement(childXMLObject,root); } }; @@ -767,16 +1069,23 @@ namespace opensaml { // Builder Implementations +IMPL_XMLOBJECTBUILDER(Action); IMPL_XMLOBJECTBUILDER(Advice); IMPL_XMLOBJECTBUILDER(Assertion); IMPL_XMLOBJECTBUILDER(AssertionIDReference); +IMPL_XMLOBJECTBUILDER(Attribute); +IMPL_XMLOBJECTBUILDER(AttributeDesignator); +IMPL_XMLOBJECTBUILDER(AttributeStatement); +IMPL_XMLOBJECTBUILDER(AttributeValue); IMPL_XMLOBJECTBUILDER(Audience); IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition); IMPL_XMLOBJECTBUILDER(AuthenticationStatement); +IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement); IMPL_XMLOBJECTBUILDER(AuthorityBinding); IMPL_XMLOBJECTBUILDER(Conditions); IMPL_XMLOBJECTBUILDER(ConfirmationMethod); IMPL_XMLOBJECTBUILDER(DoNotCacheCondition); +IMPL_XMLOBJECTBUILDER(Evidence); IMPL_XMLOBJECTBUILDER(NameIdentifier); IMPL_XMLOBJECTBUILDER(Subject); IMPL_XMLOBJECTBUILDER(SubjectConfirmation); @@ -784,6 +1093,9 @@ IMPL_XMLOBJECTBUILDER(SubjectConfirmationData); IMPL_XMLOBJECTBUILDER(SubjectLocality); // Unicode literals +const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n); +const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e); +const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e); const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e); const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e); const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n); @@ -793,6 +1105,15 @@ const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,s,s,e,r const XMLCh Assertion::ISSUER_ATTRIB_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r); const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t); const XMLCh AssertionIDReference::LOCAL_NAME[] = UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e); +const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e); +const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e); +const XMLCh AttributeDesignator::LOCAL_NAME[] = UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r); +const XMLCh AttributeDesignator::TYPE_NAME[] = UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r,T,y,p,e); +const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e); +const XMLCh AttributeDesignator::ATTRIBUTENAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,N,a,m,e,s,p,a,c,e); +const XMLCh AttributeStatement::LOCAL_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t); +const XMLCh AttributeStatement::TYPE_NAME[] = UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e); +const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e); const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e); const XMLCh AudienceRestrictionCondition::LOCAL_NAME[] = UNICODE_LITERAL_28(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n); const XMLCh AudienceRestrictionCondition::TYPE_NAME[] = UNICODE_LITERAL_32(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n,T,y,p,e); @@ -805,6 +1126,13 @@ const XMLCh AuthorityBinding::TYPE_NAME[] = UNICODE_LITERAL_20(A,u,t,h,o const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d); const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n); const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g); +const XMLCh AuthorizationDecisionStatement::LOCAL_NAME[] = UNICODE_LITERAL_30(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t); +const XMLCh AuthorizationDecisionStatement::TYPE_NAME[] = UNICODE_LITERAL_34(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e); +const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e); +const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n); +const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t); +const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y); +const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e); const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n); const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s); const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e); @@ -813,6 +1141,8 @@ const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n const XMLCh ConfirmationMethod::LOCAL_NAME[] = UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d); const XMLCh DoNotCacheCondition::LOCAL_NAME[] = UNICODE_LITERAL_19(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n); const XMLCh DoNotCacheCondition::TYPE_NAME[] = UNICODE_LITERAL_23(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n,T,y,p,e); +const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e); +const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e); const XMLCh NameIdentifier::LOCAL_NAME[] = UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r); const XMLCh NameIdentifier::TYPE_NAME[] = UNICODE_LITERAL_18(N,a,m,e,I,d,e,n,t,i,f,i,e,r,T,y,p,e); const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r); diff --git a/saml/saml1/core/impl/AssertionsSchemaValidators.cpp b/saml/saml1/core/impl/AssertionsSchemaValidators.cpp index 7aed851..f789011 100644 --- a/saml/saml1/core/impl/AssertionsSchemaValidators.cpp +++ b/saml/saml1/core/impl/AssertionsSchemaValidators.cpp @@ -31,10 +31,12 @@ using namespace std; namespace opensaml { namespace saml1 { - + + XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,Action); XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,AssertionIDReference); XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,Audience); XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod); + XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,NameIdentifier); BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AudienceRestrictionCondition); XMLOBJECTVALIDATOR_NONEMPTY(AudienceRestrictionCondition,Audience); @@ -70,6 +72,37 @@ namespace opensaml { XMLOBJECTVALIDATOR_REQUIRE(AuthenticationStatement,Subject); END_XMLOBJECTVALIDATOR; + BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Evidence); + if (!ptr->hasChildren()) + throw ValidationException("Evidence must have at least one child element."); + END_XMLOBJECTVALIDATOR; + + BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AuthorizationDecisionStatement); + XMLOBJECTVALIDATOR_REQUIRE(AuthorizationDecisionStatement,Resource); + XMLOBJECTVALIDATOR_REQUIRE(AuthorizationDecisionStatement,Decision); + if (!XMLString::equals(ptr->getDecision(),AuthorizationDecisionStatement::DECISION_PERMIT) && + !XMLString::equals(ptr->getDecision(),AuthorizationDecisionStatement::DECISION_DENY) && + !XMLString::equals(ptr->getDecision(),AuthorizationDecisionStatement::DECISION_INDETERMINATE)) + throw ValidationException("Decision must be one of Deny, Permit, or Indeterminate."); + XMLOBJECTVALIDATOR_REQUIRE(AuthorizationDecisionStatement,Subject); + XMLOBJECTVALIDATOR_NONEMPTY(AuthorizationDecisionStatement,Action); + END_XMLOBJECTVALIDATOR; + + BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AttributeDesignator); + XMLOBJECTVALIDATOR_REQUIRE(AttributeDesignator,AttributeName); + XMLOBJECTVALIDATOR_REQUIRE(AttributeDesignator,AttributeNamespace); + END_XMLOBJECTVALIDATOR; + + BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Attribute); + XMLOBJECTVALIDATOR_REQUIRE(Attribute,AttributeName); + XMLOBJECTVALIDATOR_REQUIRE(Attribute,AttributeNamespace); + XMLOBJECTVALIDATOR_NONEMPTY(Attribute,AttributeValue); + END_XMLOBJECTVALIDATOR; + + BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AttributeStatement); + XMLOBJECTVALIDATOR_NONEMPTY(AttributeStatement,Attribute); + END_XMLOBJECTVALIDATOR; + BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Assertion); XMLOBJECTVALIDATOR_REQUIRE(Assertion,AssertionID); XMLOBJECTVALIDATOR_REQUIRE(Assertion,Issuer); @@ -121,26 +154,43 @@ namespace opensaml { void opensaml::saml1::registerAssertionClasses() { QName q; + REGISTER_ELEMENT(Action); REGISTER_ELEMENT(Advice); REGISTER_ELEMENT(Assertion); REGISTER_ELEMENT(AssertionIDReference); + REGISTER_ELEMENT(Attribute); + REGISTER_ELEMENT(AttributeDesignator); + REGISTER_ELEMENT(AttributeStatement); + REGISTER_ELEMENT_NOVAL(AttributeValue); REGISTER_ELEMENT(Audience); REGISTER_ELEMENT(AudienceRestrictionCondition); REGISTER_ELEMENT(AuthenticationStatement); REGISTER_ELEMENT(AuthorityBinding); + REGISTER_ELEMENT(AuthorizationDecisionStatement); REGISTER_ELEMENT(Conditions); REGISTER_ELEMENT(ConfirmationMethod); REGISTER_ELEMENT_NOVAL(DoNotCacheCondition); + REGISTER_ELEMENT(Evidence); + REGISTER_ELEMENT(NameIdentifier); + REGISTER_ELEMENT(Subject); REGISTER_ELEMENT(SubjectConfirmation); REGISTER_ELEMENT_NOVAL(SubjectConfirmationData); REGISTER_ELEMENT(SubjectLocality); + REGISTER_TYPE(Action); REGISTER_TYPE(Advice); REGISTER_TYPE(Assertion); + REGISTER_TYPE(Attribute); + REGISTER_TYPE(AttributeDesignator); + REGISTER_TYPE(AttributeStatement); REGISTER_TYPE(AudienceRestrictionCondition); REGISTER_TYPE(AuthenticationStatement); REGISTER_TYPE(AuthorityBinding); + REGISTER_TYPE(AuthorizationDecisionStatement); REGISTER_TYPE(Conditions); REGISTER_TYPE_NOVAL(DoNotCacheCondition); + REGISTER_TYPE(Evidence); + REGISTER_TYPE(NameIdentifier); + REGISTER_TYPE(Subject); REGISTER_TYPE(SubjectConfirmation); REGISTER_TYPE(SubjectLocality); } diff --git a/samltest/.gitignore b/samltest/.gitignore new file mode 100644 index 0000000..98bbc31 --- /dev/null +++ b/samltest/.gitignore @@ -0,0 +1 @@ +/Debug diff --git a/samltest/Makefile.am b/samltest/Makefile.am new file mode 100644 index 0000000..d45c891 --- /dev/null +++ b/samltest/Makefile.am @@ -0,0 +1,33 @@ +AUTOMAKE_OPTIONS = foreign + +if BUILD_UNITTEST +bin_PROGRAMS = samltest +samltest_CXXFLAGS = $(CXXFLAGS) $(CXXTESTFLAGS) +else +bin_PROGRAMS = +endif + +samltest_h = \ + samltest.h \ + saml1/core/impl/ActionTest.h + +noinst_HEADERS = \ + internal.h + +nodist_samltest_SOURCES = $(samltest_h:.h=.cpp) + +CLEANFILES = $(nodist_samltest_SOURCES) + +do-cxxtestgen: + if test $(HFILE) = "samltest.h"; then \ + $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \ + else \ + $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \ + fi; + +$(nodist_samltest_SOURCES): %.cpp: %.h + $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@ + +samltest_LDADD = $(top_builddir)/saml/libsaml.la + +EXTRA_DIST = samltest.vcproj $(samltest_h) data diff --git a/samltest/data/cert.pem b/samltest/data/cert.pem new file mode 100644 index 0000000..e8261f3 --- /dev/null +++ b/samltest/data/cert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICjzCCAfigAwIBAgIJAKk8t1hYcMkhMA0GCSqGSIb3DQEBBAUAMDoxCzAJBgNV +BAYTAlVTMRIwEAYDVQQKEwlJbnRlcm5ldDIxFzAVBgNVBAMTDnNwLmV4YW1wbGUu +b3JnMB4XDTA1MDYyMDE1NDgzNFoXDTMyMTEwNTE1NDgzNFowOjELMAkGA1UEBhMC +VVMxEjAQBgNVBAoTCUludGVybmV0MjEXMBUGA1UEAxMOc3AuZXhhbXBsZS5vcmcw +gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANlZ1L1mKzYbUVKiMQLhZlfGDyYa +/jjCiaXP0WhLNgvJpOTeajvsrApYNnFX5MLNzuC3NeQIjXUNLN2Yo2MCSthBIOL5 +qE5dka4z9W9zytoflW1LmJ8vXpx8Ay/meG4z//J5iCpYVEquA0xl28HUIlownZUF +7w7bx0cF/02qrR23AgMBAAGjgZwwgZkwHQYDVR0OBBYEFJZiO1qsyAyc3HwMlL9p +JpN6fbGwMGoGA1UdIwRjMGGAFJZiO1qsyAyc3HwMlL9pJpN6fbGwoT6kPDA6MQsw +CQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMRcwFQYDVQQDEw5zcC5leGFt +cGxlLm9yZ4IJAKk8t1hYcMkhMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQAD +gYEAMFq/UeSQyngE0GpZueyD2UW0M358uhseYOgGEIfm+qXIFQF6MYwNoX7WFzhC +LJZ2E6mEvZZFHCHUtl7mGDvsRwgZ85YCtRbvleEpqfgNQToto9pLYe+X6vvH9Z6p +gmYsTmak+kxO93JprrOd9xp8aZPMEprL7VCdrhbZEfyYER0= +-----END CERTIFICATE----- diff --git a/samltest/data/key.pem b/samltest/data/key.pem new file mode 100644 index 0000000..5149449 --- /dev/null +++ b/samltest/data/key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDZWdS9Zis2G1FSojEC4WZXxg8mGv44womlz9FoSzYLyaTk3mo7 +7KwKWDZxV+TCzc7gtzXkCI11DSzdmKNjAkrYQSDi+ahOXZGuM/Vvc8raH5VtS5if +L16cfAMv5nhuM//yeYgqWFRKrgNMZdvB1CJaMJ2VBe8O28dHBf9Nqq0dtwIDAQAB +AoGAKsaVKdlLs9BYhuzIvIpju+6M2LEDS2Rt9qYZzm7O6i77NtfXDIgdq8OEo3Xq +3bPnfS5Retl8DYdURyBdN4Uh+WR/BUWQjBvOaJLEEdxvuAaLyAjniVREwkc2rXTZ +xoYYFL/XMyAEt/ye2ZbTw2u5R2i7HCYdddZWMkP1+Vabg8ECQQD7VJXWy8KFiyeC +thJiVqG/h5IO0y25dId/n81sW2B55eK0c4+IVsqc0a45/U/y2y1wtNBmIEQQn9yY +pDtWwzVRAkEA3WOgmvxFGTI5V1K5CLCCZzQIUYpzQDQvBu2sKYuy8dK2BMEGe9Zw +cKVyZJuDKHBvrVI5G6CqkHuFD2PwDvwAhwJBAPdfbM/q4/4/VddAz918uV1j2a2/ +y3yDJq7GIhHp6o5wZ3AHYhnmmyw48YxgOGWntxT80zYBwhy+zAhtdX5TStECQEKL +drP/TfnD2e6Ag/Ozso642iNAXWIYDWakvBIE1rXPYzzMlFlW3JdPc7H/+I2INlk/ +lMDUK1CggB9fJ8IpRzMCQQDQmqpWZtH6eaMAN6b/9WBdVzqzpCeTWFlL/SwhVbzI +s+k2zvC4HEAK9Y199g6SHVTQMEAE49wfhhCpY0JdCsQ/ +-----END RSA PRIVATE KEY----- diff --git a/samltest/data/saml1/core/impl/AdviceWithChildren.xml b/samltest/data/saml1/core/impl/AdviceWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..eeab16c0b4fcc28af50017b1e158ee79cd380c1c GIT binary patch literal 470 zcmaixy9&Zk5JXQc_zxkyuf`&%K@dSOjjvwf14XZ3H2C%E+>Hu?#44AanVp%<{XvJA z8%GWVBlD8wcWVdcVAr*~$~ z-)+D5^cnEUniUBj6l|#|*${Z3%N;k|>Y1n$$aTI@H?Z{XGf#}U*3`Xb24q~(5n{#M z5mSb$D@TnrYErWWou{Ws->EJmWJyqiC$$iuLLV1?bT(ov~MBY4AL&>G|h&EGYZ-p|n u)Z>|b(_QlQYx_| \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml b/samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..db4d7d4c5aeaf108060d04d0fbc82872c03b98ee GIT binary patch literal 508 zcmd6ku?oUK5JX=s_z%Heqm4z-1RE=@q90&l5XD@;T*R+eC#wW(#8M9Kmfe}z*}eON z83{K^&IDX3xKMMX!ZBySgb`!Cfhvw%`Ms)+gH^X|STYo9DojF5pPm$JcBUAy!0TMZ z$!HW6q`G$&m8R*X{p#<;i#l%Gy%EzXSBcTOYU|Fl3yZxRMN(X_W~J!mHZpW=v-tNc h19KLCcuS?9aS|?T|kL3-5ktq@h}h($ literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml b/samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8a3d4d1363b42bb44dea07f13f6a74aaa50073a GIT binary patch literal 402 zcmbV|y9&ZE7=^!C@EwA?Ru_k$Eh0GS;^hIP77;WB+lo)Go}`yi#3c#;Isduj^=3xG zlN(nI4>Il)T*z_E88BhQSho@4NHsqRb({lwV9$!7SW|HlV*2!?Sa1xAmIYPVsJAn= z(kUqAa*hYgot{rrY1e6%%fl!2xC?$>*-9bRxs&sTwO(}t8`wqY W*LwI?@z=D5=toA>W&FQ$_`MH`5l4am literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml b/samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml new file mode 100644 index 0000000..988ec02 --- /dev/null +++ b/samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml b/samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..f63491b78193d92763bce7e801f505cd9a220b9c GIT binary patch literal 496 zcmbV}%?`m(5QV?B#5;(+zl}wMhJ_U?JOI`B3Ac$}!pq~_X*Afen(3W0XTF)?p{+05+{eKbO{`1aXGzZ>Ii(H?rchGxtDV!$01WD$_nnt)VbVG z< \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml b/samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..919637dcad5c9b0e19132342596605869f94793a GIT binary patch literal 500 zcmb`ExeCHS5Qe{6@Et;Wuf`&HAgGmA(Ff2NJkS+#i1_g8zZ+dhtxRH{PbL5I)NJx)1UA=)2L!$mpsA2EWH7n+{G}YJ4m=R4HQq0*n#fS+d1qbmm z@gC|IAN8pe6V+e0ScpYaF|Ai2&nlPEOyo6fs#0o3y{j0OZ*k*1Q&$&Kj)>*HWTC3s zB68EY)H9zVbcsi`%(3*hoLoMeqNBa)J0+g~Uv#D)IO@XHtyAya@!S7)QTIP@(|uS> literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/ConditionsWithChildren.xml b/samltest/data/saml1/core/impl/ConditionsWithChildren.xml new file mode 100644 index 0000000..393695d --- /dev/null +++ b/samltest/data/saml1/core/impl/ConditionsWithChildren.xml @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/EvidenceWithChildren.xml b/samltest/data/saml1/core/impl/EvidenceWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..27f5278dc02bcc924db5f845cdde1d081a0ddf90 GIT binary patch literal 614 zcmd6lOA7%}7>1v<@*gI9w~fW*l0qr7aodX_;wXdsdc5-;#Sm+&Ii2sleeap;jXEtZ z?AQ`;CgwoGnmvvN1*(*&=o@I_nCpI_sbgi+31fN`g{leDqDh{d6cc8qSS6$@)wNij zA4|!*IibQAWa@U3yVLDn{4_<1aHbX8`KSaTBicj^bn@v!LnoH~_{d(cB+a)hZK-5& zeL4)qTpIhCv8-LPdwg=!T_bsKl=r~Y6tdm<6p=Od8x!!Kj=%dUtIh8(?f(X~bO!|` BWtji~ literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/FullStatus.xml b/samltest/data/saml1/core/impl/FullStatus.xml new file mode 100644 index 0000000..c4df510 --- /dev/null +++ b/samltest/data/saml1/core/impl/FullStatus.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/FullStatusCode.xml b/samltest/data/saml1/core/impl/FullStatusCode.xml new file mode 100644 index 0000000..760e44f --- /dev/null +++ b/samltest/data/saml1/core/impl/FullStatusCode.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/FullStatusMessage.xml b/samltest/data/saml1/core/impl/FullStatusMessage.xml new file mode 100644 index 0000000..b8539ac --- /dev/null +++ b/samltest/data/saml1/core/impl/FullStatusMessage.xml @@ -0,0 +1 @@ +Nibble a Happy Warthog \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml b/samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml new file mode 100644 index 0000000..fb013eb --- /dev/null +++ b/samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml @@ -0,0 +1,6 @@ + diff --git a/samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml b/samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml new file mode 100644 index 0000000..a9d1b48 --- /dev/null +++ b/samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/RequestWithQuery.xml b/samltest/data/saml1/core/impl/RequestWithQuery.xml new file mode 100644 index 0000000..97642b1 --- /dev/null +++ b/samltest/data/saml1/core/impl/RequestWithQuery.xml @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/ResponseWithChildren.xml b/samltest/data/saml1/core/impl/ResponseWithChildren.xml new file mode 100644 index 0000000..fdbd61e --- /dev/null +++ b/samltest/data/saml1/core/impl/ResponseWithChildren.xml @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml b/samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..38af8d22537c23712dff15e8fa6446cacbeb57db GIT binary patch literal 468 zcmb`D%?`m(6okLE#5*+hl#NA$Mu?TJ@Bmf+;Yzd>Pmk#-Vk7Co>fW50Gc#xI4|;^$ zIB~?|%9;x)d(JreH0aQxt=ALcNHkvwb!-h?FlRzjtgbjA1M1YIm=c>}z>J(F2W=;0 zj7)bUg^Tc5lhVn1C2-mdKHG(VE~eA$EOwErz@4eD?Vm}va2XOY)vwGO7(2CV-X0C5 j`%d;NOQfxgon7kT|7ELM3u9{}R@bGg|7oIXkJkSa1~XJy literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/SubjectWithChildren.xml b/samltest/data/saml1/core/impl/SubjectWithChildren.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c134ba19bd380c99b43cff063278bceefe7d7dc GIT binary patch literal 346 zcmZ9I$qK?i5JcZu@E?MAw~L3M1`z~7y{I1$hLhL{ zxm4bpoDgA&vOR_NI`yt%+J2imud?%XF21Ram@`xL_7!?`=3VC>*A2P&b+GuTOy%4% h7;dj;Ndwvy^uOP+zk{Ju<%vDlF7xHJ%M8_|!xvh@JvIOU literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAction.xml b/samltest/data/saml1/core/impl/singleAction.xml new file mode 100644 index 0000000000000000000000000000000000000000..f6b3cf5d122a49bdced73fd542ad956c1a0d57c8 GIT binary patch literal 220 zcmX|*%?<%U5QM+8#5+vf{aqX;*tj@x!UG5!k0M6U>8k#!-XG=^yts2C z@T83m*t2FR*G!&*C4G7#CXP;wtn|}#ywK&C^!WGW nl!sDHw@QCGJ?rL-()UJ`$WF8^8*Oc?=sImM?}=hh@5*xW5Uv-9(Ok&^M? z%!!CQIaf-K6gWo24CvC=9|>{nwBHML91PvCW=2P>p*R_1+O(utvNgqoiEezQ7gat^ zc+zl!%T2CMyFz!tJ>bqXa+|$W5>`@MFxT`+l^DCU%(X{I8Zs=K>x-tHIKk(uS#M)y U{>?bG?%w)(xu^8>{_A6H-*B!siU0rr literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAdvice.xml b/samltest/data/saml1/core/impl/singleAdvice.xml new file mode 100644 index 0000000000000000000000000000000000000000..5bd3f6d5383bc9e1b99d10f4e9dabbe7741a9ceb GIT binary patch literal 220 zcmX|*y9&ZU5JgWd_z#P{uf}3ggN>C|>IX;+BIpF%82ozm?j%^vW$yFyWl6!C2X_K3 z6;Bd3YK#>l=1iFB1~Epd|3$2Eb@s%OEn}$`(iE&2GEidT?1_<$^sOAF{GsnL@$s+8 oEibj2ezknLJ@e)nmE%VK$U$j)c0%2%=<4K~n|^a%I_-A+0KWz$8vptv!Ex}Se~32T{iopzOehYmq^kyOUHQNCp*X2DWZ+s#JzcSh(NniSH`;?-<_T$UwIxaYrT H&|dZiJr*(g literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAssertionArtifact.xml b/samltest/data/saml1/core/impl/singleAssertionArtifact.xml new file mode 100644 index 0000000000000000000000000000000000000000..84d055865fbbb313c2bcf8733de83b87e7dbc4e6 GIT binary patch literal 244 zcmYk1I}XAy5JX>%#2q4fehq~ML}{p?0uF#eKuE!ka6p_M7;jQgdA$2PGyZ&8lJn+H zO~#9g2ay{A&x#RqCd_nZ+IULM&)RyfwmouS!&uZpOwO7i135-c=GfpUbc^QO_P&KO zlD>#4rLsQXi*tW(Q~pz|*EEPty%OQgy)xa(!Le7$j;&PJ*U{)*kaw`owf$h)_4@(! CyecmM literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml b/samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5763187ac9a7647519839a31d5b2d04613f6f00 GIT binary patch literal 310 zcmb7~wITL33CfayP&5zo8&bHmNW5rmmg*-VKLk1!?9E@1wDD>ADx9z!w zGNL}oRZ1m&zL(Ga+{XNeyk65FZ|oHv-sqL-Rs_dZDI3;O-@cAocR}o6ov$Kg>Kboi PUR0e_%2bnoy4njrxSKaC literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAssertionAttributes.xml b/samltest/data/saml1/core/impl/singleAssertionAttributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c83a38496668bd8aedcb45883d0d0fb4a1ac712 GIT binary patch literal 464 zcmaKpOH0F05QV?B;C~42Ym+V%FV#{gg@9f8Shy=~kraCiy=n2+t7j$;5yeGr=FXg) z$K>OaF%#a|@kYjp4F?hxdm^`7P;g1Eccw{XrT$ve$g5AEcx28%s4HP6+;PsC7!ylp z3`|ugXRTY-tW}HZhaPEKM`=g(_WIg9*gQJZ#_L-8fd_FexL4J93y%J&VSdfYZ}pOy zJFk?(64lZ*itgU9d?QM+B{^8Sk7nC9Tx;J0 bJ%yhmZP@D2pCkQ|Lbsfk*88yCyK;O1zbi>4 literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAssertionIDReference.xml b/samltest/data/saml1/core/impl/singleAssertionIDReference.xml new file mode 100644 index 0000000000000000000000000000000000000000..db3bef3ff96e9e03bed16241f9f3d27ffcd526d6 GIT binary patch literal 248 zcmY+9O9}!p5JcZv@D77}e;XG;9Rv{s-S|0xXcR#+U`FxuYNaEBt29-W*VV5#LrR`p zxlr)Hb0c!5A~2#wpAJ2}g`B`%`ay2sWbT#?GulcGlqnh0q#=;P9%Nn5X@iD57Ops69U(={tbH00{a<1?U6O~j0?C3*zvGfU0C z)CoftQjS(FsiF8~1|zpu{Vx*Sl*mX+#4M5(b7T3T?Q^B_SZdRZsk$<;XWhS>UFDmL fuv5j_9x#^cs(P|fmy&bRo=6w8sto_%V6XoG;=w#4 literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAttribute.xml b/samltest/data/saml1/core/impl/singleAttribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e81fadbcd40fc5df33e84cc4d6d09c102da0ff0 GIT binary patch literal 226 zcmX|*y9xp^6hu!g_z#P{uf`&%i;b05>Ie7;BIsS%WW}#nCy7XkT<*-BIqwg1YF<3J zQ}M*p61dS|EEq6l#6*83#W-t!k!oDCdSK6*pFbW9SW@lxQZ0v|Zdfy;BiB%#gb8h0N_1>PqG3v@Q|Qf( zN>iq!y3NXE-cH|D$!E38_1ZId-G-zr%%%DbD`hU2YpU5yaJxWWHso>Oh}7lJH^Z_? a^{v0ve^VS6<)tF9U5Jk^g@E?MEUmF)eErPhxmHGj-mLk{$5-WbadXtKTA;W#m%=^QVf)_1! z3{PqTksBVziV<@r%=8;Ej!O7dtfR^7nG-w4QZ1w@STkgx#7LPFEgK$sL7oepx|*#j zO=y%-3h`piZv!XB{@rPQC)Nq`(k55pldsJwR{l!JQF9LL)%E+@td7zIDf(;D4by(Z EFH1=(lK=n! literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml b/samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..0183cd6dc8649d01317cf8c6db4cd83529a4cb28 GIT binary patch literal 388 zcma)&%L;-(07cI_=pP36y*4eRk|0`Do9YA1B!V16Gy3}K&S-`Z@oVl5pg5q zgyBj`LCKLE%b0)xUHW<(F_uL5UaaNd*)1F9bfg+e6EUGpONk}1PYjuI(JAEFQR$X4 z)8iTrN{NN!VokHaiV5Ft*I$XX!g6Vy%kj>a`IJ!pM95k_OBTA-dqb}-r75JSzb5e8 ijJn+U-nD8{UF&c5-;|QG@)9j@d7s5EG|+}#{lA{5A3_@d literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAttributeQuery.xml b/samltest/data/saml1/core/impl/singleAttributeQuery.xml new file mode 100644 index 0000000..20ea074 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleAttributeQuery.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml b/samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml new file mode 100644 index 0000000..a5d3b7f --- /dev/null +++ b/samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleAttributeStatement.xml b/samltest/data/saml1/core/impl/singleAttributeStatement.xml new file mode 100644 index 0000000000000000000000000000000000000000..2896710fcca20fc4b8830d465c29fecc90b98a26 GIT binary patch literal 244 zcmX|+u?oUK5JX=s_z%Heqm9L(hBQ`MsUHwEh+r;|yNF+}&TT{v_J*CE+1dAp6$LLE z9%MYJ=?L6u@vND!V8&d3CdPA7|0>pVGxo%hEmKV`HB+!*%t(%b${ZafQLmHcOfOV( zP^}C#<{9NZ?Dx{Szcy{}rS$5xQlwOg_vT$2j!NX@Sh8m)G^BMl9qg9)yCq$a5Ba|J CZ7Mhb literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAttributeValue.xml b/samltest/data/saml1/core/impl/singleAttributeValue.xml new file mode 100644 index 0000000000000000000000000000000000000000..4dff5761177fef868fc410bbd003ccc8a21f4e54 GIT binary patch literal 236 zcmX|+IST?Y5QV>5@INf}UX4Xi7aJ?BJbI5H!a56^toZBIm#j#NJmwwq=KWz#$%_XS z1y4K;fjc$Ef&o)TO!OCGjEm-1vBoX42llKPN;Q+FWJ#Z%5(B54=vWc;8hOsNLY||z zO4uv2+iTLhzb9>NTQml)hyn)U|Y39r6wFcSCAE?s|Oze?%yN literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAttributeValueContents.xml b/samltest/data/saml1/core/impl/singleAttributeValueContents.xml new file mode 100644 index 0000000000000000000000000000000000000000..043d8ab9d82ed00460811637ccdb82bea65ac1ad GIT binary patch literal 316 zcma)%y9&ZU6hu!g_zz2ZUya2Q4K`L<8SQ;6BE$`36Y=ZS$wtJ&Lbll9&fJ-~k0&V^ zcdir|Za69e7fL)c5+)28>o;ONN6k-SJ?F@7$yqXxYAQ{}oIX7{2KLd>vY^(hv~!>l za_qzv!cLxDu9x0^cG}cN8(yHcXR?|cE+DmViG literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAudience.xml b/samltest/data/saml1/core/impl/singleAudience.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f6af4b1a5c9b1438034344dad1b53d872953087 GIT binary patch literal 218 zcmX|*y9&ZU5JgWd_zxkyuf}501RE=@)DI9{M9>MiiTL&E-HBMuW$yF+VL{D{J2wiR zL>?rrG#E=tW{jEY7GjK({%5hq#n}UU){LZ@OH)%ZWT3>v(GvqJI(PK$sGPpbqzQjr mZtB!*`Ze*>C1vZwe}& z+_;kQpyp2CLW5^P&Wtfry_poxQTvlr&)L*HJ64S3n#)sBGGriP;9x|@lFlyDbuCWH z^76Re7n3?Ad+i$C#s*RM#;I*?mG0PzxM8g+HFM?;*1P@o&eh|8w1P?B^Y=gH2f3y= Aga7~l literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml b/samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml new file mode 100644 index 0000000000000000000000000000000000000000..0326f65920208b823cbfd41a97aca2ec9519a506 GIT binary patch literal 264 zcmX|+OA5k35JcZv@D9Pfzm1DQ4I;SGjh_QZ3=)VFa1!zKYE36`lL=kbuc|*^mZZFS zP?GQ>=SiTT!n0z;oC!0%i4;$!`Aw?lZt8_IJH~P?DgXcg literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAuthenticationQuery.xml b/samltest/data/saml1/core/impl/singleAuthenticationQuery.xml new file mode 100644 index 0000000..ae7fcc8 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleAuthenticationQuery.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml b/samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml new file mode 100644 index 0000000..4d6a696 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleAuthenticationStatement.xml b/samltest/data/saml1/core/impl/singleAuthenticationStatement.xml new file mode 100644 index 0000000000000000000000000000000000000000..36765995df86c5eae337b69d7f0660a968c8343d GIT binary patch literal 254 zcmX|+I}XAy5JX>%#2q4fehq~ML}{p?0uF$J1xVmXv4c20FzZOEcD*zEcKrRZrsTtm zCk1ajEs+NefejOu%vh)vQUbN+SE+$pR?nQ+F_mj2Psx@sBM~E)OmtLqB<^`TX|tAM z)%Zts_VV%?J?ToHB#7V!isk5(D`?he!}6IP@)e)^B(f8+;=o>ApW9`36ulj;+F#~< F(m&5{EJOeR literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml b/samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..663cf2db05499c367e6c9531777b1567a07c09da GIT binary patch literal 422 zcmaiwPiw+J6vTh$g5M!{_fH}yF16yNP-srpi#O3=1-nABk$(EN^Ijmwdf45!`{vEe z&d)E;toi1PD;akxY8o!wh^!crGiItYQzvrN`$^r%*}FSFcx5EiT$nX440sY_!@(H? z8(I>dKAkjqRL4%^->R}(C9JV0sdP@F7(<K3e&Tdb?@D{8>M`O67GDa}eW(l6O^| z@8IZ0>~*g?bdUe}Dup-C_E*zRnr@|%+~?!@H#sx(!T;2yxMZOmM_Re>g_5&6^n0PC Qa|&kcrD-{4Ou9t>00)9bSpWb4 literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAuthorityBinding.xml b/samltest/data/saml1/core/impl/singleAuthorityBinding.xml new file mode 100644 index 0000000000000000000000000000000000000000..caf8ac6fc48364d31bdd2b3f32f1545611cf22e5 GIT binary patch literal 244 zcmX|+%?<%U5QM+8#5-)<{aqX;*l=*-ga;5dNY-q!Gb_A2YT9z@PFH``)vq^Gavt0$ z$+%Nc6Sz|0nbBj+fRSn@#dFmBB-L{^bF1UwuAi7`i_lPP1Of#OP#EV0>m6h+P;6 \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml new file mode 100644 index 0000000..8ba5439 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml new file mode 100644 index 0000000000000000000000000000000000000000..6740dddf804d30c9a37a604552eb61bda91a2994 GIT binary patch literal 268 zcmX|+%L>9U6hzNj@E?kMUmF)eErPhxRrLd;1{E}gCKd7H)k&&d<#OlFnaTUZoSY|j zZe%>L)OfB`I2H_;GGd}Plj10~KS_0*lX_s!hM}%zy2)A6rzfK4n23fI4S|b%wR|t_ z!;iievDExeE2Ko#${DkQGTUBGH>P98R*h&*yGoAekGe~lHqAj~L!tB?TTSgROuF`> M*IkSFvvJ$|3ycphBLDyZ literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..57abc3df4e5e93c69e47949f91ddf8259d80328c GIT binary patch literal 348 zcmZ9Iy9&Zk5JXQc_zz<5tFZ`b5X4GBe0+e!pn|!9Np4Wz@8;NxyJIu%xKdRvE&$t5p(W%F1jmp z_tM_~=nD}O&HuEW6jM`OT9#L4)yv5f)l6%37tLvx>%#6$cOf$kvllsHr}Q-|P1RRK p!Ci`8)Gh4Gtn*geQamFknk}Vh?7G3(>}}3XU}kFK^){&f!xx-?JfZ*q literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca6c5f383a1864ccaeaa76cbe9db1f5a25d8476b GIT binary patch literal 304 zcmZ9Hy9&ZU6hu!g_z%I}S7WiLK@cmgq95QRL_s%@-H7<{>g+~SSnXx!&Y8KdH&ap` z+_;i(C#S-3p~Nzy$Cv>ly@?ddQU52YmLjSD8h00000 literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleConditionsAttributes.xml b/samltest/data/saml1/core/impl/singleConditionsAttributes.xml new file mode 100644 index 0000000..059c5b0 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleConditionsAttributes.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleConfirmationMethod.xml b/samltest/data/saml1/core/impl/singleConfirmationMethod.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e419308196ff16521f0a21f1117cb5de15b886e GIT binary patch literal 240 zcmX|+y$ZrW5QM*4@EwA^e~rbV2_jgTN_~K!Q3HB`TE;~El?7rU2$#`<( zO2UJZhL(yN&w>F{Mod%_DV~GoN2#8(se5*;8ER{$os5(|JrP?9BRW<_I?2;$QV=?J zE?(ebyrj$b^0~h^rr+iAn$>c~tD^3WU0NS>kz>n}oQ=Bgwa&I%`{kDxKNypK06p(2 A0ssI2 literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml b/samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..2852083154eced0630dfa04305b3afee317a4757 GIT binary patch literal 312 zcma)%yAFa-5JXRH;y)02Uya2LLX3%(RO$y1#Ydu-1km{P>aZe>jn&=k?3|hVd=ZiG z;L3%7J2@p4X9_$sLM99u>kXuMcG~ZydXA=U*|21wtEp}hV*2z%tjLV$SQzObPpM5t z-Lg~hYEH%r+I%mc>%2|+O)jrpA!pO7(Y>*An`2!5{UHy79CgaJK z3yudRHzH>$0uwq6=`qmnqy!4}4^jh1Q+I4x(ACsPGZ|Cbv_y>Tjp&)nvDT}})hjrO zlN&v8>SmK`5(GK@-<|f~l_#iI$(?c~Js7>Tx)#&3VaAH3s&8Iz)6uT^?MOHDn}kaF E0ljZ3MF0Q* literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleEvidence.xml b/samltest/data/saml1/core/impl/singleEvidence.xml new file mode 100644 index 0000000000000000000000000000000000000000..e68499029cedfb37d278c2256d8811c08b712a79 GIT binary patch literal 228 zcmYk0%?<%U5QM+8#5-)<{p`hIf{g2z)#W?AHmTFvFJ+NoZP_C&w6$|?Glo&aBVo6}7)J9+VzgALi tGr7W_GqpX`Zo0PmPZY^vo>lwai6F3J$(D__Oc&f8oxS_9C*pDD`2ym+CR6|b literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleNameIdentifier.xml b/samltest/data/saml1/core/impl/singleNameIdentifier.xml new file mode 100644 index 0000000000000000000000000000000000000000..b8fea9ee790c5d8cc872d7ed19f4edd6014a3c7a GIT binary patch literal 236 zcmX|+y9&ZU5JgWd_z%I}S7WiL!A20&M*RTMC;^>-8^y0z?`(p_vcufxe7;P{d2{DR z#*2ank&+5yMvpNAM*1@$#!36LP~)1=1ACVA#hQqdGp9>Oj*(+>3~bX>u#(OlYN;=J wo|Cn?CVu#9JoPEmw5z1{HjZ2CFN$NajezfXzJMc>53&OEus3tBn)ZN5MxQ^86#%C${B0V z7|z<>>X=SY={n(~ddE~RnmY9gZJQgLyNb!`vz$aM7%^p{>g6)>=+bkWj%6_C<|(M1 t%*CE5?c0Ybes{xaFBQ*8X)>uAa{KWPmH1b(r99k(kLlF8{{MylxhEE)MF#)? literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleRequest.xml b/samltest/data/saml1/core/impl/singleRequest.xml new file mode 100644 index 0000000..d22410c --- /dev/null +++ b/samltest/data/saml1/core/impl/singleRequest.xml @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleRequestAttributes.xml b/samltest/data/saml1/core/impl/singleRequestAttributes.xml new file mode 100644 index 0000000..3cf7ba5 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleRequestAttributes.xml @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleResponse.xml b/samltest/data/saml1/core/impl/singleResponse.xml new file mode 100644 index 0000000..c406605 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleResponse.xml @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleResponseAttributes.xml b/samltest/data/saml1/core/impl/singleResponseAttributes.xml new file mode 100644 index 0000000..fd48ee8 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleResponseAttributes.xml @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleStatus.xml b/samltest/data/saml1/core/impl/singleStatus.xml new file mode 100644 index 0000000..2b11e30 --- /dev/null +++ b/samltest/data/saml1/core/impl/singleStatus.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleStatusCode.xml b/samltest/data/saml1/core/impl/singleStatusCode.xml new file mode 100644 index 0000000..dd2926e --- /dev/null +++ b/samltest/data/saml1/core/impl/singleStatusCode.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samltest/data/saml1/core/impl/singleStatusMessage.xml b/samltest/data/saml1/core/impl/singleStatusMessage.xml new file mode 100644 index 0000000..f1629ba --- /dev/null +++ b/samltest/data/saml1/core/impl/singleStatusMessage.xml @@ -0,0 +1 @@ + diff --git a/samltest/data/saml1/core/impl/singleSubject.xml b/samltest/data/saml1/core/impl/singleSubject.xml new file mode 100644 index 0000000000000000000000000000000000000000..7391b8b570550eff857e8c573488c594d2018acd GIT binary patch literal 222 zcmX|*y$%6E6otQ9;vF`6e~n^-jYdU<2ViZ4thdGordD_x!#;%qe+sr=j3U z%>&Ps7GuGHDI+Gjg&3pK|18$HB=*3bHAAUp(v&Re(^I17m=Ya3I!@f=t_VuWO(uo= pt71>5Uem9YGxkT`Qc9h0kUyra*s>AIyIfNHv^xA&$F1YMYRq9`JUuZ z3D0ziNy)c?m(u;!A-@&V>sE>#dIj8@dtrMc-;lCk!&+PH>x^C7H@}SV!!S1d07VKa AhyVZp literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml b/samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml new file mode 100644 index 0000000000000000000000000000000000000000..beadd0ba36bd42fe633d06cb9c9306a6658545a7 GIT binary patch literal 250 zcmX|+OA5k35JcZv@D9Pfzm1DQ6GU;PEA;>|#-Qi~@)1w3)^yO-G+i~Xs^1^xB)oWV zC*ny?Ma`8G&w>F{MojcZQaqXVXQ`gT)FTHr4CR{1lMvIVCt^)%M8}?%6F2?NXjmEd zB0?oS)uu~Y+ng$;YvM(4e@f`l>W9~^lr!`Ty0?_v=0^OGwq(avQ`g&>ySA%-S>cv3 F@fZH%E9(FN literal 0 HcmV?d00001 diff --git a/samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml b/samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..f44b980f94bcd48383252133623c71b973841529 GIT binary patch literal 346 zcmbV{y9&ZU6hu!g_zxkyuf`(81W~NCQa>QZD2i?%n}}bp&Tdc;JFC6inLRW2@gyeY z&Xo%RHwr2&CrS(xLPqo%>J6kAa_#q04M(qT*|4A|*I1sEgf1NsEtw}qtZCSB*6*B} zndcrvsHA7wv`KS6XG&?C7!jfm#r0_P!)RB^>H0a{_>{uWwfHV=%8I3?ws+*+)?f9` V3f0nnwQ^S(ep|&1- z6g;T76}pio{0V9DV4-nVIAIvN`vl3rkt?n!yLc`3^)m7Cs z=L=6v`Q?W_Eshi%h-@hdjA?UEm!9sHkU*~fN@!s1=og>N=xFLuGgBrsX-F~h?TQ&6 zR4mzvos*c0p9|YdBXN@IpK}l+yRpo-(jGy*Qq#7N;lWi4e<$gf`ZI4*&FVcfpN^g) z)hTRu+v=5fO|Mi3;ZbEieWe>I + +#include +#include +#include +#include +#include +#include + +using namespace opensaml; +using namespace xmltooling; +using namespace std; + +extern string data_path; + +class SAMLObjectBaseTestCase +{ +protected: + /** Location of file containing a single element with NO optional attributes */ + string singleElementFile; + + /** Location of file containing a single element with all optional attributes */ + string singleElementOptionalAttributesFile; + + /** Location of file containing a single element with child elements */ + string childElementsFile; + + /** The expected result of a marshalled single element with no optional attributes */ + DOMDocument* expectedDOM; + + /** The expected result of a marshalled single element with all optional attributes */ + DOMDocument* expectedOptionalAttributesDOM; + + /** The expected result of a marshalled single element with child elements */ + DOMDocument* expectedChildElementsDOM; + + /** + * Unmarshalls an element file into its SAML XMLObject. + * + * @return the SAML XMLObject from the file + */ + XMLObject* unmarshallElement(string elementFile) { + try { + ParserPool& p=XMLToolingConfig::getConfig().getParser(); + ifstream fs(elementFile.c_str()); + DOMDocument* doc = p.parse(fs); + const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); + return b->buildFromDocument(doc); + } + catch (XMLToolingException& e) { + TS_TRACE(e.what()); + throw; + } + } + + void assertEquals(const char* failMessage, DOMDocument* expectedDOM, XMLObject* xmlObject) { + DOMElement* generatedDOM = xmlObject->marshall(); + TSM_ASSERT(failMessage,generatedDOM->isEqualNode(expectedDOM->getDocumentElement())); + } + + void assertEquals(DOMDocument* expectedDOM, XMLObject* xmlObject) { + assertEquals("Marshalled DOM was not the same as the expected DOM", expectedDOM, xmlObject); + } + +public: + void setUp() { + ParserPool& p=XMLToolingConfig::getConfig().getParser(); + if (!singleElementFile.empty()) { + ifstream fs(singleElementFile.c_str()); + expectedDOM = p.parse(fs); + } + + if (!singleElementOptionalAttributesFile.empty()) { + ifstream fs(singleElementOptionalAttributesFile.c_str()); + expectedOptionalAttributesDOM = p.parse(fs); + } + + if (!childElementsFile.empty()) { + ifstream fs(childElementsFile.c_str()); + expectedChildElementsDOM = p.parse(fs); + } + } + + void tearDown() { + if (expectedDOM) expectedDOM->release(); + if (expectedOptionalAttributesDOM) expectedOptionalAttributesDOM->release(); + if (expectedChildElementsDOM) expectedChildElementsDOM->release(); + } +}; diff --git a/samltest/saml1/core/impl/ActionTest.cpp b/samltest/saml1/core/impl/ActionTest.cpp new file mode 100644 index 0000000..7fc76dc --- /dev/null +++ b/samltest/saml1/core/impl/ActionTest.cpp @@ -0,0 +1,45 @@ +/* Generated file, do not edit */ + +#ifndef CXXTEST_RUNNING +#define CXXTEST_RUNNING +#endif + +#define _CXXTEST_HAVE_STD +#define _CXXTEST_HAVE_EH +#define _CXXTEST_ABORT_TEST_ON_FAIL +#include +#include +#include +#include + +#include "c:\cvs\cpp-opensaml2\samltest\saml1\core\impl\ActionTest.h" + +static ActionTest suite_ActionTest; + +static CxxTest::List Tests_ActionTest = { 0, 0 }; +CxxTest::StaticSuiteDescription suiteDescription_ActionTest( "c:\\cvs\\cpp-opensaml2\\samltest\\saml1\\core\\impl\\ActionTest.h", 22, "ActionTest", suite_ActionTest, Tests_ActionTest ); + +static class TestDescription_ActionTest_testSingleElementUnmarshall : public CxxTest::RealTestDescription { +public: + TestDescription_ActionTest_testSingleElementUnmarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 44, "testSingleElementUnmarshall" ) {} + void runTest() { suite_ActionTest.testSingleElementUnmarshall(); } +} testDescription_ActionTest_testSingleElementUnmarshall; + +static class TestDescription_ActionTest_testSingleElementOptionalAttributesUnmarshall : public CxxTest::RealTestDescription { +public: + TestDescription_ActionTest_testSingleElementOptionalAttributesUnmarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 52, "testSingleElementOptionalAttributesUnmarshall" ) {} + void runTest() { suite_ActionTest.testSingleElementOptionalAttributesUnmarshall(); } +} testDescription_ActionTest_testSingleElementOptionalAttributesUnmarshall; + +static class TestDescription_ActionTest_testSingleElementMarshall : public CxxTest::RealTestDescription { +public: + TestDescription_ActionTest_testSingleElementMarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 59, "testSingleElementMarshall" ) {} + void runTest() { suite_ActionTest.testSingleElementMarshall(); } +} testDescription_ActionTest_testSingleElementMarshall; + +static class TestDescription_ActionTest_testSingleElementOptionalAttributesMarshall : public CxxTest::RealTestDescription { +public: + TestDescription_ActionTest_testSingleElementOptionalAttributesMarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 64, "testSingleElementOptionalAttributesMarshall" ) {} + void runTest() { suite_ActionTest.testSingleElementOptionalAttributesMarshall(); } +} testDescription_ActionTest_testSingleElementOptionalAttributesMarshall; + diff --git a/samltest/saml1/core/impl/ActionTest.h b/samltest/saml1/core/impl/ActionTest.h new file mode 100644 index 0000000..26e4580 --- /dev/null +++ b/samltest/saml1/core/impl/ActionTest.h @@ -0,0 +1,71 @@ +/* + * Copyright 2001-2006 Internet2 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "internal.h" +#include + +using namespace opensaml::saml1; + +class ActionTest : public CxxTest::TestSuite, public SAMLObjectBaseTestCase { + XMLCh* expectedContents; + XMLCh* expectedNamespace; + QName* qname; + +public: + void setUp() { + singleElementFile = data_path + "saml1/core/impl/singleAction.xml"; + singleElementOptionalAttributesFile = data_path + "saml1/core/impl/singleActionAttributes.xml"; + expectedContents = XMLString::transcode("Action Contents"); + expectedNamespace = XMLString::transcode("namespace"); + qname = new QName(SAMLConstants::SAML1_NS, Action::LOCAL_NAME, SAMLConstants::SAML1_PREFIX); + SAMLObjectBaseTestCase::setUp(); + } + + void tearDown() { + delete qname; + XMLString::release(&expectedContents); + XMLString::release(&expectedNamespace); + SAMLObjectBaseTestCase::tearDown(); + } + + void testSingleElementUnmarshall() { + auto_ptr xo(unmarshallElement(singleElementFile)); + Action* action = dynamic_cast(xo.get()); + TS_ASSERT(action!=NULL); + TSM_ASSERT("namespace attribute present", action->getNamespace()==NULL); + TSM_ASSERT("Contents present", action->getValue()==NULL); + } + + void testSingleElementOptionalAttributesUnmarshall() { + auto_ptr xo(unmarshallElement(singleElementOptionalAttributesFile)); + Action* action = dynamic_cast(xo.get()); + TSM_ASSERT_SAME_DATA("namespace attribute ", expectedNamespace, action->getNamespace(), XMLString::stringLen(expectedNamespace)); + TSM_ASSERT_SAME_DATA("Contents ", expectedContents, action->getValue(), XMLString::stringLen(expectedContents)); + } + + void testSingleElementMarshall() { + auto_ptr action(ActionBuilder::buildAction()); + assertEquals(expectedDOM, action.get()); + } + + void testSingleElementOptionalAttributesMarshall() { + auto_ptr action(ActionBuilder::buildAction()); + action->setNamespace(expectedNamespace); + action->setValue(expectedContents); + assertEquals(expectedOptionalAttributesDOM, action.get()); + } + +}; diff --git a/samltest/samltest.cpp b/samltest/samltest.cpp new file mode 100644 index 0000000..faa040e --- /dev/null +++ b/samltest/samltest.cpp @@ -0,0 +1,32 @@ +/* Generated file, do not edit */ + +#ifndef CXXTEST_RUNNING +#define CXXTEST_RUNNING +#endif + +#define _CXXTEST_HAVE_STD +#define _CXXTEST_HAVE_EH +#define _CXXTEST_ABORT_TEST_ON_FAIL +#include +#include +#include +#include +#include + +int main() { + return CxxTest::ErrorPrinter().run(); +} +#include "c:\cvs\cpp-opensaml2\samltest\samltest.h" + +static GlobalTest suite_GlobalTest; + +static CxxTest::List Tests_GlobalTest = { 0, 0 }; +CxxTest::StaticSuiteDescription suiteDescription_GlobalTest( "c:\\cvs\\cpp-opensaml2\\samltest\\samltest.h", 59, "GlobalTest", suite_GlobalTest, Tests_GlobalTest ); + +static class TestDescription_GlobalTest_testGlobal : public CxxTest::RealTestDescription { +public: + TestDescription_GlobalTest_testGlobal() : CxxTest::RealTestDescription( Tests_GlobalTest, suiteDescription_GlobalTest, 62, "testGlobal" ) {} + void runTest() { suite_GlobalTest.testGlobal(); } +} testDescription_GlobalTest_testGlobal; + +#include diff --git a/samltest/samltest.h b/samltest/samltest.h new file mode 100644 index 0000000..4033914 --- /dev/null +++ b/samltest/samltest.h @@ -0,0 +1,64 @@ +/* + * Copyright 2001-2005 Internet2 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "internal.h" + +#include +#include + +//#define SAML_LEAKCHECK + +std::string data_path = "../samltest/data/"; + +class SAMLFixture : public CxxTest::GlobalFixture +{ +public: + bool setUpWorld() { + XMLToolingConfig::getConfig().log_config(); + if (!SAMLConfig::getConfig().init()) + return false; + if (getenv("SAMLTEST_DATA")) + data_path=std::string(getenv("SAMLTEST_DATA")) + "/"; + //std::string catpath=data_path + "catalog.xml"; + //auto_ptr_XMLCh temp(catpath.c_str()); + //return XMLToolingConfig::getConfig().getValidatingParser().loadCatalog(temp.get()); + return true; + } + bool tearDownWorld() { + SAMLConfig::getConfig().term(); +#if defined(_MSC_VER ) && defined(SAML_LEAKCHECK) + _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); + _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT ); + _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); + _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT ); + _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); + _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT ); + _CrtDumpMemoryLeaks(); +#endif + return true; + } + //bool setUp() { printf( "" ); return true; } + //bool tearDown() { printf( "" ); return true; } +}; + +static SAMLFixture globalFixture; + +class GlobalTest : public CxxTest::TestSuite +{ +public: + void testGlobal() { + } +}; diff --git a/samltest/samltest.vcproj b/samltest/samltest.vcproj new file mode 100644 index 0000000..bca3280 --- /dev/null +++ b/samltest/samltest.vcproj @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.1.4