[cpp-sp] branch main updated: Remove SecurityPolicy code.

Scott Cantor cantor.2 at osu.edu
Wed Oct 30 21:34:55 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=b73fc8ccd18a6aa488672770ea8924582006c064

The following commit(s) were added to refs/heads/main by this push:
     new b73fc8cc Remove SecurityPolicy code.
b73fc8cc is described below

commit b73fc8ccd18a6aa488672770ea8924582006c064
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Oct 30 17:34:51 2024 -0400

    Remove SecurityPolicy code.
---
 shibsp/Makefile.am                       |   6 -
 shibsp/security/SecurityPolicy.cpp       |  70 ------------
 shibsp/security/SecurityPolicy.h         |  76 -------------
 shibsp/security/SecurityPolicyProvider.h | 185 -------------------------------
 4 files changed, 337 deletions(-)

diff --git a/shibsp/Makefile.am b/shibsp/Makefile.am
index 5e6ac4df..b7bc2def 100644
--- a/shibsp/Makefile.am
+++ b/shibsp/Makefile.am
@@ -14,8 +14,6 @@ liteincludedir = $(includedir)/shibsp/lite
 
 remincludedir = $(includedir)/shibsp/remoting
 
-secincludedir = $(includedir)/shibsp/security
-
 utilincludedir = $(includedir)/shibsp/util
 
 nodist_libshibspinclude_HEADERS = \
@@ -65,10 +63,6 @@ reminclude_HEADERS = \
 	remoting/ddf.h \
 	remoting/ListenerService.h
 	
-secinclude_HEADERS = \
-	security/SecurityPolicy.h \
-	security/SecurityPolicyProvider.h
-
 utilinclude_HEADERS = \
 	util/CGIParser.h \
 	util/DOMPropertySet.h \
