[cpp-sp] branch main updated: Move SessionCache sources into subdir.
Scott Cantor
cantor.2 at osu.edu
Tue Jan 7 20:06:20 UTC 2025
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=d2b150bf8996327e1b2fda01863cb90b698ed60a
The following commit(s) were added to refs/heads/main by this push:
new d2b150bf Move SessionCache sources into subdir.
d2b150bf is described below
commit d2b150bf8996327e1b2fda01863cb90b698ed60a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 7 15:06:14 2025 -0500
Move SessionCache sources into subdir.
---
apache/mod_shib_24.cpp | 2 +-
shibsp/AbstractSPRequest.cpp | 2 +-
shibsp/Agent.cpp | 2 +-
shibsp/Makefile.am | 13 +++--
shibsp/handler/impl/AdminLogoutInitiator.cpp | 2 +-
shibsp/handler/impl/AssertionLookup.cpp | 2 +-
shibsp/handler/impl/AttributeCheckerHandler.cpp | 2 +-
shibsp/handler/impl/LocalLogoutInitiator.cpp | 3 +-
shibsp/handler/impl/LogoutHandler.cpp | 2 +-
shibsp/handler/impl/LogoutInitiator.cpp | 3 --
shibsp/handler/impl/SAML2LogoutInitiator.cpp | 2 +-
shibsp/handler/impl/SessionHandler.cpp | 2 +-
shibsp/impl/AgentConfig.cpp | 2 +-
shibsp/impl/ChainingAccessControl.cpp | 3 +-
shibsp/impl/DefaultAgent.cpp | 2 +-
shibsp/impl/XMLAccessControl.cpp | 2 +-
shibsp/{ => session}/SessionCache.h | 0
shibsp/session/impl/AbstractSessionCache.cpp | 57 ++++++++++++++++++++++
.../impl/StorageServiceSessionCache.cpp | 0
.../impl/StorageServiceSessionCache.h | 0
shibsp/{ => session}/impl/StoredSession.cpp | 0
shibsp/{ => session}/impl/StoredSession.h | 0
tests/impl/XMLAccessControlTests.cpp | 2 +-
tests/impl/XMLRequestMapperTests.cpp | 2 +-
24 files changed, 80 insertions(+), 27 deletions(-)
diff --git a/apache/mod_shib_24.cpp b/apache/mod_shib_24.cpp
index 9553dd9d..ee79310f 100644
--- a/apache/mod_shib_24.cpp
+++ b/apache/mod_shib_24.cpp
@@ -42,8 +42,8 @@
#include <shibsp/Agent.h>
#include <shibsp/AgentConfig.h>
#include <shibsp/RequestMapper.h>
-#include <shibsp/SessionCache.h>
#include <shibsp/attribute/Attribute.h>
+#include <shibsp/session/SessionCache.h>
#include <shibsp/util/Lockable.h>
#ifdef WIN32
diff --git a/shibsp/AbstractSPRequest.cpp b/shibsp/AbstractSPRequest.cpp
index 1cff7c0a..eed6521b 100644
--- a/shibsp/AbstractSPRequest.cpp
+++ b/shibsp/AbstractSPRequest.cpp
@@ -23,8 +23,8 @@
#include "AbstractSPRequest.h"
#include "Agent.h"
#include "AgentConfig.h"
-#include "SessionCache.h"
#include "logging/Category.h"
+#include "session/SessionCache.h"
#include "util/CGIParser.h"
#include <boost/lexical_cast.hpp>
diff --git a/shibsp/Agent.cpp b/shibsp/Agent.cpp
index 8a42e2c1..68c2c8b3 100644
--- a/shibsp/Agent.cpp
+++ b/shibsp/Agent.cpp
@@ -23,11 +23,11 @@
#include "Agent.h"
#include "AgentConfig.h"
#include "AccessControl.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "attribute/Attribute.h"
#include "handler/SessionInitiator.h"
#include "logging/Category.h"
+#include "session/SessionCache.h"
#include "util/Date.h"
#include "util/PathResolver.h"
#include "util/URLEncoder.h"
diff --git a/shibsp/Makefile.am b/shibsp/Makefile.am
index f1ee5868..90934234 100644
--- a/shibsp/Makefile.am
+++ b/shibsp/Makefile.am
@@ -14,6 +14,8 @@ logincludedir = $(includedir)/shibsp/logging
remincludedir = $(includedir)/shibsp/remoting
+sessionincludedir = $(includedir)/shibsp/session
+
utilincludedir = $(includedir)/shibsp/util
nodist_libshibspinclude_HEADERS = \
@@ -28,7 +30,6 @@ libshibspinclude_HEADERS = \
base.h \
exceptions.h \
RequestMapper.h \
- SessionCache.h \
SPRequest.h \
version.h
@@ -62,6 +63,9 @@ loginclude_HEADERS = \
reminclude_HEADERS = \
remoting/ddf.h \
remoting/RemotingService.h
+
+sessioninclude_HEADERS = \
+ session/SessionCache.h
utilinclude_HEADERS = \
util/BoostPropertySet.h \
@@ -79,10 +83,6 @@ utilinclude_HEADERS = \
noinst_HEADERS = \
internal.h \
- impl/StoredSession.h \
- impl/StorageServiceSessionCache.h \
- impl/XMLApplication.h \
- impl/XMLServiceProvider.h \
logging/impl/AbstractLoggingService.h \
logging/impl/LoggingServiceSPI.h \
logging/impl/StringUtil.h \
@@ -120,8 +120,6 @@ libshibsp_la_SOURCES = \
impl/AgentConfig.cpp \
impl/DefaultAgent.cpp \
impl/ChainingAccessControl.cpp \
- impl/StoredSession.cpp \
- impl/StorageServiceSessionCache.cpp \
impl/XMLAccessControl.cpp \
impl/XMLRequestMapper.cpp \
io/impl/HTTPRequest.cpp \
@@ -134,6 +132,7 @@ libshibsp_la_SOURCES = \
logging/impl/SyslogLoggingService.cpp \
remoting/impl/ddf.cpp \
remoting/impl/RemotingService.cpp \
+ session/impl/AbstractSessionCache.cpp \
util/BoostPropertySet.cpp \
util/CGIParser.cpp \
util/DOMPropertySet.cpp \
diff --git a/shibsp/handler/impl/AdminLogoutInitiator.cpp b/shibsp/handler/impl/AdminLogoutInitiator.cpp
index afb178fb..5260facf 100644
--- a/shibsp/handler/impl/AdminLogoutInitiator.cpp
+++ b/shibsp/handler/impl/AdminLogoutInitiator.cpp
@@ -28,9 +28,9 @@
#include "exceptions.h"
#include "Agent.h"
#include "AgentConfig.h"
-#include "SessionCache.h"
#include "handler/SecuredHandler.h"
#include "handler/LogoutInitiator.h"
+#include "session/SessionCache.h"
#include <sstream>
diff --git a/shibsp/handler/impl/AssertionLookup.cpp b/shibsp/handler/impl/AssertionLookup.cpp
index 9b239f35..6346fa68 100644
--- a/shibsp/handler/impl/AssertionLookup.cpp
+++ b/shibsp/handler/impl/AssertionLookup.cpp
@@ -26,10 +26,10 @@
#include "internal.h"
#include "exceptions.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "handler/RemotedHandler.h"
#include "handler/SecuredHandler.h"
+#include "session/SessionCache.h"
#include "util/SPConstants.h"
#include <sstream>
diff --git a/shibsp/handler/impl/AttributeCheckerHandler.cpp b/shibsp/handler/impl/AttributeCheckerHandler.cpp
index 5a8e832b..92abcc81 100644
--- a/shibsp/handler/impl/AttributeCheckerHandler.cpp
+++ b/shibsp/handler/impl/AttributeCheckerHandler.cpp
@@ -29,10 +29,10 @@
#include "Agent.h"
#include "AgentConfig.h"
#include "exceptions.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "attribute/Attribute.h"
#include "handler/AbstractHandler.h"
+#include "session/SessionCache.h"
#include "util/PathResolver.h"
#include <memory>
diff --git a/shibsp/handler/impl/LocalLogoutInitiator.cpp b/shibsp/handler/impl/LocalLogoutInitiator.cpp
index 73fbea98..697ffc06 100644
--- a/shibsp/handler/impl/LocalLogoutInitiator.cpp
+++ b/shibsp/handler/impl/LocalLogoutInitiator.cpp
@@ -27,10 +27,11 @@
#include "internal.h"
#include "exceptions.h"
#include "Agent.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/LogoutInitiator.h"
+#include "session/SessionCache.h"
+
#include <mutex>
using namespace shibsp;
diff --git a/shibsp/handler/impl/LogoutHandler.cpp b/shibsp/handler/impl/LogoutHandler.cpp
index 49c65d6c..46d27d4f 100644
--- a/shibsp/handler/impl/LogoutHandler.cpp
+++ b/shibsp/handler/impl/LogoutHandler.cpp
@@ -27,10 +27,10 @@
#include "internal.h"
#include "exceptions.h"
#include "AgentConfig.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "handler/LogoutHandler.h"
#include "logging/Category.h"
+#include "session/SessionCache.h"
#include "util/PathResolver.h"
#include "util/URLEncoder.h"
diff --git a/shibsp/handler/impl/LogoutInitiator.cpp b/shibsp/handler/impl/LogoutInitiator.cpp
index b0ef2198..432579ef 100644
--- a/shibsp/handler/impl/LogoutInitiator.cpp
+++ b/shibsp/handler/impl/LogoutInitiator.cpp
@@ -28,9 +28,6 @@
#include "handler/LogoutInitiator.h"
using namespace shibsp;
-using namespace xmltooling;
-using namespace xercesc;
-using namespace std;
LogoutInitiator::LogoutInitiator()
{
diff --git a/shibsp/handler/impl/SAML2LogoutInitiator.cpp b/shibsp/handler/impl/SAML2LogoutInitiator.cpp
index 8cd0175e..448bf6cf 100644
--- a/shibsp/handler/impl/SAML2LogoutInitiator.cpp
+++ b/shibsp/handler/impl/SAML2LogoutInitiator.cpp
@@ -27,9 +27,9 @@
#include "internal.h"
#include "exceptions.h"
#include "Agent.h"
-#include "SessionCache.h"
#include "handler/AbstractHandler.h"
#include "handler/LogoutInitiator.h"
+#include "session/SessionCache.h"
#include <mutex>
diff --git a/shibsp/handler/impl/SessionHandler.cpp b/shibsp/handler/impl/SessionHandler.cpp
index d1fb9c24..a84bd648 100644
--- a/shibsp/handler/impl/SessionHandler.cpp
+++ b/shibsp/handler/impl/SessionHandler.cpp
@@ -26,10 +26,10 @@
#include "internal.h"
#include "exceptions.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "attribute/Attribute.h"
#include "handler/SecuredHandler.h"
+#include "session/SessionCache.h"
#include "util/Date.h"
#include <ctime>
diff --git a/shibsp/impl/AgentConfig.cpp b/shibsp/impl/AgentConfig.cpp
index 0da6b699..95535a1a 100644
--- a/shibsp/impl/AgentConfig.cpp
+++ b/shibsp/impl/AgentConfig.cpp
@@ -26,10 +26,10 @@
#include "Agent.h"
#include "AgentConfig.h"
#include "RequestMapper.h"
-#include "SessionCache.h"
#include "io/HTTPResponse.h"
#include "logging/LoggingService.h"
#include "remoting/RemotingService.h"
+#include "session/SessionCache.h"
#include "util/Misc.h"
#include "util/PathResolver.h"
#include "util/URLEncoder.h"
diff --git a/shibsp/impl/ChainingAccessControl.cpp b/shibsp/impl/ChainingAccessControl.cpp
index 8932bbab..15650177 100644
--- a/shibsp/impl/ChainingAccessControl.cpp
+++ b/shibsp/impl/ChainingAccessControl.cpp
@@ -23,7 +23,6 @@
#include "AccessControl.h"
#include "AgentConfig.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "logging/Category.h"
@@ -152,7 +151,7 @@ AccessControl::aclresult_t ChainingAccessControl::authorized(const SPRequest& re
case OP_OR:
{
for (const auto& i : m_ac) {
- if (i->authorized(request,session) == shib_acl_true)
+ if (i->authorized(request, session) == shib_acl_true)
return shib_acl_true;
}
request.log(Priority::SHIB_DEBUG, "all embedded AccessControl plugins unsuccessful, denying access");
diff --git a/shibsp/impl/DefaultAgent.cpp b/shibsp/impl/DefaultAgent.cpp
index 64ca9ecf..2b2c9745 100644
--- a/shibsp/impl/DefaultAgent.cpp
+++ b/shibsp/impl/DefaultAgent.cpp
@@ -25,10 +25,10 @@
#include "Agent.h"
#include "AgentConfig.h"
#include "RequestMapper.h"
-#include "SessionCache.h"
#include "io/HTTPResponse.h"
#include "logging/Category.h"
#include "remoting/RemotingService.h"
+#include "session/SessionCache.h"
#include "util/BoostPropertySet.h"
#include "util/SPConstants.h"
diff --git a/shibsp/impl/XMLAccessControl.cpp b/shibsp/impl/XMLAccessControl.cpp
index 284685b3..ae830c9b 100644
--- a/shibsp/impl/XMLAccessControl.cpp
+++ b/shibsp/impl/XMLAccessControl.cpp
@@ -22,10 +22,10 @@
#include "exceptions.h"
#include "AccessControl.h"
-#include "SessionCache.h"
#include "SPRequest.h"
#include "attribute/Attribute.h"
#include "logging/Category.h"
+#include "session/SessionCache.h"
#include "util/Lockable.h"
#include "util/Misc.h"
#include "util/ReloadableXMLFile.h"
diff --git a/shibsp/SessionCache.h b/shibsp/session/SessionCache.h
similarity index 100%
rename from shibsp/SessionCache.h
rename to shibsp/session/SessionCache.h
diff --git a/shibsp/session/impl/AbstractSessionCache.cpp b/shibsp/session/impl/AbstractSessionCache.cpp
new file mode 100644
index 00000000..96123bef
--- /dev/null
+++ b/shibsp/session/impl/AbstractSessionCache.cpp
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+/**
+ * session/impl/AbstractSessionCache.cpp
+ *
+ * Base class for SessionCache implementations.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "session/SessionCache.h"
+#include "logging/Category.h"
+
+#include <boost/property_tree/ptree.hpp>
+
+using namespace shibsp;
+using namespace boost::property_tree;
+using namespace std;
+
+namespace shibsp {
+ extern SessionCache* SHIBSP_DLLLOCAL FilesystemSessionCacheFactory(ptree& pt, bool deprecationSupport);
+ extern SessionCache* SHIBSP_DLLLOCAL StorageServiceSessionCacheFactory(ptree& pt, bool deprecationSupport);
+}
+
+void SHIBSP_API shibsp::registerSessionCaches()
+{
+ //AgentConfig::getConfig().SessionCacheManager.registerFactory(FILESYSTEM_SESSION_CACHE, FilesystemSessionCacheFactory);
+ //AgentConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceSessionCacheFactory);
+}
+
+Session::Session()
+{
+}
+
+Session::~Session()
+{
+}
+
+SessionCache::SessionCache()
+{
+}
+
+SessionCache::~SessionCache()
+{
+}
diff --git a/shibsp/impl/StorageServiceSessionCache.cpp b/shibsp/session/impl/StorageServiceSessionCache.cpp
similarity index 100%
rename from shibsp/impl/StorageServiceSessionCache.cpp
rename to shibsp/session/impl/StorageServiceSessionCache.cpp
diff --git a/shibsp/impl/StorageServiceSessionCache.h b/shibsp/session/impl/StorageServiceSessionCache.h
similarity index 100%
rename from shibsp/impl/StorageServiceSessionCache.h
rename to shibsp/session/impl/StorageServiceSessionCache.h
diff --git a/shibsp/impl/StoredSession.cpp b/shibsp/session/impl/StoredSession.cpp
similarity index 100%
rename from shibsp/impl/StoredSession.cpp
rename to shibsp/session/impl/StoredSession.cpp
diff --git a/shibsp/impl/StoredSession.h b/shibsp/session/impl/StoredSession.h
similarity index 100%
rename from shibsp/impl/StoredSession.h
rename to shibsp/session/impl/StoredSession.h
diff --git a/tests/impl/XMLAccessControlTests.cpp b/tests/impl/XMLAccessControlTests.cpp
index a5385cc4..f4f41917 100644
--- a/tests/impl/XMLAccessControlTests.cpp
+++ b/tests/impl/XMLAccessControlTests.cpp
@@ -22,10 +22,10 @@
#include "AbstractSPRequest.h"
#include "AccessControl.h"
#include "AgentConfig.h"
-#include "SessionCache.h"
#include "attribute/Attribute.h"
#include "attribute/SimpleAttribute.h"
#include "logging/Category.h"
+#include "session/SessionCache.h"
#ifdef HAVE_CXX14
# include <shared_mutex>
diff --git a/tests/impl/XMLRequestMapperTests.cpp b/tests/impl/XMLRequestMapperTests.cpp
index f2e4cd8f..5b489e20 100644
--- a/tests/impl/XMLRequestMapperTests.cpp
+++ b/tests/impl/XMLRequestMapperTests.cpp
@@ -23,9 +23,9 @@
#include "AccessControl.h"
#include "AgentConfig.h"
#include "RequestMapper.h"
-#include "SessionCache.h"
#include "attribute/Attribute.h"
#include "logging/Category.h"
+#include "session/SessionCache.h"
#include "util/PropertySet.h"
#ifdef HAVE_CXX14
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list