Regex functors, added regex options feature to schema.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 8 May 2007 03:59:38 +0000 (03:59 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 8 May 2007 03:59:38 +0000 (03:59 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2240 cb58f699-b61c-0410-a6fe-9272a202ed29

schemas/shibboleth-2.0-afp-mf-basic.xsd
shibsp/Makefile.am
shibsp/attribute/filtering/MatchFunctor.h
shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp [new file with mode: 0644]
shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp [new file with mode: 0644]
shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp [new file with mode: 0644]
shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp [new file with mode: 0644]
shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp [new file with mode: 0644]
shibsp/attribute/filtering/impl/MatchFunctor.cpp
shibsp/shibsp.vcproj

index 885f6f0..b33a9f3 100644 (file)
                         <documentation>The regular expression values are matched against.</documentation>
                     </annotation>
                 </attribute>
+                <attribute name="options" type="string">
+                    <annotation>
+                        <documentation>The regular expression options to apply.</documentation>
+                    </annotation>
+                </attribute>
             </extension>
         </complexContent>
     </complexType>
index ea038e9..985139d 100644 (file)
@@ -112,6 +112,11 @@ libshibsp_la_SOURCES = \
        attribute/filtering/AttributeScopeStringFunctor.cpp \
        attribute/filtering/AttributeValueStringFunctor.cpp \
        attribute/filtering/AuthenticationMethodStringFunctor.cpp \
+       attribute/filtering/AttributeIssuerRegexFunctor.cpp \
+       attribute/filtering/AttributeRequesterRegexFunctor.cpp \
+       attribute/filtering/AttributeScopeRegexFunctor.cpp \
+       attribute/filtering/AttributeValueRegexFunctor.cpp \
+       attribute/filtering/AuthenticationMethodRegexFunctor.cpp \
        attribute/resolver/impl/ChainingAttributeResolver.cpp \
        attribute/resolver/impl/QueryAttributeResolver.cpp \
        attribute/resolver/impl/XMLAttributeExtractor.cpp \
index 7390b8c..9f55df4 100644 (file)
@@ -76,12 +76,12 @@ namespace shibsp {
     /** Negating MatchFunctor. */
     extern SHIBSP_API xmltooling::QName NotMatchFunctorType;
 
-    /** Matches the requesting entity's name. */
-    extern SHIBSP_API xmltooling::QName AttributeRequesterStringType;
-
     /** Matches the issuing entity's name. */
     extern SHIBSP_API xmltooling::QName AttributeIssuerStringType;
 
+    /** Matches the requesting entity's name. */
+    extern SHIBSP_API xmltooling::QName AttributeRequesterStringType;
+
     /** Matches the principal's authentication method/class or context reference. */
     extern SHIBSP_API xmltooling::QName AuthenticationMethodStringType;
 
@@ -91,6 +91,21 @@ namespace shibsp {
     /** Matches an attribute's "scope". */
     extern SHIBSP_API xmltooling::QName AttributeScopeStringType;
 
+    /** Matches the issuing entity's name. */
+    extern SHIBSP_API xmltooling::QName AttributeIssuerRegexType;
+
+    /** Matches the requesting entity's name. */
+    extern SHIBSP_API xmltooling::QName AttributeRequesterRegexType;
+
+    /** Matches the principal's authentication method/class or context reference. */
+    extern SHIBSP_API xmltooling::QName AuthenticationMethodRegexType;
+
+    /** Matches an attribute's string value. */
+    extern SHIBSP_API xmltooling::QName AttributeValueRegexType;
+
+    /** Matches an attribute's "scope". */
+    extern SHIBSP_API xmltooling::QName AttributeScopeRegexType;
+
     /**
      * Registers MatchFunctor classes into the runtime.
      */
diff --git a/shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp
new file mode 100644 (file)
index 0000000..7c678ab
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ *  Copyright 2001-2007 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.
+ */
+
+/**
+ * AttributeIssuerRegexFunctor.cpp
+ * 
+ * A match function that evaluates to true if the Attribute issuer matches the provided regular\r
+ * expression.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "attribute/filtering/FilteringContext.h"
+#include "attribute/filtering/FilterPolicyContext.h"
+
+#include <xercesc/util/regx/RegularExpression.hpp>
+
+namespace shibsp {
+
+    static const XMLCh options[] =  UNICODE_LITERAL_7(o,p,t,i,o,n,s);
+    static const XMLCh regex[] =    UNICODE_LITERAL_5(r,e,g,e,x);
+    
+    /**
+     * A match function that evaluates to true if the Attribute issuer matches the provided regular\r
+     * expression.
+     */
+    class SHIBSP_DLLLOCAL AttributeIssuerRegexFunctor : public MatchFunctor
+    {
+        RegularExpression* m_regex;
+    public:
+        AttributeIssuerRegexFunctor(const DOMElement* e) {
+            const XMLCh* r = e ? e->getAttributeNS(NULL,regex) : NULL;
+            if (!r || !*r)
+                throw ConfigurationException("AttributeIssuerRegex MatchFunctor requires non-empty regex attribute.");
+            try {
+                m_regex = new RegularExpression(r, e->getAttributeNS(NULL,options));
+            }
+            catch (XMLException& ex) {\r
+                xmltooling::auto_ptr_char temp(ex.getMessage());\r
+                throw ConfigurationException(temp.get());\r
+            }\r
+        }
+
+        virtual ~AttributeIssuerRegexFunctor() {
+            delete m_regex;
+        }
+
+        bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
+            return m_regex->matches(filterContext.getAttributeIssuer());
+        }
+
+        bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
+            return m_regex->matches(filterContext.getAttributeIssuer());
+        }
+    };
+
+    MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+    {
+        return new AttributeIssuerRegexFunctor(p.second);
+    }
+
+};
diff --git a/shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp
new file mode 100644 (file)
index 0000000..d4d1bd0
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ *  Copyright 2001-2007 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.
+ */
+
+/**
+ * AttributeRequesterRegexFunctor.cpp
+ * 
+ * A match function that evaluates to true if the Attribute requester matches the provided regular\r
+ * expression.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "attribute/filtering/FilteringContext.h"
+#include "attribute/filtering/FilterPolicyContext.h"
+
+#include <xercesc/util/regx/RegularExpression.hpp>
+
+namespace shibsp {
+
+    static const XMLCh options[] =  UNICODE_LITERAL_7(o,p,t,i,o,n,s);
+    static const XMLCh regex[] =    UNICODE_LITERAL_5(r,e,g,e,x);
+    
+    /**
+     * A match function that evaluates to true if the Attribute requester matches the provided regular\r
+     * expression.
+     */
+    class SHIBSP_DLLLOCAL AttributeRequesterRegexFunctor : public MatchFunctor
+    {
+        RegularExpression* m_regex;
+    public:
+        AttributeRequesterRegexFunctor(const DOMElement* e) {
+            const XMLCh* r = e ? e->getAttributeNS(NULL,regex) : NULL;
+            if (!r || !*r)
+                throw ConfigurationException("AttributeRequesterRegex MatchFunctor requires non-empty regex attribute.");
+            try {
+                m_regex = new RegularExpression(r, e->getAttributeNS(NULL,options));
+            }
+            catch (XMLException& ex) {\r
+                xmltooling::auto_ptr_char temp(ex.getMessage());\r
+                throw ConfigurationException(temp.get());\r
+            }\r
+        }
+
+        virtual ~AttributeRequesterRegexFunctor() {
+            delete m_regex;
+        }
+
+        bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
+            return m_regex->matches(filterContext.getAttributeRequester());
+        }
+
+        bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
+            return m_regex->matches(filterContext.getAttributeRequester());
+        }
+    };
+
+    MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+    {
+        return new AttributeRequesterRegexFunctor(p.second);
+    }
+
+};
diff --git a/shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp
new file mode 100644 (file)
index 0000000..d53449a
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ *  Copyright 2001-2007 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.
+ */
+
+/**
+ * AttributeScopeRegexFunctor.cpp
+ * 
+ * A match function that evaluates an attribute value's scope against the provided regular expression.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "attribute/Attribute.h"
+#include "attribute/filtering/FilteringContext.h"
+#include "attribute/filtering/FilterPolicyContext.h"
+
+#include <xercesc/util/regx/RegularExpression.hpp>
+
+using namespace shibsp;
+using namespace std;
+
+namespace shibsp {
+
+    static const XMLCh attributeID[] =  UNICODE_LITERAL_11(a,t,t,r,i,b,u,t,e,I,D);
+    static const XMLCh options[] =  UNICODE_LITERAL_7(o,p,t,i,o,n,s);
+    static const XMLCh regex[] =    UNICODE_LITERAL_5(r,e,g,e,x);
+
+    /**
+     * A match function that evaluates an attribute value's scope against the provided regular expression.
+     */
+    class SHIBSP_DLLLOCAL AttributeScopeRegexFunctor : public MatchFunctor
+    {
+        xmltooling::auto_ptr_char m_attributeID;
+        RegularExpression* m_regex;
+
+        bool hasScope(const FilteringContext& filterContext) const;
+        bool matches(const Attribute& attribute, size_t index) const;
+
+    public:
+        AttributeScopeRegexFunctor(const DOMElement* e)
+                : m_attributeID(e ? e->getAttributeNS(NULL,attributeID) : NULL) {
+            const XMLCh* r = e ? e->getAttributeNS(NULL,regex) : NULL;
+            if (!r || !*r)
+                throw ConfigurationException("AttributeScopeRegex MatchFunctor requires non-empty regex attribute.");
+            try {
+                m_regex = new RegularExpression(r, e->getAttributeNS(NULL,options));
+            }
+            catch (XMLException& ex) {\r
+                xmltooling::auto_ptr_char temp(ex.getMessage());\r
+                throw ConfigurationException(temp.get());\r
+            }\r
+        }
+
+        bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
+            if (!m_attributeID.get() || !*m_attributeID.get())
+                throw AttributeFilteringException("No attributeID specified.");
+            return hasScope(filterContext);
+        }
+
+        bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
+            if (!XMLString::equals(m_attributeID.get(), attribute.getId()))
+                return hasScope(filterContext);
+            return matches(attribute, index);
+        }
+    };
+
+    MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+    {
+        return new AttributeScopeRegexFunctor(p.second);
+    }
+
+};
+
+bool AttributeScopeRegexFunctor::hasScope(const FilteringContext& filterContext) const
+{
+    size_t count;
+    pair<multimap<string,Attribute*>::const_iterator,multimap<string,Attribute*>::const_iterator> attrs =
+        filterContext.getAttributes().equal_range(m_attributeID.get());
+    for (; attrs.first != attrs.second; ++attrs.first) {
+        count = attrs.first->second->valueCount();
+        for (size_t index = 0; index < count; ++index) {
+            if (matches(*(attrs.first->second), index))
+                return true;
+        }
+    }
+    return false;
+}
+
+bool AttributeScopeRegexFunctor::matches(const Attribute& attribute, size_t index) const
+{
+    const char* val = attribute.getScope(index);
+    if (!val)
+        return false;
+    XMLCh* temp = xmltooling::fromUTF8(val);
+    bool ret = m_regex->matches(temp);
+    delete[] temp;
+    return ret;
+}
diff --git a/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp
new file mode 100644 (file)
index 0000000..b4a899e
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ *  Copyright 2001-2007 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.
+ */
+
+/**
+ * AttributeValueRegexFunctor.cpp
+ * 
+ * A match function that evaluates an attribute's value against the provided regular expression.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "attribute/Attribute.h"
+#include "attribute/filtering/FilteringContext.h"
+#include "attribute/filtering/FilterPolicyContext.h"
+
+#include <xercesc/util/regx/RegularExpression.hpp>
+
+using namespace shibsp;
+using namespace std;
+
+namespace shibsp {
+
+    static const XMLCh attributeID[] =  UNICODE_LITERAL_11(a,t,t,r,i,b,u,t,e,I,D);
+    static const XMLCh options[] =  UNICODE_LITERAL_7(o,p,t,i,o,n,s);
+    static const XMLCh regex[] =    UNICODE_LITERAL_5(r,e,g,e,x);
+
+    /**
+     * A match function that evaluates an attribute's value against the provided regular expression.
+     */
+    class SHIBSP_DLLLOCAL AttributeValueRegexFunctor : public MatchFunctor
+    {
+        xmltooling::auto_ptr_char m_attributeID;
+        RegularExpression* m_regex;
+
+        bool hasValue(const FilteringContext& filterContext) const;
+        bool matches(const Attribute& attribute, size_t index) const;
+
+    public:
+        AttributeValueRegexFunctor(const DOMElement* e)
+                : m_attributeID(e ? e->getAttributeNS(NULL,attributeID) : NULL) {
+            const XMLCh* r = e ? e->getAttributeNS(NULL,regex) : NULL;
+            if (!r || !*r)
+                throw ConfigurationException("AttributeValueRegex MatchFunctor requires non-empty regex attribute.");
+            try {
+                m_regex = new RegularExpression(r, e->getAttributeNS(NULL,options));
+            }
+            catch (XMLException& ex) {\r
+                xmltooling::auto_ptr_char temp(ex.getMessage());\r
+                throw ConfigurationException(temp.get());\r
+            }\r
+        }
+
+        bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
+            if (!m_attributeID.get() || !*m_attributeID.get())
+                throw AttributeFilteringException("No attributeID specified.");
+            return hasValue(filterContext);
+        }
+
+        bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
+            if (!XMLString::equals(m_attributeID.get(), attribute.getId()))
+                return hasValue(filterContext);
+            return matches(attribute, index);
+        }
+    };
+
+    MatchFunctor* SHIBSP_DLLLOCAL AttributeValueRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+    {
+        return new AttributeValueRegexFunctor(p.second);
+    }
+
+};
+
+bool AttributeValueRegexFunctor::hasValue(const FilteringContext& filterContext) const
+{
+    size_t count;
+    pair<multimap<string,Attribute*>::const_iterator,multimap<string,Attribute*>::const_iterator> attrs =
+        filterContext.getAttributes().equal_range(m_attributeID.get());
+    for (; attrs.first != attrs.second; ++attrs.first) {
+        count = attrs.first->second->valueCount();
+        for (size_t index = 0; index < count; ++index) {
+            if (matches(*(attrs.first->second), index))
+                return true;
+        }
+    }
+    return false;
+}
+
+bool AttributeValueRegexFunctor::matches(const Attribute& attribute, size_t index) const
+{
+    const char* val = attribute.getString(index);
+    if (!val)
+        return false;
+    XMLCh* temp = xmltooling::fromUTF8(val);
+    bool ret = m_regex->matches(temp);
+    delete[] temp;
+    return ret;
+}
diff --git a/shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp
new file mode 100644 (file)
index 0000000..9646690
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ *  Copyright 2001-2007 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.
+ */
+
+/**
+ * AuthenticationMethodRegexFunctor.cpp
+ * 
+ * A match function that evaluates to true if the user's authentication method matches the provided regular\r
+ * expression.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "attribute/filtering/FilteringContext.h"
+#include "attribute/filtering/FilterPolicyContext.h"
+
+#include <xercesc/util/regx/RegularExpression.hpp>
+
+namespace shibsp {
+
+    static const XMLCh options[] =  UNICODE_LITERAL_7(o,p,t,i,o,n,s);
+    static const XMLCh regex[] =    UNICODE_LITERAL_5(r,e,g,e,x);
+    
+    /**
+     * A match function that evaluates to true if the user's authentication method matches the provided regular\r
+     * expression.
+     */
+    class SHIBSP_DLLLOCAL AuthenticationMethodRegexFunctor : public MatchFunctor
+    {
+        RegularExpression* m_regex;
+    public:
+        AuthenticationMethodRegexFunctor(const DOMElement* e) {
+            const XMLCh* r = e ? e->getAttributeNS(NULL,regex) : NULL;
+            if (!r || !*r)
+                throw ConfigurationException("AuthenticationMethodRegex MatchFunctor requires non-empty regex attribute.");
+            try {
+                m_regex = new RegularExpression(r, e->getAttributeNS(NULL,options));
+            }
+            catch (XMLException& ex) {\r
+                xmltooling::auto_ptr_char temp(ex.getMessage());\r
+                throw ConfigurationException(temp.get());\r
+            }\r
+        }
+
+        virtual ~AuthenticationMethodRegexFunctor() {
+            delete m_regex;
+        }
+
+        bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
+            return (m_regex->matches(filterContext.getAuthnContextClassRef()) || m_regex->matches(filterContext.getAuthnContextDeclRef()));
+        }
+
+        bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
+            return (m_regex->matches(filterContext.getAuthnContextClassRef()) || m_regex->matches(filterContext.getAuthnContextDeclRef()));
+        }
+    };
+
+    MatchFunctor* SHIBSP_DLLLOCAL AuthenticationMethodRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+    {
+        return new AuthenticationMethodRegexFunctor(p.second);
+    }
+
+};
index 428668a..1eabf5d 100644 (file)
@@ -44,32 +44,47 @@ namespace shibsp {
     DECL_FACTORY(AndMatchFunctor);
     DECL_FACTORY(OrMatchFunctor);
     DECL_FACTORY(NotMatchFunctor);
-    DECL_FACTORY(AttributeRequesterString);
     DECL_FACTORY(AttributeIssuerString);
+    DECL_FACTORY(AttributeRequesterString);
     DECL_FACTORY(AuthenticationMethodString);
     DECL_FACTORY(AttributeValueString);
     DECL_FACTORY(AttributeScopeString);
+    DECL_FACTORY(AttributeIssuerRegex);
+    DECL_FACTORY(AttributeRequesterRegex);
+    DECL_FACTORY(AuthenticationMethodRegex);
+    DECL_FACTORY(AttributeValueRegex);
+    DECL_FACTORY(AttributeScopeRegex);
 
     static const XMLCh ANY[] =                          UNICODE_LITERAL_3(A,N,Y);
     static const XMLCh AND[] =                          UNICODE_LITERAL_3(A,N,D);
     static const XMLCh OR[] =                           UNICODE_LITERAL_2(O,R);
     static const XMLCh NOT[] =                          UNICODE_LITERAL_3(N,O,T);
-    static const XMLCh AttributeRequesterString[] =     UNICODE_LITERAL_24(A,t,t,r,i,b,u,t,e,R,e,q,u,e,s,t,e,r,S,t,r,i,n,g);
     static const XMLCh AttributeIssuerString[] =        UNICODE_LITERAL_21(A,t,t,r,i,b,u,t,e,I,s,s,u,e,r,S,t,r,i,n,g);
+    static const XMLCh AttributeRequesterString[] =     UNICODE_LITERAL_24(A,t,t,r,i,b,u,t,e,R,e,q,u,e,s,t,e,r,S,t,r,i,n,g);
     static const XMLCh AuthenticationMethodString[] =   UNICODE_LITERAL_26(A,u,t,h,e,n,t,i,c,a,t,i,o,n,M,e,t,h,o,d,S,t,r,i,n,g);
     static const XMLCh AttributeValueString[] =         UNICODE_LITERAL_20(A,t,t,r,i,b,u,t,e,V,a,l,u,e,S,t,r,i,n,g);
     static const XMLCh AttributeScopeString[] =         UNICODE_LITERAL_20(A,t,t,r,i,b,u,t,e,S,c,o,p,e,S,t,r,i,n,g);
+    static const XMLCh AttributeIssuerRegex[] =         UNICODE_LITERAL_20(A,t,t,r,i,b,u,t,e,I,s,s,u,e,r,R,e,g,e,x);
+    static const XMLCh AttributeRequesterRegex[] =      UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,R,e,q,u,e,s,t,e,r,R,e,g,e,x);
+    static const XMLCh AuthenticationMethodRegex[] =    UNICODE_LITERAL_25(A,u,t,h,e,n,t,i,c,a,t,i,o,n,M,e,t,h,o,d,R,e,g,e,x);
+    static const XMLCh AttributeValueRegex[] =          UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,V,a,l,u,e,R,e,g,e,x);
+    static const XMLCh AttributeScopeRegex[] =          UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,S,c,o,p,e,R,e,g,e,x);
 };
 
 DECL_BASIC_QNAME(AnyMatchFunctor, ANY);
 DECL_BASIC_QNAME(AndMatchFunctor, AND);
 DECL_BASIC_QNAME(OrMatchFunctor, OR);
 DECL_BASIC_QNAME(NotMatchFunctor, NOT);