diff --git a/shibsp/security/SecurityPolicy.cpp b/shibsp/security/SecurityPolicy.cpp
deleted file mode 100644
index 41c1dbb6..00000000
--- a/shibsp/security/SecurityPolicy.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the University Corporation for Advanced Internet
- * Development, Inc. (UCAID) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for
- * additional information regarding copyright ownership.
- *
- * UCAID licenses this file to you 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.
- */
-
-/**
- * SecurityPolicy.cpp
- *
- * SP-specific SecurityPolicy subclass.
- */
-
-#include "internal.h"
-#include "Application.h"
-#include "ServiceProvider.h"
-#include "metadata/MetadataProviderCriteria.h"
-#include "security/SecurityPolicy.h"
-#include "security/SecurityPolicyProvider.h"
-
-using namespace shibsp;
-using namespace opensaml::saml2;
-using namespace std;
-
-SecurityPolicy::SecurityPolicy(
-    const Application& application, const xmltooling::QName* role, bool validate, const char* policyId, const char* profile
-    ) : opensaml::SecurityPolicy(application.getMetadataProvider(), role, application.getTrustEngine(), validate, profile),
-        m_application(application) {
-
-    const vector<const opensaml::SecurityPolicyRule*>& rules =
-        application.getServiceProvider().getSecurityPolicyProvider()->getPolicyRules(policyId ? policyId : application.getString("policyId").second);
-    getRules().assign(rules.begin(), rules.end());
-
-    // Populate audiences.
-    if (application.getAudiences()) {
-        for (vector<const XMLCh*>::const_iterator a = application.getAudiences()->begin(); a != application.getAudiences()->end(); ++a)
-            getAudiences().push_back(*a);
-    }
-}
-
-SecurityPolicy::~SecurityPolicy()
-{
-}
-
-opensaml::saml2md::MetadataProvider::Criteria& SecurityPolicy::getMetadataProviderCriteria() const
-{
-    if (!m_metadataCriteria)
-        m_metadataCriteria=new MetadataProviderCriteria(m_application);
-    else
-        m_metadataCriteria->reset();
-    return *m_metadataCriteria;
-}
-
-const Application& SecurityPolicy::getApplication() const
-{
-    return m_application;
-}
diff --git a/shibsp/security/SecurityPolicy.h b/shibsp/security/SecurityPolicy.h
deleted file mode 100644
index fac73f51..00000000
--- a/shibsp/security/SecurityPolicy.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Licensed to the University Corporation for Advanced Internet
- * Development, Inc. (UCAID) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for
- * additional information regarding copyright ownership.
- *
- * UCAID licenses this file to you 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.
- */
-
-/**
- * @file shibsp/security/SecurityPolicy.h
- *
- * SP-specific SecurityPolicy subclass.
- */
-
-#ifndef __shibsp_secpol_h__
-#define __shibsp_secpol_h__
-
-#include <shibsp/base.h>
-#include <saml/saml2/profile/SAML2AssertionPolicy.h>
-
-namespace shibsp {
-
-    class SHIBSP_API Application;
-
-    /**
-     * SP-specific SecurityPolicy subclass.
-     */
-    class SHIBSP_API SecurityPolicy : public opensaml::saml2::SAML2AssertionPolicy
-    {
-    public:
-        /**
-         * Constructor for policy.
-         *
-         * @param application       an Application instance
-         * @param role              identifies the role (generally IdP or SP) of the policy peer
-         * @param validate          true iff XML parsing should be done with validation
-         * @param policyId          identifies policy rules to auto-attach, defaults to the application's set
-         * @param profile           identifies the profile of the transaction being performed
-         */
-        SecurityPolicy(
-            const Application& application,
-            const xmltooling::QName* role=nullptr,
-            bool validate=true,
-            const char* policyId=nullptr,
-            const char* profile=nullptr);
-
-        virtual ~SecurityPolicy();
-
-        opensaml::saml2md::MetadataProvider::Criteria& getMetadataProviderCriteria() const;
-
-        /**
-         * Returns the Application associated with the policy.
-         *
-         * @return the associated Application
-         */
-        const Application& getApplication() const;
-
-    private:
-        const Application& m_application;
-    };
-
-};
-
-#endif /* __shibsp_secpol_h__ */
diff --git a/shibsp/security/SecurityPolicyProvider.h b/shibsp/security/SecurityPolicyProvider.h
deleted file mode 100644
index f99f60af..00000000
--- a/shibsp/security/SecurityPolicyProvider.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * Licensed to the University Corporation for Advanced Internet
- * Development, Inc. (UCAID) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for
- * additional information regarding copyright ownership.
- *
- * UCAID licenses this file to you 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.
- */
-
-/**
- * @file shibsp/security/SecurityPolicyProvider.h
- * 
- * Interface to a source of security policy settings and rules.
- */
-
-#ifndef __shibsp_policyfactory_h__
-#define __shibsp_policyfactory_h__
-
-#ifndef SHIBSP_LITE
-
-#include <shibsp/base.h>
-
-#include <vector>
-#include <xmltooling/Lockable.h>
-#include <xmltooling/unicode.h>
-
-namespace xmltooling {
-    class XMLTOOL_API QName;
-};
-
-namespace opensaml {
-    class SAML_API SecurityPolicyRule;
-};
-
-namespace shibsp {
-
-    class SHIBSP_API Application;
-    class SHIBSP_API PropertySet;
-    class SHIBSP_API SecurityPolicy;
-
-    /**
-     * Interface to a source of security policy settings and rules.
-     */
-	class SHIBSP_API SecurityPolicyProvider : public virtual xmltooling::Lockable
-    {
-        MAKE_NONCOPYABLE(SecurityPolicyProvider);
-    protected:
-        SecurityPolicyProvider();
-
-        /**
-         * @Deprecated
-         *
-         * Default algorithms to block in the current release.
-         */
-        std::vector<xmltooling::xstring> m_defaultBlacklist;
-
-    public:
-        virtual ~SecurityPolicyProvider();
-        
-        /**
-		 * Returns the security policy settings for an identified policy.
-         *
-		 * @param id    identifies the policy to return, or nullptr for default
-         * @return a PropertySet
-		 */
-        virtual const PropertySet* getPolicySettings(const char* id=nullptr) const=0;
-
-        /**
-		 * Returns the security policy rules for an identified policy.
-         *
-		 * @param id    identifies the policy to return, or nullptr for default
-         * @return an array of policy rules
-		 */
-        virtual const std::vector<const opensaml::SecurityPolicyRule*>& getPolicyRules(const char* id=nullptr) const=0;
-
-       /**
-        * Returns a default/implicit set of XML Signature/Encryption algorithm identifiers to block.
-        *
-        * @return  an array of algorithm URIs to block
-        */
-        virtual const std::vector<xmltooling::xstring>& getDefaultExcludedAlgorithms() const;
-
-       /**
-        * Returns a set of XML Signature/Encryption algorithm identifiers to block.
-        *
-        * @return  an array of algorithm URIs to block
-        */
-        virtual const std::vector<xmltooling::xstring>& getExcludedAlgorithms() const;
-
-       /**
-        * Returns a set of XML Signature/Encryption algorithm identifiers to permit.
-        *
-        * @return  an array of algorithm URIs to permit
-        */
-        virtual const std::vector<xmltooling::xstring>& getIncludedAlgorithms() const;
-
-       /**
-        * @Deprecated
-        *
-        * Returns a default/implicit set of XML Signature/Encryption algorithm identifiers to block.
-        *
-        * @return  an array of algorithm URIs to block
-        */
-        virtual const std::vector<xmltooling::xstring>& getDefaultAlgorithmBlacklist() const;
-
-       /**
-        * @Deprecated
-        *
-        * Returns a set of XML Signature/Encryption algorithm identifiers to block.
-        *
-        * @return  an array of algorithm URIs to block
-        */
-        virtual const std::vector<xmltooling::xstring>& getAlgorithmBlacklist() const;
-
-        /**
-         * @Deprecated
-         *
-         * Returns a set of XML Signature/Encryption algorithm identifiers to permit.
-         *
-         * @return  an array of algorithm URIs to permit
-         */
-        virtual const std::vector<xmltooling::xstring>& getAlgorithmWhitelist() const;
-
-        /**
-         * @Deprecated
-         *
-         * Returns a SecurityPolicy applicable to an application and/or policy identifier.
-         *
-         * <p>The caller <strong>MUST</strong> lock the application's MetadataProvider for the life
-         * of the returned object.</p>
-         *
-         * @param application   reference to application applying policy
-         * @param role          identifies the role (generally IdP or SP) of the policy peer
-         * @param policyId      identifies policy, defaults to the application's default
-         * @param profle
-         * @return  a new policy instance, which the caller is responsible for freeing
-         */
-        virtual SecurityPolicy* createSecurityPolicy(
-            const Application& application, const xmltooling::QName* role, const char* policyId=nullptr
-            ) const;
-
-        /**
-        * Returns a SecurityPolicy applicable to an application and/or policy identifier.
-        *
-        * <p>The caller <strong>MUST</strong> lock the application's MetadataProvider for the life
-        * of the returned object.</p>
-        *
-        * @param profile       profile identifier for the transaction
-        * @param application   reference to application applying policy
-        * @param role          identifies the role (generally IdP or SP) of the policy peer
-        * @param policyId      identifies policy, defaults to the application's default
-        * @param profle
-        * @return  a new policy instance, which the caller is responsible for freeing
-        */
-        virtual SecurityPolicy* createSecurityPolicy(
-            const char* profile,
-            const Application& application,
-            const xmltooling::QName* role,
-            const char* policyId=nullptr
-        ) const;
-    };
-
-    /**
-     * Registers SecurityPolicyProvider classes into the runtime.
-     */
-    void SHIBSP_API registerSecurityPolicyProviders();
-
-    /** SecurityPolicyProvider based on an XML configuration format. */
-    #define XML_SECURITYPOLICY_PROVIDER "XML"
-};
-
-#endif
-
-#endif /* __shibsp_policyfactory_h__ */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list