-DECL_BASIC_QNAME(AttributeRequesterString, AttributeRequesterString);
 DECL_BASIC_QNAME(AttributeIssuerString, AttributeIssuerString);
+DECL_BASIC_QNAME(AttributeRequesterString, AttributeRequesterString);
 DECL_BASIC_QNAME(AuthenticationMethodString, AuthenticationMethodString);
 DECL_BASIC_QNAME(AttributeValueString, AttributeValueString);
 DECL_BASIC_QNAME(AttributeScopeString, AttributeScopeString);
+DECL_BASIC_QNAME(AttributeIssuerRegex, AttributeIssuerRegex);
+DECL_BASIC_QNAME(AttributeRequesterRegex, AttributeRequesterRegex);
+DECL_BASIC_QNAME(AuthenticationMethodRegex, AuthenticationMethodRegex);
+DECL_BASIC_QNAME(AttributeValueRegex, AttributeValueRegex);
+DECL_BASIC_QNAME(AttributeScopeRegex, AttributeScopeRegex);
 
 void SHIBSP_API shibsp::registerMatchFunctors()
 {
@@ -79,9 +94,14 @@ void SHIBSP_API shibsp::registerMatchFunctors()
     REGISTER_FACTORY(AndMatchFunctor);
     REGISTER_FACTORY(OrMatchFunctor);
     REGISTER_FACTORY(NotMatchFunctor);
-    REGISTER_FACTORY(AttributeRequesterString);
     REGISTER_FACTORY(AttributeIssuerString);
+    REGISTER_FACTORY(AttributeRequesterString);
     REGISTER_FACTORY(AuthenticationMethodString);
     REGISTER_FACTORY(AttributeValueString);
     REGISTER_FACTORY(AttributeScopeString);
+    REGISTER_FACTORY(AttributeIssuerRegex);
+    REGISTER_FACTORY(AttributeRequesterRegex);
+    REGISTER_FACTORY(AuthenticationMethodRegex);
+    REGISTER_FACTORY(AttributeValueRegex);
+    REGISTER_FACTORY(AttributeScopeRegex);
 }
index a269849..5b25b19 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\attribute\filtering\impl\AttributeIssuerRegexFunctor.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\attribute\filtering\impl\AttributeIssuerStringFunctor.cpp"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\attribute\filtering\impl\AttributeRequesterRegexFunctor.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\attribute\filtering\impl\AttributeRequesterStringFunctor.cpp"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\attribute\filtering\impl\AttributeScopeRegexFunctor.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\attribute\filtering\impl\AttributeScopeStringFunctor.cpp"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\attribute\filtering\impl\AttributeValueRegexFunctor.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\attribute\filtering\impl\AttributeValueStringFunctor.cpp"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\attribute\filtering\impl\AuthenticationMethodRegexFunctor.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\attribute\filtering\impl\AuthenticationMethodStringFunctor.cpp"\r
                                >\r
                        </File>\r