<item id="org.eclipse.cdt.core.pathentry">
<pathentry kind="out" path=""/>
-<pathentry excluding="util/|impl/|security/|metadata/|remoting/|remoting/impl/|attribute/|binding/|binding/impl/|attribute/resolver/|attribute/resolver/impl/|handler/|handler/impl/|attribute/filtering/|attribute/filtering/impl/" kind="src" path="shibsp"/>
+<pathentry excluding="util/|impl/|security/|metadata/|remoting/|remoting/impl/|attribute/|binding/|binding/impl/|attribute/resolver/|attribute/resolver/impl/|handler/|handler/impl/|attribute/filtering/|attribute/filtering/impl/|lite/" kind="src" path="shibsp"/>
<pathentry excluding="resolver/|resolver/impl/|filtering/|filtering/impl/" kind="src" path="shibsp/attribute"/>
<pathentry excluding="impl/" kind="src" path="shibsp/attribute/filtering"/>
<pathentry kind="src" path="shibsp/attribute/filtering/impl"/>
<pathentry excluding="impl/" kind="src" path="shibsp/handler"/>
<pathentry kind="src" path="shibsp/handler/impl"/>
<pathentry kind="src" path="shibsp/impl"/>
+<pathentry kind="src" path="shibsp/lite"/>
<pathentry kind="src" path="shibsp/metadata"/>
<pathentry excluding="impl/" kind="src" path="shibsp/remoting"/>
<pathentry kind="src" path="shibsp/remoting/impl"/>
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isapi_shib_gui", "isapi_shib_gui\isapi_shib_gui.vcproj", "{D341DCD8-7DCD-43A2-8559-C07DAB838711}"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shib20", "apache\mod_shib20.vcproj", "{68E9568B-476C-4289-B93C-893432378ADC}"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsapi_shib", "nsapi_shib\nsapi_shib.vcproj", "{1396D80A-8672-4224-9B02-95F3F4207CDB}"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "siterefresh", "siterefresh\siterefresh.vcproj", "{4D02F36E-D2CD-4FD1-AC50-2941E27BB3FB}"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server Modules", "Server Modules", "{26BA8F84-6E42-41FA-9B13-5D3F4B5B2050}"
{81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibsp-lite", "shibsp\shibsp-lite.vcproj", "{81F0F7A6-DC36-46EF-957F-F9E81D4403F7}"
+ ProjectSection(WebsiteProperties) = preProject
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.Debug = "False"
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
{F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|Win32.Build.0 = Debug|Win32
{F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Release|Win32.ActiveCfg = Release|Win32
{F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Release|Win32.Build.0 = Release|Win32
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Debug|Win32.Build.0 = Debug|Win32
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Release|Win32.ActiveCfg = Release|Win32
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/Threads.h>
+#include <xmltooling/util/XMLConstants.h>
#include <xmltooling/util/XMLHelper.h>
#ifdef WIN32
{
mutable string m_body;
mutable bool m_gotBody;
- vector<XSECCryptoX509*> m_certs;
+ vector<string> m_certs;
public:
request_rec* m_req;
in.read(buf,1024);
ap_rwrite(buf,in.gcount(),m_req);
}
- return ((status==SAML_HTTP_STATUS_OK) ? DONE : status);
+ return ((status==XMLTOOLING_HTTP_STATUS_OK) ? DONE : status);
}
long sendRedirect(const char* url) {
ap_table_set(m_req->headers_out, "Location", url);
return REDIRECT;
}
- const vector<XSECCryptoX509*>& getClientCertificates() const {
+ const vector<string>& getClientCertificates() const {
return m_certs;
}
long returnDecline(void) { return DECLINED; }
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..;"..\..\cpp-opensaml1";\Apache\include;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;EAPI"
+ AdditionalIncludeDirectories="..;\Apache\include;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;EAPI;SHIBSP_LITE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="log4cpp.lib xerces-c_2.lib ApacheCore.lib saml_5.lib saml2.lib xmltooling1.lib"
+ AdditionalDependencies="log4cpp.lib xerces-c_2.lib ApacheCore.lib xmltooling-lite1.lib"
OutputFile="Release/mod_shib_13.so"
LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Release";"..\..\cpp-opensaml2\Release";"..\..\cpp-xmltooling\Release",\Apache\libexec"
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Release",\Apache\libexec"
ProgramDatabaseFile=".\Release/mod_shib_13.pdb"
ImportLibrary=".\Release/mod_shib_13.lib"
TargetMachine="1"
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..;"..\..\cpp-opensaml1";\Apache\include;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="_WINDOWS;EAPI;WIN32;_DEBUG"
+ AdditionalIncludeDirectories="..;\Apache\include;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="_WINDOWS;EAPI;WIN32;_DEBUG;SHIBSP_LITE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="log4cppD.lib xerces-c_2D.lib ApacheCore.lib saml_5D.lib saml2D.lib xmltooling1D.lib"
+ AdditionalDependencies="log4cppD.lib xerces-c_2D.lib ApacheCore.lib xmltooling-lite1D.lib"
OutputFile="Debug/mod_shib_13.so"
LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Debug";"..\..\cpp-opensaml2\Debug";"..\..\cpp-xmltooling\Debug";\Apache\libexec"
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Debug";\Apache\libexec"
GenerateDebugInformation="true"
ImportLibrary=".\Debug/mod_shib_13.lib"
TargetMachine="1"
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..;"..\..\cpp-opensaml1";\Apache2\include;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ AdditionalIncludeDirectories="..;\Apache2\include;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;SHIBSP_LITE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="log4cpp.lib xerces-c_2.lib libapr.lib libhttpd.lib saml_5.lib saml2.lib xmltooling1.lib"
+ AdditionalDependencies="log4cpp.lib xerces-c_2.lib libapr.lib libhttpd.lib xmltooling-lite1.lib"
OutputFile="mod_shib20___Win32_Release/mod_shib_20.so"
LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Release";"..\..\cpp-opensaml2\Release";"..\..\cpp-xmltooling\Release",\httpd-2.0.52\srclib\apr\Release,\httpd-2.0.52\Release"
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Release",\httpd-2.0.52\srclib\apr\Release,\httpd-2.0.52\Release"
ProgramDatabaseFile=".\mod_shib20___Win32_Release/mod_shib_20.pdb"
ImportLibrary=".\mod_shib20___Win32_Release/mod_shib_20.lib"
TargetMachine="1"
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..;"..\..\cpp-opensaml1";\Apache2\include;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG"
+ AdditionalIncludeDirectories="..;\Apache2\include;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG;SHIBSP_LITE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="log4cppD.lib xerces-c_2D.lib libapr.lib libhttpd.lib saml_5D.lib saml2D.lib xmltooling1D.lib"
+ AdditionalDependencies="log4cppD.lib xerces-c_2D.lib libapr.lib libhttpd.lib xmltooling-lite1D.lib"
OutputFile="mod_shib20___Win32_Debug/mod_shib_20.so"
LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Debug";"..\..\cpp-opensaml2\Debug";"..\..\cpp-xmltooling\Debug";\httpd-2.0.52\srclib\apr\Debug,\httpd-2.0.52\Debug"
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Debug";\httpd-2.0.52\srclib\apr\Debug,\httpd-2.0.52\Debug"
GenerateDebugInformation="true"
ImportLibrary=".\mod_shib20___Win32_Debug/mod_shib_20.lib"
TargetMachine="1"
Name="VCCLCompilerTool"\r
Optimization="2"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories="..;"..\..\cpp-opensaml1";\Apache22\include;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""\r
- PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS"\r
+ AdditionalIncludeDirectories="..;\Apache22\include;"..\..\cpp-xmltooling""\r
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;SHIBSP_LITE"\r
StringPooling="true"\r
RuntimeLibrary="2"\r
EnableFunctionLevelLinking="true"\r
/>\r
<Tool\r
Name="VCLinkerTool"\r
- AdditionalDependencies="log4cpp.lib xerces-c_2.lib saml_5.lib saml2.lib xmltooling1.lib libapr-1.lib libhttpd.lib"\r
+ AdditionalDependencies="log4cpp.lib xerces-c_2.lib xmltooling-lite1.lib libapr-1.lib libhttpd.lib"\r
OutputFile="mod_shib22___Win32_Release/mod_shib_22.so"\r
LinkIncremental="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Release";"..\..\cpp-opensaml2\Release";"..\..\cpp-xmltooling\Release",\Apache22\lib"\r
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Release";\Apache22\lib"\r
ProgramDatabaseFile=".\mod_shib22___Win32_Release/mod_shib_22.pdb"\r
ImportLibrary=".\mod_shib22___Win32_Release/mod_shib_22.lib"\r
TargetMachine="1"\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
- AdditionalIncludeDirectories="..;"..\..\cpp-opensaml1";\Apache22D\include;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""\r
- PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS"\r
+ AdditionalIncludeDirectories="..;\Apache22D\include;"..\..\cpp-xmltooling""\r
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;SHIBSP_LITE"\r
MinimalRebuild="true"\r
BasicRuntimeChecks="3"\r
RuntimeLibrary="3"\r
/>\r
<Tool\r
Name="VCLinkerTool"\r
- AdditionalDependencies="log4cppD.lib xerces-c_2D.lib saml_5D.lib saml2D.lib xmltooling1D.lib libapr-1.lib libhttpd.lib"\r
+ AdditionalDependencies="log4cppD.lib xerces-c_2D.lib xmltooling-lite1D.lib libapr-1.lib libhttpd.lib"\r
OutputFile="mod_shib22___Win32_Debug/mod_shib_22.so"\r
LinkIncremental="2"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Debug";"..\..\cpp-opensaml2\Debug";"..\..\cpp-xmltooling\Debug",\Apache22D\lib"\r
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Debug";\Apache22D\lib"\r
GenerateDebugInformation="true"\r
ProgramDatabaseFile=".\mod_shib22___Win32_Debug/mod_shib_22.pdb"\r
ImportLibrary=".\mod_shib22___Win32_Debug/mod_shib_22.lib"\r
/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
-/* Define if RPC SVC macros work on this platform */
-#define HAVE_WORKING_SVC_DESTROY 1
-
/* Name of package */
#define PACKAGE "shibboleth"
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */
-/* Define if using embedded version of ONC RPC. */
-#define USE_OUR_ONCRPC 1
-
/* Version number of package */
#define VERSION "2.0"
#include <fstream>
#include <process.h>
+#include <windows.h>
#include <httpfilt.h>
#include <httpext.h>
PHTTP_FILTER_CONTEXT m_pfc;
PHTTP_FILTER_PREPROC_HEADERS m_pn;
map<string,string> m_headers;
- vector<XSECCryptoX509*> m_certs;
+ vector<string> m_certs;
int m_port;
string m_scheme,m_hostname,m_uri;
mutable string m_remote_addr,m_content_type,m_method;
hdr += "\r\n";
const char* codestr="200 OK";
switch (status) {
- case SAML_HTTP_STATUS_FORBIDDEN:codestr="403 Forbidden"; break;
- case SAML_HTTP_STATUS_NOTFOUND: codestr="404 Not Found"; break;
- case SAML_HTTP_STATUS_ERROR: codestr="500 Server Error"; break;
+ case XMLTOOLING_HTTP_STATUS_FORBIDDEN:codestr="403 Forbidden"; break;
+ case XMLTOOLING_HTTP_STATUS_NOTFOUND: codestr="404 Not Found"; break;
+ case XMLTOOLING_HTTP_STATUS_ERROR: codestr="500 Server Error"; break;
}
m_pfc->ServerSupportFunction(m_pfc, SF_REQ_SEND_RESPONSE_HEADER, (void*)codestr, (DWORD)hdr.c_str(), 0);
char buf[1024];
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}
- const vector<XSECCryptoX509*>& getClientCertificates() const {
+ const vector<string>& getClientCertificates() const {
return m_certs;
}
{
LPEXTENSION_CONTROL_BLOCK m_lpECB;
map<string,string> m_headers;
- vector<XSECCryptoX509*> m_certs;
+ vector<string> m_certs;
mutable string m_body;
mutable bool m_gotBody;
int m_port;
hdr += "\r\n";
const char* codestr="200 OK";
switch (status) {
- case SAML_HTTP_STATUS_FORBIDDEN:codestr="403 Forbidden"; break;
- case SAML_HTTP_STATUS_NOTFOUND: codestr="404 Not Found"; break;
- case SAML_HTTP_STATUS_ERROR: codestr="500 Server Error"; break;
+ case XMLTOOLING_HTTP_STATUS_FORBIDDEN:codestr="403 Forbidden"; break;
+ case XMLTOOLING_HTTP_STATUS_NOTFOUND: codestr="404 Not Found"; break;
+ case XMLTOOLING_HTTP_STATUS_ERROR: codestr="500 Server Error"; break;
}
m_lpECB->ServerSupportFunction(m_lpECB->ConnID, HSE_REQ_SEND_RESPONSE_HEADER, (void*)codestr, 0, (LPDWORD)hdr.c_str());
char buf[1024];
return HSE_STATUS_SUCCESS;
}
- const vector<XSECCryptoX509*>& getClientCertificates() const {
+ const vector<string>& getClientCertificates() const {
return m_certs;
}
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".,..,..\..\cpp-opensaml1;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS"
+ AdditionalIncludeDirectories=".;..;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;SHIBSP_LITE;WIN32_LEAN_AND_MEAN"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
<Tool
Name="VCLinkerTool"
AdditionalOptions="/export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc"
- AdditionalDependencies="log4cpp.lib xerces-c_2.lib saml_5.lib saml2.lib xmltooling1.lib"
+ AdditionalDependencies="log4cpp.lib xerces-c_2.lib xmltooling-lite1.lib"
OutputFile=".\Release/isapi_shib.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Release";"..\..\cpp-opensaml2\Release";"..\..\cpp-xmltooling\Release""
+ AdditionalLibraryDirectories="..\..\cpp-xmltooling\Release"
ProgramDatabaseFile=".\Release/isapi_shib.pdb"
ImportLibrary=".\Release/isapi_shib.lib"
TargetMachine="1"
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".,..,..\..\cpp-opensaml1;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG"
+ AdditionalIncludeDirectories=".;..;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG;SHIBSP_LITE;WIN32_LEAN_AND_MEAN"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
<Tool
Name="VCLinkerTool"
AdditionalOptions="/export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc"
- AdditionalDependencies="log4cppD.lib xerces-c_2D.lib saml_5D.lib saml2D.lib xmltooling1D.lib"
+ AdditionalDependencies="log4cppD.lib xerces-c_2D.lib xmltooling-lite1D.lib"
OutputFile=".\Debug/isapi_shib.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Debug";"..\..\cpp-opensaml2\Debug";"..\..\cpp-xmltooling\Debug""
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Debug""
GenerateDebugInformation="true"
ImportLibrary=".\Debug/isapi_shib.lib"
TargetMachine="1"
string m_uri;
mutable string m_body;
mutable bool m_gotBody;
- vector<XSECCryptoX509*> m_certs;
+ vector<string> m_certs;
public:
ShibTargetNSAPI(pblock* pb, ::Session* sn, Request* rq) : m_gotBody(false) {
}
long returnDecline() { return REQ_NOACTION; }
long returnOK() { return REQ_PROCEED; }
- const vector<XSECCryptoX509*>& getClientCertificates() const {
+ const vector<string>& getClientCertificates() const {
return m_certs;
}
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".;..;"..\..\cpp-opensaml1";"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="NDEBUG;_WINDOWS;WIN32"
+ AdditionalIncludeDirectories=".;..;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;WIN32;SHIBSP_LITE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="log4cpp.lib xerces-c_2.lib saml_5.lib saml2.lib xmltooling1.lib ns-httpd30.lib"
+ AdditionalDependencies="log4cpp.lib xerces-c_2.lib xmltooling-lite1.lib ns-httpd30.lib"
OutputFile=".\Release/nsapi_shib.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Release";"..\..\cpp-opensaml2\Release";"..\..\cpp-xmltooling\Release""
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Release""
ProgramDatabaseFile=".\Release/nsapi_shib.pdb"
ImportLibrary=".\Release/nsapi_shib.lib"
TargetMachine="1"
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".;..;"..\..\cpp-opensaml1";"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""
- PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG"
+ AdditionalIncludeDirectories=".;..;"..\..\cpp-xmltooling""
+ PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG;SHIBSP_LITE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="log4cppD.lib xerces-c_2D.lib saml_5D.lib saml2D.lib xmltooling1D.lib ns-httpd30.lib"
+ AdditionalDependencies="log4cppD.lib xerces-c_2D.lib xmltooling-lite1D.lib ns-httpd30.lib"
OutputFile=".\Debug/nsapi_shib.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""..\..\cpp-opensaml1\saml\Debug";"..\..\cpp-opensaml2\Debug";"..\..\cpp-xmltooling\Debug""
+ AdditionalLibraryDirectories=""..\..\cpp-xmltooling\Debug""
GenerateDebugInformation="true"
ImportLibrary=".\Debug/nsapi_shib.lib"
TargetMachine="1"
#include "SessionCache.h"
#include <log4cpp/Category.hh>
-#include <saml/util/CGIParser.h>
using namespace shibsp;
using namespace opensaml;
#include <shibsp/exceptions.h>
#include <shibsp/SPRequest.h>
-#include <saml/util/CGIParser.h>
+#ifndef SHIBSP_LITE
+# include <saml/util/CGIParser.h>
+#else
+# include <shibsp/lite/CGIParser.h>
+#endif
namespace shibsp {
+#if defined (_MSC_VER)
+ #pragma warning( push )
+ #pragma warning( disable : 4251 )
+#endif
+
/**
* Abstract base for SPRequest implementations
*/
mutable std::map<std::string,std::string> m_cookieMap;
mutable opensaml::CGIParser* m_parser;
};
+
+#if defined (_MSC_VER)
+ #pragma warning( pop )
+#endif
+
};
#endif /* __shibsp_abstreq_h__ */
#define __shibsp_app_h__
#include <shibsp/util/PropertySet.h>
-#include <saml/saml2/metadata/MetadataProvider.h>
-#include <xmltooling/security/CredentialResolver.h>
-#include <xmltooling/security/TrustEngine.h>
+
+#include <set>
+#ifndef SHIBSP_LITE
+# include <saml/saml2/metadata/MetadataProvider.h>
+# include <xmltooling/security/CredentialResolver.h>
+# include <xmltooling/security/TrustEngine.h>
+#endif
namespace shibsp {
+#ifndef SHIBSP_LITE
class SHIBSP_API AttributeExtractor;
class SHIBSP_API AttributeFilter;
class SHIBSP_API AttributeResolver;
+#endif
class SHIBSP_API Handler;
class SHIBSP_API ServiceProvider;
class SHIBSP_API SessionInitiator;
/**
* Returns a unique hash for the Application.
*
- * @return a value resulting from a hash of the Application's ID
+ * @return a value resulting from a computation over the Application's configuration
*/
virtual const char* getHash() const=0;
*/
virtual std::pair<std::string,const char*> getCookieNameProps(const char* prefix) const;
+#ifndef SHIBSP_LITE
/**
* Returns a MetadataProvider for use with this Application.
*
*/
virtual AttributeResolver* getAttributeResolver() const=0;
- /**\r
- * Returns a set of attribute IDs to use as a REMOTE_USER value.\r
- * <p>The first attribute with a value (and only a single value) will be used.\r
- *\r
- * @return a set of attribute IDs, or an empty set\r
- */\r
- virtual const std::set<std::string>& getRemoteUserAttributeIds() const=0;
-
/**
* Returns the CredentialResolver instance associated with this Application.
*
virtual const PropertySet* getRelyingParty(const opensaml::saml2md::EntityDescriptor* provider) const=0;
/**
+ * Returns the set of audience values associated with this Application.
+ *
+ * @return set of audience values associated with the Application
+ */
+ virtual const std::vector<const XMLCh*>& getAudiences() const=0;
+#endif
+
+ /**
+ * Returns a set of attribute IDs to use as a REMOTE_USER value.
+ * <p>The first attribute with a value (and only a single value) will be used.
+ *
+ * @return a set of attribute IDs, or an empty set
+ */
+ virtual const std::set<std::string>& getRemoteUserAttributeIds() const=0;
+
+ /**
* Returns the default SessionInitiator when automatically requesting a session.
*
* @return the default SessionInitiator, or NULL
* @return the mapped Handler, or NULL
*/
virtual const Handler* getHandler(const char* path) const=0;
-
- /**
- * Returns the set of audience values associated with this Application.
- *
- * @return set of audience values associated with the Application
- */
- virtual const std::vector<const XMLCh*>& getAudiences() const=0;
};
};
#include "ServiceProvider.h"
#include "SessionCache.h"
#include "SPConfig.h"
-#include "attribute/AttributeDecoder.h"
-#include "attribute/filtering/AttributeFilter.h"
-#include "attribute/filtering/MatchFunctor.h"
-#include "attribute/resolver/AttributeExtractor.h"
-#include "attribute/resolver/AttributeResolver.h"
-#include "binding/ArtifactResolver.h"
+#include "attribute/Attribute.h"
#include "handler/SessionInitiator.h"
-#include "metadata/MetadataExt.h"
#include "remoting/ListenerService.h"
-#include "security/PKIXTrustEngine.h"
+
+#ifndef SHIBSP_LITE
+# include "attribute/AttributeDecoder.h"
+# include "attribute/filtering/AttributeFilter.h"
+# include "attribute/filtering/MatchFunctor.h"
+# include "attribute/resolver/AttributeExtractor.h"
+# include "attribute/resolver/AttributeResolver.h"
+# include "binding/ArtifactResolver.h"
+# include "metadata/MetadataExt.h"
+# include "security/PKIXTrustEngine.h"
+# include <saml/SAMLConfig.h>
+#else
+# include <xmltooling/XMLToolingConfig.h>
+#endif
#include <log4cpp/Category.hh>
-#include <saml/SAMLConfig.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/TemplateEngine.h>
DECL_XMLTOOLING_EXCEPTION_FACTORY(ConfigurationException,shibsp);
DECL_XMLTOOLING_EXCEPTION_FACTORY(ListenerException,shibsp);
+#ifdef SHIBSP_LITE
+DECL_XMLTOOLING_EXCEPTION_FACTORY(MetadataException,opensaml::saml2md);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(SecurityPolicyException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(ProfileException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(FatalProfileException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(RetryableProfileException,opensaml);
+#endif
+
namespace shibsp {
SPInternalConfig g_config;
}
catalog_path = SHIBSP_SCHEMAS;
XMLToolingConfig::getConfig().catalog_path = catalog_path;
+#ifndef SHIBSP_LITE
if (!SAMLConfig::getConfig().init()) {
log.fatal("failed to initialize OpenSAML library");
return false;
}
+#else
+ if (!XMLToolingConfig::getConfig().init()) {
+ log.fatal("failed to initialize XMLTooling library");
+ return false;
+ }
+#endif
XMLToolingConfig::getConfig().setTemplateEngine(new TemplateEngine());
XMLToolingConfig::getConfig().getTemplateEngine()->setTagPrefix("shibmlp");
REGISTER_XMLTOOLING_EXCEPTION_FACTORY(AttributeResolutionException,shibsp);
REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ConfigurationException,shibsp);
REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ListenerException,shibsp);
-
+
+#ifdef SHIBSP_LITE
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(SecurityPolicyException,opensaml);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ProfileException,opensaml);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(FatalProfileException,opensaml);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(RetryableProfileException,opensaml);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(MetadataException,opensaml::saml2md);
+#endif
+
+#ifndef SHIBSP_LITE
if (isEnabled(Metadata))
registerMetadataExtClasses();
if (isEnabled(Trust))
registerPKIXTrustEngine();
+#endif
registerAttributeFactories();
registerHandlers();
registerSessionInitiators();
registerServiceProviders();
+#ifndef SHIBSP_LITE
if (isEnabled(AttributeResolution)) {
- registerAttributeDecoders();
registerAttributeExtractors();
- registerAttributeFilters();
+ registerAttributeDecoders();
registerAttributeResolvers();
+ registerAttributeFilters();
registerMatchFunctors();
}
+#endif
if (isEnabled(Listener))
registerListenerServices();
if (isEnabled(Caching))
registerSessionCaches();
+#ifndef SHIBSP_LITE
if (isEnabled(OutOfProcess))
m_artifactResolver = new ArtifactResolver();
-
+#endif
+
log.info("library initialization complete");
return true;
}
log.info("shutting down the library");
setServiceProvider(NULL);
+#ifndef SHIBSP_LITE
setArtifactResolver(NULL);
+#endif
AssertionConsumerServiceManager.deregisterFactories();
ManageNameIDServiceManager.deregisterFactories();
ServiceProviderManager.deregisterFactories();
Attribute::deregisterFactories();
+#ifndef SHIBSP_LITE
if (isEnabled(AttributeResolution)) {
MatchFunctorManager.deregisterFactories();
- AttributeDecoderManager.deregisterFactories();
AttributeFilterManager.deregisterFactories();
+ AttributeDecoderManager.deregisterFactories();
AttributeExtractorManager.deregisterFactories();
AttributeResolverManager.deregisterFactories();
}
+#endif
if (isEnabled(Listener))
ListenerServiceManager.deregisterFactories();
if (isEnabled(Caching))
SessionCacheManager.deregisterFactories();
+#ifndef SHIBSP_LITE
SAMLConfig::getConfig().term();
+#else
+ XMLToolingConfig::getConfig().term();
+#endif
log.info("library shutdown complete");
}
#define __shibsp_config_h__
#include <shibsp/base.h>
-#include <saml/binding/MessageDecoder.h>
+#ifndef SHIBSP_LITE
+# include <saml/binding/MessageDecoder.h>
+#endif
#include <xmltooling/PluginManager.h>
#include <xercesc/dom/DOM.hpp>
namespace shibsp {
class SHIBSP_API AccessControl;
- class SHIBSP_API AttributeDecoder;
- class SHIBSP_API AttributeExtractor;
- class SHIBSP_API AttributeFilter;
- class SHIBSP_API AttributeResolver;
- class SHIBSP_API FilterPolicyContext;
class SHIBSP_API Handler;
class SHIBSP_API ListenerService;
- class SHIBSP_API MatchFunctor;
class SHIBSP_API RequestMapper;
class SHIBSP_API ServiceProvider;
class SHIBSP_API SessionCache;
class SHIBSP_API SessionInitiator;
+#ifndef SHIBSP_LITE
+ class SHIBSP_API AttributeDecoder;
+ class SHIBSP_API AttributeExtractor;
+ class SHIBSP_API AttributeFilter;
+ class SHIBSP_API AttributeResolver;
+ class SHIBSP_API FilterPolicyContext;
+ class SHIBSP_API MatchFunctor;
+#endif
+
#if defined (_MSC_VER)
#pragma warning( push )
#pragma warning( disable : 4250 4251 )
enum components_t {
Listener = 1,
Caching = 2,
+#ifndef SHIBSP_LITE
Metadata = 4,
Trust = 8,
Credentials = 16,
AttributeResolution = 32,
+#endif
RequestMapping = 64,
OutOfProcess = 128,
InProcess = 256,
return m_serviceProvider;
}
+#ifndef SHIBSP_LITE
/**
* Sets the global ArtifactResolver instance.
*
opensaml::MessageDecoder::ArtifactResolver* getArtifactResolver() const {
return m_artifactResolver;
}
+#endif
/** Separator for serialized values of multi-valued attributes. */
char attribute_value_delimeter;
*/
xmltooling::PluginManager<AccessControl,std::string,const xercesc::DOMElement*> AccessControlManager;
+#ifndef SHIBSP_LITE
/**
* Manages factories for AttributeDecoder plugins.
*/
xmltooling::PluginManager<AttributeResolver,std::string,const xercesc::DOMElement*> AttributeResolverManager;
/**
+ * Manages factories for MatchFunctor plugins.
+ */
+ xmltooling::PluginManager< MatchFunctor,xmltooling::QName,std::pair<const FilterPolicyContext*,const xercesc::DOMElement*> > MatchFunctorManager;
+#endif
+
+ /**
* Manages factories for Handler plugins that implement AssertionConsumerService functionality.
*/
xmltooling::PluginManager< Handler,std::string,std::pair<const xercesc::DOMElement*,const char*> > AssertionConsumerServiceManager;
xmltooling::PluginManager<ListenerService,std::string,const xercesc::DOMElement*> ListenerServiceManager;
/**
- * Manages factories for MatchFunctor plugins.
- */
- xmltooling::PluginManager< MatchFunctor,xmltooling::QName,std::pair<const FilterPolicyContext*,const xercesc::DOMElement*> > MatchFunctorManager;
-
- /**
* Manages factories for Handler plugins that implement ManageNameIDService functionality.
*/
xmltooling::PluginManager< Handler,std::string,std::pair<const xercesc::DOMElement*,const char*> > ManageNameIDServiceManager;
xmltooling::PluginManager< Handler,std::string,std::pair<const xercesc::DOMElement*,const char*> > SingleLogoutServiceManager;
protected:
- SPConfig() : attribute_value_delimeter(';'), m_serviceProvider(NULL), m_artifactResolver(NULL), m_features(0) {}
+ SPConfig() : attribute_value_delimeter(';'), m_serviceProvider(NULL),
+#ifndef SHIBSP_LITE
+ m_artifactResolver(NULL),
+#endif
+ m_features(0) {}
/** Global ServiceProvider instance. */
ServiceProvider* m_serviceProvider;
+#ifndef SHIBSP_LITE
/** Global ArtifactResolver instance. */
opensaml::MessageDecoder::ArtifactResolver* m_artifactResolver;
+#endif
private:
unsigned long m_features;
#define __shibsp_req_h__
#include <shibsp/RequestMapper.h>
-#include <saml/binding/HTTPRequest.h>
-#include <saml/binding/HTTPResponse.h>
+#include <xmltooling/io/HTTPRequest.h>
+#include <xmltooling/io/HTTPResponse.h>
namespace shibsp {
*
* <p>This interface need not be threadsafe.
*/
- class SHIBSP_API SPRequest : public virtual opensaml::HTTPRequest, public virtual opensaml::HTTPResponse
+ class SHIBSP_API SPRequest : public virtual xmltooling::HTTPRequest, public virtual xmltooling::HTTPResponse
{
protected:
SPRequest() {}
#include "SessionCache.h"
#include "SPRequest.h"
#include "attribute/Attribute.h"
-#include "attribute/resolver/AttributeExtractor.h"
-#include "attribute/resolver/AttributeResolver.h"
#include "handler/SessionInitiator.h"
#include "util/TemplateParameters.h"
#include <fstream>
#include <sstream>
-#include <saml/saml2/metadata/Metadata.h>
-#include <saml/util/SAMLConstants.h>
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/XMLHelper.h>
using namespace shibsp;
-using namespace opensaml::saml2md;
-using namespace opensaml;
using namespace xmltooling;
using namespace std;
}
else if (!strcmp(page,"access")) {
istringstream msg("Access Denied");
- return static_cast<opensaml::GenericResponse&>(request).sendResponse(msg, HTTPResponse::SAML_HTTP_STATUS_FORBIDDEN);
+ return request.sendResponse(msg, HTTPResponse::XMLTOOLING_HTTP_STATUS_FORBIDDEN);
}
}
request.clearHeader("Shib-Attributes");
request.clearHeader("Shib-Application-ID");
- // Let plugins do the rest.
+ // TODO: Figure out a way to clear attribute headers...
+ /*
AttributeExtractor* extractor = request.getApplication().getAttributeExtractor();
if (extractor) {
Locker locker(extractor);
Locker locker(resolver);
resolver->clearHeaders(request);
}
+ */
}
};
catch (exception& e) {
request.log(SPRequest::SPWarn, string("error during session lookup: ") + e.what());
// If it's not a retryable session failure, we throw to the outer handler for reporting.
- if (dynamic_cast<RetryableProfileException*>(&e)==NULL)
+ if (dynamic_cast<opensaml::RetryableProfileException*>(&e)==NULL)
throw;
}
// Still no data?
if (!session) {
if (requireSession)
- throw RetryableProfileException("Unable to obtain session to export to request.");
+ throw opensaml::RetryableProfileException("Unable to obtain session to export to request.");
else
return make_pair(false,0); // just bail silently
}
// Make sure this is SSL, if it should be
if ((!handlerSSL.first || handlerSSL.second) && !request.isSecure())
- throw SecurityPolicyException("Blocked non-SSL access to Shibboleth handler.");
+ throw opensaml::FatalProfileException("Blocked non-SSL access to Shibboleth handler.");
// We dispatch based on our path info. We know the request URL begins with or equals the handler URL,
// so the path info is the next character (or null).
throw ConfigurationException("Configured Shibboleth handler failed to process the request.");
}
- catch (MetadataException& e) {
+ catch (opensaml::saml2md::MetadataException& e) {
TemplateParameters tp(&e);
tp.m_map["requestURL"] = targetURL.substr(0,targetURL.find('?'));
// See if a metadata error page is installed.
#define __shibsp_sp_h__
#include <shibsp/util/PropertySet.h>
-#include <saml/binding/SecurityPolicyRule.h>
+#ifndef SHIBSP_LITE
+# include <saml/binding/SecurityPolicyRule.h>
+# include <xmltooling/util/StorageService.h>
+#endif
#include <xmltooling/Lockable.h>
-#include <xmltooling/util/StorageService.h>
namespace shibsp {
class SHIBSP_API SessionCache;
class SHIBSP_API SPRequest;
class SHIBSP_API TemplateParameters;
+#ifndef SHIBSP_LITE
class SHIBSP_API TransactionLog;
+#endif
/**
* Interface to a Shibboleth ServiceProvider instance.
*/
virtual void init()=0;
+#ifndef SHIBSP_LITE
/**
* Returns a TransactionLog instance.
*
* @return a StorageService if available, or NULL
*/
virtual xmltooling::StorageService* getStorageService(const char* id) const=0;
+#endif
/**
* Returns a SessionCache instance.
*/
virtual ListenerService* getListenerService(bool required=true) const=0;
+#ifndef SHIBSP_LITE
/**
* Returns the security policy settings for an identified policy.
*
* @return an array of policy rules
*/
virtual const std::vector<const opensaml::SecurityPolicyRule*>& getPolicyRules(const char* id) const=0;
+#endif
/**
* Returns a RequestMapper instance.
#include "internal.h"\r
#include "SessionCache.h"\r
\r
+#include <xercesc/util/XMLUniDefs.hpp>\r
+\r
using namespace shibsp;\r
using namespace xmltooling;\r
\r
namespace shibsp {\r
\r
- SHIBSP_DLLLOCAL PluginManager<SessionCache,std::string,const DOMElement*>::Factory RemotedCacheFactory;\r
+#ifndef SHIBSP_LITE\r
SHIBSP_DLLLOCAL PluginManager<SessionCache,std::string,const DOMElement*>::Factory StorageServiceCacheFactory;\r
+#else\r
+ SHIBSP_DLLLOCAL PluginManager<SessionCache,std::string,const DOMElement*>::Factory RemotedCacheFactory;\r
+#endif\r
\r
static const XMLCh cacheTimeout[] = UNICODE_LITERAL_12(c,a,c,h,e,T,i,m,e,o,u,t);\r
}\r
\r
void SHIBSP_API shibsp::registerSessionCaches()\r
{\r
- SPConfig& conf = SPConfig::getConfig();\r
- conf.SessionCacheManager.registerFactory(REMOTED_SESSION_CACHE, RemotedCacheFactory);\r
- conf.SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);\r
+#ifndef SHIBSP_LITE\r
+ SPConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);\r
+#else\r
+ SPConfig::getConfig().SessionCacheManager.registerFactory(REMOTED_SESSION_CACHE, RemotedCacheFactory);\r
+#endif\r
}\r
\r
SessionCache::SessionCache(const DOMElement* e) : m_cacheTimeout(60*60*8)\r
#define __shibsp_sessioncache_h__
#include <shibsp/base.h>
-#include <saml/saml1/core/Assertions.h>
-#include <saml/saml2/metadata/Metadata.h>
+
+#ifndef SHIBSP_LITE
+# include <saml/saml1/core/Assertions.h>
+# include <saml/saml2/metadata/Metadata.h>
+#endif
#include <xmltooling/Lockable.h>
namespace shibsp {
*/
virtual const char* getAuthnInstant() const=0;
+#ifndef SHIBSP_LITE
/**
* Returns the NameID associated with a session.
*
* @return a SAML 2.0 NameID associated with the session, if any
*/
virtual const opensaml::saml2::NameID* getNameID() const=0;
+#endif
/**
* Returns the SessionIndex provided with the session.
virtual const std::multimap<std::string,Attribute*>& getAttributes() const=0;
/**
- * Adds additional attributes to the session.
- *
- * @param attributes reference to an array of Attributes to cache (will be freed by cache)
- */
- virtual void addAttributes(const std::vector<Attribute*>& attributes)=0;
-
- /**
* Returns the identifiers of the assertion(s) cached by the session.
*
* <p>The SSO assertion is guaranteed to be first in the set.
*/
virtual const std::vector<const char*>& getAssertionIDs() const=0;
+#ifndef SHIBSP_LITE
+ /**
+ * Adds additional attributes to the session.
+ *
+ * @param attributes reference to an array of Attributes to cache (will be freed by cache)
+ */
+ virtual void addAttributes(const std::vector<Attribute*>& attributes)=0;
+
/**
* Returns an assertion cached by the session.
*
* @param assertion pointer to an assertion to cache (will be freed by cache)
*/
virtual void addAssertion(opensaml::Assertion* assertion)=0;
+#endif
};
/**
public:
virtual ~SessionCache() {}
+#ifndef SHIBSP_LITE
/**
* Inserts a new session into the cache.
*
const std::vector<const opensaml::Assertion*>* tokens=NULL,
const std::multimap<std::string,Attribute*>* attributes=NULL
)=0;
+#endif
/**
* Locates an existing session.
virtual void remove(const char* key, const Application& application, const char* client_addr)=0;
};
- /** SessionCache implementation that delegates to a remoted version. */
- #define REMOTED_SESSION_CACHE "Remoted"
-
+#ifndef SHIBSP_LITE
/** SessionCache implementation backed by a StorageService. */
#define STORAGESERVICE_SESSION_CACHE "StorageService"
+#endif
+
+ /** SessionCache implementation for lite builds that delegates to a remoted version. */
+ #define REMOTED_SESSION_CACHE "Remoted"
/**
* Registers SessionCache classes into the runtime.
#include "internal.h"
#include "SPConfig.h"
-#include "attribute/AttributeDecoder.h"
+#ifndef SHIBSP_LITE
+# include "attribute/AttributeDecoder.h"
+#endif
#include "attribute/SimpleAttribute.h"
#include "attribute/ScopedAttribute.h"
#include "attribute/NameIDAttribute.h"
return new NameIDAttribute(in);
}
+#ifndef SHIBSP_LITE
SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory StringAttributeDecoderFactory;
SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory ScopedAttributeDecoderFactory;
SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory NameIDAttributeDecoderFactory;
static const XMLCh _NameIDAttributeDecoder[] = UNICODE_LITERAL_22(N,a,m,e,I,D,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
static const XMLCh caseSensitive[] = UNICODE_LITERAL_13(c,a,s,e,S,e,n,s,i,t,i,v,e);
+#endif
};
+#ifndef SHIBSP_LITE
QName shibsp::StringAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _StringAttributeDecoder);
QName shibsp::ScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _ScopedAttributeDecoder);
QName shibsp::NameIDAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDAttributeDecoder);
conf.AttributeDecoderManager.registerFactory(NameIDAttributeDecoderType, NameIDAttributeDecoderFactory);
}
+AttributeDecoder::AttributeDecoder(const DOMElement *e) : m_caseSensitive(true)
+{
+ if (e) {
+ const XMLCh* flag = e->getAttributeNS(NULL,caseSensitive);
+ if (flag && (*flag == chLatin_f || *flag == chDigit_0))
+ m_caseSensitive = false;
+ }
+}
+#endif
+
void shibsp::registerAttributeFactories()
{
Attribute::registerFactory("", SimpleAttributeFactory);
throw AttributeException("No registered factory for Attribute of type ($1).", xmltooling::params(1,in.name()));
return (i->second)(in);
}
-
-AttributeDecoder::AttributeDecoder(const DOMElement *e) : m_caseSensitive(true)
-{
- if (e) {
- const XMLCh* flag = e->getAttributeNS(NULL,caseSensitive);
- if (flag && (*flag == chLatin_f || *flag == chDigit_0))
- m_caseSensitive = false;
- }
-}
#define __shibsp_extractor_h__
#include <shibsp/base.h>
-
-#include <saml/saml2/metadata/Metadata.h>
#include <xmltooling/Lockable.h>
+#include <saml/saml2/metadata/Metadata.h>
namespace shibsp {
class SHIBSP_API Application;
class SHIBSP_API Attribute;
- class SHIBSP_API SPRequest;
/**
* A service that extracts and decodes attributes from XML objects.
const xmltooling::XMLObject& xmlObject,
std::multimap<std::string,Attribute*>& attributes
) const=0;
-
- /**
- * Clears possible HTTP request headers that might be populated
- * during attribute export.
- *
- * @param request the SP request being processed
- */
- virtual void clearHeaders(SPRequest& request) const=0;
};
/**
class SHIBSP_API Application;
class SHIBSP_API Attribute;
- class SHIBSP_API ResolutionContext;
class SHIBSP_API Session;
- class SHIBSP_API SPRequest;
+ class SHIBSP_API ResolutionContext;
#if defined (_MSC_VER)
#pragma warning( push )
* @throws AttributeResolutionException thrown if there is a problem resolving the attributes for the subject
*/
virtual void resolveAttributes(ResolutionContext& ctx) const=0;
-
- /**
- * Clears possible HTTP request headers that might be populated
- * during attribute export.
- *
- * @param request the SP request being processed
- */
- virtual void clearHeaders(SPRequest& request) const=0;
};
#if defined (_MSC_VER)
void resolveAttributes(ResolutionContext& ctx) const;
- void clearHeaders(SPRequest& request) const {
- for (vector<AttributeResolver*>::const_iterator i=m_resolvers.begin(); i!=m_resolvers.end(); ++i)
- (*i)->clearHeaders(request);
- }
-
private:
vector<AttributeResolver*> m_resolvers;
};
void resolveAttributes(ResolutionContext& ctx) const;
- void clearHeaders(SPRequest& request) const {
- // Doesn't have to do anything, the extractor is the only possibly source of attributes.
- }
-
private:
bool SAML1Query(QueryContext& ctx) const;
bool SAML2Query(QueryContext& ctx) const;
#include "internal.h"
#include "Application.h"
#include "ServiceProvider.h"
-#include "SPRequest.h"
#include "attribute/AttributeDecoder.h"
#include "attribute/resolver/AttributeExtractor.h"
#include "util/SPConstants.h"
const Application& application, const char* assertingParty, const saml2::Attribute& attr, multimap<string,Attribute*>& attributes
) const;
+ /*
void clearHeaders(SPRequest& request) const {
for (vector<string>::const_iterator i = m_attributeIds.begin(); i!=m_attributeIds.end(); ++i)
request.clearHeader(i->c_str());
}
+ */
private:
Category& m_log;
typedef map< pair<string,string>,pair<AttributeDecoder*,string> > attrmap_t;
#endif
attrmap_t m_attrMap;
- vector<string> m_attributeIds;
+ //vector<string> m_attributeIds;
};
class XMLExtractor : public AttributeExtractor, public ReloadableXMLFile
const Application& application, const RoleDescriptor* issuer, const XMLObject& xmlObject, multimap<string,Attribute*>& attributes
) const;
+ /*
void clearHeaders(SPRequest& request) const {
if (m_impl)
m_impl->clearHeaders(request);
}
+ */
protected:
pair<bool,DOMElement*> load();
decl.first = decoder;
decl.second = id.get();
- m_attributeIds.push_back(id.get());
+ //m_attributeIds.push_back(id.get());
child = XMLHelper::getNextSiblingElement(child, shibspconstants::SHIB2ATTRIBUTEMAP_NS, saml1::Attribute::LOCAL_NAME);
}
#ifndef __shibsp_base_h__
#define __shibsp_base_h__
-#include <saml/base.h>
+#ifdef SHIBSP_LITE
+# define XMLTOOLING_LITE
+# include <xmltooling/base.h>
+#else
+# include <saml/base.h>
+#endif
// Windows and GCC4 Symbol Visibility Macros
#ifdef WIN32
#define __shibsp_exceptions_h__
#include <shibsp/base.h>
-#include <saml/exceptions.h>
+#ifndef SHIBSP_LITE
+# include <saml/exceptions.h>
+#else
+# include <xmltooling/exceptions.h>
+#endif
namespace shibsp {
};
+#ifdef SHIBSP_LITE
+namespace opensaml {
+ DECL_XMLTOOLING_EXCEPTION(SecurityPolicyException,SHIBSP_EXCEPTIONAPI(SHIBSP_API),opensaml,xmltooling::XMLToolingException,Exceptions in security policy processing);
+ DECL_XMLTOOLING_EXCEPTION(ProfileException,SHIBSP_EXCEPTIONAPI(SHIBSP_API),opensaml,xmltooling::ValidationException,Exceptions in SAML profile processing);
+ DECL_XMLTOOLING_EXCEPTION(FatalProfileException,SHIBSP_EXCEPTIONAPI(SHIBSP_API),opensaml,ProfileException,Fatal exceptions in SAML profile processing);
+ DECL_XMLTOOLING_EXCEPTION(RetryableProfileException,SHIBSP_EXCEPTIONAPI(SHIBSP_API),opensaml,ProfileException,Non-fatal exceptions in SAML profile processing);
+
+ namespace saml2md {
+ DECL_XMLTOOLING_EXCEPTION(MetadataException,SHIBSP_EXCEPTIONAPI(SHIBSP_API),opensaml::saml2md,xmltooling::XMLToolingException,Exceptions related to metadata use);
+ };
+};
+#endif
+
#endif /* __shibsp_exceptions_h__ */
#include <shibsp/util/DOMPropertySet.h>
#include <log4cpp/Category.hh>
-#include <saml/binding/HTTPRequest.h>
-#include <saml/binding/HTTPResponse.h>
+
#include <xmltooling/XMLObject.h>
+#include <xmltooling/io/HTTPRequest.h>
+#include <xmltooling/io/HTTPResponse.h>
namespace shibsp {
const std::map<std::string,std::string>* remapper=NULL
);
+#ifndef SHIBSP_LITE
/**
* Examines a protocol response message for errors and raises an annotated exception
* if an error is found.
* @param response a response message of some known protocol
*/
virtual void checkError(const xmltooling::XMLObject* response) const;
-
+#endif
+
/**
* Implements various mechanisms to preserve RelayState,
* such as cookies or StorageService-backed keys.
* @param response outgoing HTTP response
* @param relayState RelayState token to supply with message
*/
- virtual void preserveRelayState(const Application& application, opensaml::HTTPResponse& response, std::string& relayState) const;
+ virtual void preserveRelayState(const Application& application, xmltooling::HTTPResponse& response, std::string& relayState) const;
/**
* Implements various mechanisms to recover RelayState,
* @param clear true iff the token state should be cleared
*/
virtual void recoverRelayState(
- const Application& application, opensaml::HTTPRequest& request, std::string& relayState, bool clear=true
+ const Application& application, xmltooling::HTTPRequest& request, std::string& relayState, bool clear=true
) const;
/** Logging object. */
#include <shibsp/handler/AbstractHandler.h>
#include <shibsp/handler/RemotedHandler.h>
-#include <saml/binding/MessageDecoder.h>
-#include <saml/saml2/metadata/Metadata.h>
+#ifndef SHIBSP_LITE
+# include <saml/binding/MessageDecoder.h>
+# include <saml/saml2/metadata/Metadata.h>
+#endif
+#include <xmltooling/unicode.h>
namespace shibsp {
+ class SHIBSP_API Attribute;
class SHIBSP_API ResolutionContext;
#if defined (_MSC_VER)
*/
AssertionConsumerService(const xercesc::DOMElement* e, const char* appId, log4cpp::Category& log);
+#ifndef SHIBSP_LITE
/**
* Implement protocol-specific handling of the incoming decoded message.
*
*/
virtual std::string implementProtocol(
const Application& application,
- const opensaml::HTTPRequest& httpRequest,
+ const xmltooling::HTTPRequest& httpRequest,
opensaml::SecurityPolicy& policy,
const PropertySet* settings,
const xmltooling::XMLObject& xmlObject
) const=0;
-
- /**
- * Enforce address checking requirements.
- *
- * @param application reference to application receiving message
- * @param httpRequest client request that initiated session
- * @param issuedTo address for which security assertion was issued
- */
- void checkAddress(
- const Application& application, const opensaml::HTTPRequest& httpRequest, const char* issuedTo
- ) const;
-
+
/**
* Attempt SSO-initiated attribute resolution using the supplied information.
*
const std::vector<const opensaml::Assertion*>* tokens=NULL,
const std::multimap<std::string,Attribute*>* attributes=NULL
) const;
+#endif
+
+ /**
+ * Enforce address checking requirements.
+ *
+ * @param application reference to application receiving message
+ * @param httpRequest client request that initiated session
+ * @param issuedTo address for which security assertion was issued
+ */
+ void checkAddress(
+ const Application& application, const xmltooling::HTTPRequest& httpRequest, const char* issuedTo
+ ) const;
private:
std::string processMessage(
const Application& application,
- opensaml::HTTPRequest& httpRequest,
+ xmltooling::HTTPRequest& httpRequest,
std::string& entityID,
std::string& relayState
) const;
void maintainHistory(SPRequest& request, const char* entityID, const char* cookieProps) const;
+#ifndef SHIBSP_LITE
opensaml::MessageDecoder* m_decoder;
- xmltooling::auto_ptr_char m_configNS;
xmltooling::QName m_role;
+#endif
+ xmltooling::auto_ptr_char m_configNS;
};
#if defined (_MSC_VER)
/** Registers Handler implementations. */
void SHIBSP_API registerHandlers();
-
- /** SessionInitiator that iterates through a set of protocol-specific versions. */
- #define CHAINING_SESSION_INITIATOR "Chaining"
-
- /** SessionInitiator that supports Shibboleth V1 AuthnRequest redirects. */
- #define SHIB1_SESSION_INITIATOR "Shibboleth"
};
#endif /* __shibsp_handler_h__ */
* @return a pair containing a "request completed" indicator and a server-specific response code
*/
virtual std::pair<bool,long> unwrap(SPRequest& request, DDF& out) const;
-
+
/**
* Builds a new request instance around a remoted data object.
*
* @param in the dataflow object containing the remoted request
* @return a call-specific request object based on the input, to be freed by the caller
*/
- opensaml::HTTPRequest* getRequest(DDF& in) const;
+ xmltooling::HTTPRequest* getRequest(DDF& in) const;
/**
* Builds a new response instance around an outgoing data object.
* @param out the dataflow object to be returned by the caller
* @return a call-specific response object, to be freed by the caller
*/
- opensaml::HTTPResponse* getResponse(DDF& out) const;
-
+ xmltooling::HTTPResponse* getResponse(DDF& out) const;
+
/** Message address for remote half. */
std::string m_address;
};
#include "handler/AbstractHandler.h"
#include "remoting/ListenerService.h"
-#include <saml/SAMLConfig.h>
-#include <saml/binding/SAMLArtifact.h>
-#include <saml/saml1/core/Protocols.h>
-#include <saml/saml2/core/Protocols.h>
-#include <saml/util/SAMLConstants.h>
+#ifndef SHIBSP_LITE
+# include <saml/SAMLConfig.h>
+# include <saml/binding/SAMLArtifact.h>
+# include <saml/saml1/core/Protocols.h>
+# include <saml/saml2/core/Protocols.h>
+# include <saml/util/SAMLConstants.h>
+# include <xmltooling/util/StorageService.h>
+#else
+# include "lite/SAMLConstants.h"
+#endif
+
#include <xmltooling/XMLToolingConfig.h>
-#include <xmltooling/util/StorageService.h>
#include <xmltooling/util/URLEncoder.h>
using namespace shibsp;
load(e,log,filter,remapper);
}
+#ifndef SHIBSP_LITE
void AbstractHandler::checkError(const XMLObject* response) const
{
const saml2p::StatusResponseType* r2 = dynamic_cast<const saml2p::StatusResponseType*>(response);
}
}
}
+#endif
void AbstractHandler::preserveRelayState(const Application& application, HTTPResponse& response, string& relayState) const
{
mech.second+=3;
if (*mech.second) {
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
+#ifndef SHIBSP_LITE
StorageService* storage = application.getServiceProvider().getStorageService(mech.second);
if (storage) {
string rsKey;
m_log.error("Storage-backed RelayState with invalid StorageService ID (%s)", mech.second);
relayState.erase();
}
+#endif
}
else if (SPConfig::getConfig().isEnabled(SPConfig::InProcess)) {
DDF out,in = DDF("set::RelayState").structure();
key++;
if (!ssid.empty() && *key) {
if (conf.isEnabled(SPConfig::OutOfProcess)) {
+#ifndef SHIBSP_LITE
StorageService* storage = conf.getServiceProvider()->getStorageService(ssid.c_str());
if (storage) {
if (storage->readString("RelayState",key,&relayState)>0) {
);
relayState.erase();
}
+#endif
}
else if (conf.isEnabled(SPConfig::InProcess)) {
DDF out,in = DDF("get::RelayState").structure();
#include "Application.h"
#include "exceptions.h"
#include "ServiceProvider.h"
-#include "attribute/resolver/AttributeResolver.h"
-#include "attribute/resolver/ResolutionContext.h"
#include "handler/AssertionConsumerService.h"
-#include "security/SecurityPolicy.h"
#include "util/SPConstants.h"
-#include <saml/SAMLConfig.h>
-#include <saml/saml1/core/Assertions.h>
-#include <saml/util/CommonDomainCookie.h>
+# include <ctime>
+#ifndef SHIBSP_LITE
+# include "attribute/resolver/AttributeResolver.h"
+# include "attribute/resolver/ResolutionContext.h"
+# include "security/SecurityPolicy.h"
+# include <saml/SAMLConfig.h>
+# include <saml/saml1/core/Assertions.h>
+# include <saml/util/CommonDomainCookie.h>
+using namespace samlconstants;
+#else
+# include "lite/CommonDomainCookie.h"
+#endif
using namespace shibspconstants;
-using namespace samlconstants;
using namespace shibsp;
using namespace opensaml;
using namespace xmltooling;
using namespace std;
AssertionConsumerService::AssertionConsumerService(const DOMElement* e, const char* appId, Category& log)
- : AbstractHandler(e, log), m_decoder(NULL), m_configNS(SHIB2SPCONFIG_NS),
- m_role(samlconstants::SAML20MD_NS, opensaml::saml2md::IDPSSODescriptor::LOCAL_NAME)
+ : AbstractHandler(e, log),
+#ifndef SHIBSP_LITE
+ m_decoder(NULL), m_role(samlconstants::SAML20MD_NS, opensaml::saml2md::IDPSSODescriptor::LOCAL_NAME),
+#endif
+ m_configNS(SHIB2SPCONFIG_NS)
+
{
string address(appId);
address += getString("Location").second;
address += "::run::ACS";
setAddress(address.c_str());
+#ifndef SHIBSP_LITE
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
m_decoder = SAMLConfig::getConfig().MessageDecoderManager.newPlugin(getString("Binding").second,e);
m_decoder->setArtifactResolver(SPConfig::getConfig().getArtifactResolver());
}
+#endif
}
AssertionConsumerService::~AssertionConsumerService()
{
+#ifndef SHIBSP_LITE
delete m_decoder;
+#endif
}
pair<bool,long> AssertionConsumerService::run(SPRequest& request, bool isHandler) const
const Application& application, HTTPRequest& httpRequest, string& entityID, string& relayState
) const
{
+#ifndef SHIBSP_LITE
// Locate policy key.
pair<bool,const char*> policyId = getString("policyId", m_configNS.get()); // namespace-qualified if inside handler element
if (!policyId.first)
entityID = issuer.get();
return key;
+#else
+ throw ConfigurationException("Cannot process message using lite version of shibsp library.");
+#endif
}
pair<bool,long> AssertionConsumerService::sendRedirect(
}
}
+#ifndef SHIBSP_LITE
ResolutionContext* AssertionConsumerService::resolveAttributes(
const Application& application,
const saml2md::EntityDescriptor* issuer,
return NULL;
}
+#endif
void AssertionConsumerService::maintainHistory(SPRequest& request, const char* entityID, const char* cookieProps) const
{
#include <algorithm>
#include <log4cpp/Category.hh>
-#include <saml/util/CGIParser.h>
#include <xmltooling/unicode.h>
-#include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
-#include <xsec/enc/XSECCryptoException.hpp>
-#include <xsec/framework/XSECException.hpp>
-#include <xsec/framework/XSECProvider.hpp>
+
+#ifndef SHIBSP_LITE
+# include <saml/util/CGIParser.h>
+# include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
+# include <xsec/enc/XSECCryptoException.hpp>
+# include <xsec/framework/XSECException.hpp>
+# include <xsec/framework/XSECProvider.hpp>
+#endif
using namespace shibsp;
using namespace opensaml;
using namespace xercesc;
using namespace std;
+#ifndef SHIBSP_LITE
namespace shibsp {
- class SHIBSP_DLLLOCAL RemotedRequest : public virtual opensaml::HTTPRequest
+ class SHIBSP_DLLLOCAL RemotedRequest : public virtual HTTPRequest
{
DDF& m_input;
mutable CGIParser* m_parser;
}
};
- class SHIBSP_DLLLOCAL RemotedResponse : public virtual opensaml::HTTPResponse
+ class SHIBSP_DLLLOCAL RemotedResponse : public virtual HTTPResponse
{
DDF& m_output;
public:
if (!m_output.isstruct())
m_output.structure();
m_output.addmember("redirect").string(url);
- return HTTPResponse::SAML_HTTP_STATUS_MOVED;
+ return HTTPResponse::XMLTOOLING_HTTP_STATUS_MOVED;
}
+#endif
void RemotedHandler::setAddress(const char* address)
{
}
if (certs) {
+#ifndef SHIBSP_LITE
const vector<XSECCryptoX509*>& xvec = request.getClientCertificates();
if (!xvec.empty()) {
DDF clist = in.addmember("certificates").list();
clist.add(x509);
}
}
+#else
+ const vector<string>& xvec = request.getClientCertificates();
+ if (!xvec.empty()) {
+ DDF clist = in.addmember("certificates").list();
+ for (vector<string>::const_iterator x = xvec.begin(); x!=xvec.end(); ++x) {
+ DDF x509 = DDF(NULL).string(x->c_str());
+ clist.add(x509);
+ }
+ }
+#endif
}
return in;
h = out["response"];
if (h.isstruct()) {
istringstream s(h["data"].string());
- return make_pair(true, static_cast<GenericResponse&>(request).sendResponse(s, h["status"].integer()));
+ return make_pair(true, request.sendResponse(s, h["status"].integer()));
}
return make_pair(false,0);
}
HTTPRequest* RemotedHandler::getRequest(DDF& in) const
{
+#ifndef SHIBSP_LITE
return new RemotedRequest(in);
+#else
+ throw ConfigurationException("Cannot process message using lite version of shibsp library.");
+#endif
}
HTTPResponse* RemotedHandler::getResponse(DDF& out) const
{
+#ifndef SHIBSP_LITE
return new RemotedResponse(out);
+#else
+ throw ConfigurationException("Cannot process message using lite version of shibsp library.");
+#endif
}
*/
#include "internal.h"
-#include "Application.h"
-#include "exceptions.h"
-#include "ServiceProvider.h"
-#include "SessionCache.h"
-#include "attribute/Attribute.h"
-#include "attribute/filtering/AttributeFilter.h"
-#include "attribute/filtering/BasicFilteringContext.h"
-#include "attribute/resolver/AttributeExtractor.h"
-#include "attribute/resolver/ResolutionContext.h"
#include "handler/AssertionConsumerService.h"
-#include <saml/saml1/core/Assertions.h>
-#include <saml/saml1/core/Protocols.h>
-#include <saml/saml1/profile/BrowserSSOProfileValidator.h>
-#include <saml/saml2/metadata/Metadata.h>
-
-using namespace shibsp;
+#ifndef SHIBSP_LITE
+# include "exceptions.h"
+# include "Application.h"
+# include "ServiceProvider.h"
+# include "SessionCache.h"
+# include "attribute/Attribute.h"
+# include "attribute/filtering/AttributeFilter.h"
+# include "attribute/filtering/BasicFilteringContext.h"
+# include "attribute/resolver/AttributeExtractor.h"
+# include "attribute/resolver/ResolutionContext.h"
+# include <saml/saml1/core/Assertions.h>
+# include <saml/saml1/core/Protocols.h>
+# include <saml/saml1/profile/BrowserSSOProfileValidator.h>
+# include <saml/saml2/metadata/Metadata.h>
using namespace opensaml::saml1;
using namespace opensaml::saml1p;
using namespace opensaml;
-using namespace xmltooling;
-using namespace log4cpp;
-using namespace std;
using saml2::NameID;
using saml2::NameIDBuilder;
using saml2md::EntityDescriptor;
+#else
+# include "lite/SAMLConstants.h"
+#endif
+
+using namespace shibsp;
+using namespace xmltooling;
+using namespace log4cpp;
+using namespace std;
namespace shibsp {
public:
SAML1Consumer(const DOMElement* e, const char* appId)
: AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT".SAML1")) {
+#ifndef SHIBSP_LITE
m_post = XMLString::equals(getString("Binding").second, samlconstants::SAML1_PROFILE_BROWSER_POST);
+#endif
}
virtual ~SAML1Consumer() {}
private:
+#ifndef SHIBSP_LITE
string implementProtocol(
const Application& application,
const HTTPRequest& httpRequest,
const PropertySet* settings,
const XMLObject& xmlObject
) const;
-
bool m_post;
+#endif
};
#if defined (_MSC_VER)
};
+#ifndef SHIBSP_LITE
+
string SAML1Consumer::implementProtocol(
const Application& application,
const HTTPRequest& httpRequest,
throw;
}
}
+
+#endif
*/
#include "internal.h"
-#include "Application.h"
-#include "exceptions.h"
-#include "ServiceProvider.h"
-#include "SessionCache.h"
-#include "attribute/Attribute.h"
-#include "attribute/filtering/AttributeFilter.h"
-#include "attribute/filtering/BasicFilteringContext.h"
-#include "attribute/resolver/AttributeExtractor.h"
-#include "attribute/resolver/ResolutionContext.h"
#include "handler/AssertionConsumerService.h"
-#include <saml/saml2/core/Protocols.h>
-#include <saml/saml2/profile/BrowserSSOProfileValidator.h>
-#include <saml/saml2/metadata/Metadata.h>
-#include <saml/saml2/metadata/MetadataCredentialCriteria.h>
-
-using namespace shibsp;
+#ifndef SHIBSP_LITE
+# include "exceptions.h"
+# include "Application.h"
+# include "ServiceProvider.h"
+# include "SessionCache.h"
+# include "attribute/Attribute.h"
+# include "attribute/filtering/AttributeFilter.h"
+# include "attribute/filtering/BasicFilteringContext.h"
+# include "attribute/resolver/AttributeExtractor.h"
+# include "attribute/resolver/ResolutionContext.h"
+# include <saml/saml2/core/Protocols.h>
+# include <saml/saml2/profile/BrowserSSOProfileValidator.h>
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
using namespace opensaml::saml2;
using namespace opensaml::saml2p;
using namespace opensaml::saml2md;
using namespace opensaml;
+#endif
+
+using namespace shibsp;
using namespace xmltooling;
using namespace log4cpp;
using namespace std;
{
public:
SAML2Consumer(const DOMElement* e, const char* appId)
- : AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT".SAML2")) {
+ : AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT".SAML2")) {
}
virtual ~SAML2Consumer() {}
private:
+#ifndef SHIBSP_LITE
string implementProtocol(
const Application& application,
const HTTPRequest& httpRequest,
const PropertySet* settings,
const XMLObject& xmlObject
) const;
+#endif
};
#if defined (_MSC_VER)
};
+#ifndef SHIBSP_LITE
+
string SAML2Consumer::implementProtocol(
const Application& application,
const HTTPRequest& httpRequest,
throw;
}
}
+
+#endif
#include "handler/SessionInitiator.h"
#include "util/SPConstants.h"
-#include <saml/SAMLConfig.h>
-#include <saml/binding/MessageEncoder.h>
-#include <saml/saml2/core/Protocols.h>
-#include <saml/saml2/metadata/EndpointManager.h>
-#include <saml/saml2/metadata/Metadata.h>
-#include <saml/saml2/metadata/MetadataCredentialCriteria.h>
-
-using namespace shibsp;
+#ifndef SHIBSP_LITE
+# include <saml/SAMLConfig.h>
+# include <saml/binding/MessageEncoder.h>
+# include <saml/saml2/core/Protocols.h>
+# include <saml/saml2/metadata/EndpointManager.h>
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
using namespace opensaml::saml2;
using namespace opensaml::saml2p;
using namespace opensaml::saml2md;
+#endif
+
+using namespace shibsp;
using namespace opensaml;
using namespace xmltooling;
using namespace log4cpp;
public:
SAML2SessionInitiator(const DOMElement* e, const char* appId);
virtual ~SAML2SessionInitiator() {
+#ifndef SHIBSP_LITE
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
XMLString::release(&m_outgoing);
for_each(m_encoders.begin(), m_encoders.end(), cleanup_pair<const XMLCh*,MessageEncoder>());
delete m_requestTemplate;
}
+#endif
}
void setParent(const PropertySet* parent);
) const;
string m_appId;
+#ifndef SHIBSP_LITE
XMLCh* m_outgoing;
vector<const XMLCh*> m_bindings;
map<const XMLCh*,MessageEncoder*> m_encoders;
AuthnRequest* m_requestTemplate;
+#endif
};
#if defined (_MSC_VER)
};
SAML2SessionInitiator::SAML2SessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator")), m_appId(appId), m_outgoing(NULL), m_requestTemplate(NULL)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator")), m_appId(appId)
{
+#ifndef SHIBSP_LITE
+ m_outgoing=NULL;
+ m_requestTemplate=NULL;
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
// Check for a template AuthnRequest to build from.
DOMElement* child = XMLHelper::getFirstChildElement(e, samlconstants::SAML20P_NS, AuthnRequest::LOCAL_NAME);
break;
}
}
+#endif
// If Location isn't set, defer address registration until the setParent call.
pair<bool,const char*> loc = getString("Location");
string& relayState
) const
{
+#ifndef SHIBSP_LITE
// Use metadata to locate the IdP's SSO service.
MetadataProvider* m=app.getMetadataProvider();
Locker locker(m);
long ret = encoder->encode(httpResponse, req.get(), dest.get(), entityID, relayState.c_str());
req.release(); // freed by encoder
return make_pair(true,ret);
+#else
+ return make_pair(false,0);
+#endif
}
#include "handler/SessionInitiator.h"
#include "util/SPConstants.h"
-#include <saml/saml2/metadata/Metadata.h>
-#include <saml/saml2/metadata/EndpointManager.h>
+#ifndef SHIBSP_LITE
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/EndpointManager.h>
+#endif
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/URLEncoder.h>
const char* acsLocation,
string& relayState
) const;
-
string m_appId;
};
string& relayState
) const
{
+#ifndef SHIBSP_LITE
// Use metadata to invoke the SSO service directly.
MetadataProvider* m=app.getMetadataProvider();
Locker locker(m);
const EntityDescriptor* entity=m->getEntityDescriptor(entityID);
- if (!entity) {\r
- m_log.error("unable to locate metadata for provider (%s)", entityID);\r
- throw MetadataException("Unable to locate metadata for identity provider ($entityID)",\r
- namedparams(1, "entityID", entityID));\r
- }\r
+ if (!entity) {
+ m_log.error("unable to locate metadata for provider (%s)", entityID);
+ throw MetadataException("Unable to locate metadata for identity provider ($entityID)",
+ namedparams(1, "entityID", entityID));
+ }
const IDPSSODescriptor* role=entity->getIDPSSODescriptor(shibspconstants::SHIB1_PROTOCOL_ENUM);
if (!role) {
m_log.error("unable to locate Shibboleth-aware identity provider role for provider (%s)", entityID);
"&providerId=" + urlenc->encode(app.getString("entityID").second);
return make_pair(true, httpResponse.sendRedirect(req.c_str()));
+#else
+ return make_pair(false,0);
+#endif
}
#include "handler/AbstractHandler.h"
#include "handler/SessionInitiator.h"
+#include <ctime>
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/URLEncoder.h>
#include "exceptions.h"\r
#include "ServiceProvider.h"\r
#include "SessionCache.h"\r
-#include "TransactionLog.h"\r
#include "attribute/Attribute.h"\r
#include "remoting/ListenerService.h"\r
#include "util/SPConstants.h"\r
\r
+#include <ctime>\r
#include <sstream>\r
#include <log4cpp/Category.hh>\r
#include <xmltooling/XMLToolingConfig.h>\r
+#include <xmltooling/util/DateTime.h>\r
#include <xmltooling/util/NDC.h>\r
#include <xmltooling/util/XMLHelper.h>\r
\r
using namespace shibsp;\r
-using namespace opensaml::saml2md;\r
-using namespace opensaml;\r
using namespace xmltooling;\r
using namespace log4cpp;\r
using namespace std;\r
{\r
public:\r
RemotedSession(RemotedCache* cache, DDF& obj) : m_version(obj["version"].integer()), m_obj(obj),\r
- m_nameid(NULL), m_expires(0), m_lastAccess(time(NULL)), m_cache(cache), m_lock(NULL) {\r
- const char* nameid = obj["nameid"].string();\r
- if (nameid) {\r
- // Parse and bind the NameID into an XMLObject.\r
- istringstream instr(nameid);\r
- DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(instr); \r
- XercesJanitor<DOMDocument> janitor(doc);\r
- auto_ptr<saml2::NameID> n(saml2::NameIDBuilder::buildNameID());\r
- n->unmarshall(doc->getDocumentElement(), true);\r
- janitor.release();\r
- m_nameid = n.release();\r
- }\r
- \r
+ m_expires(0), m_lastAccess(time(NULL)), m_cache(cache), m_lock(NULL) {\r
auto_ptr_XMLCh exp(m_obj["expires"].string());\r
if (exp.get()) {\r
DateTime iso(exp.get());\r
~RemotedSession() {\r
delete m_lock;\r
m_obj.destroy();\r
- delete m_nameid;\r
for_each(m_attributes.begin(), m_attributes.end(), cleanup_pair<string,Attribute>());\r
- for_each(m_tokens.begin(), m_tokens.end(), cleanup_pair<string,Assertion>());\r
}\r
\r
Lockable* lock() {\r
const char* getAuthnInstant() const {\r
return m_obj["authn_instant"].string();\r
}\r
- const opensaml::saml2::NameID* getNameID() const {\r
- return m_nameid;\r
- }\r
const char* getSessionIndex() const {\r
return m_obj["session_index"].string();\r
}\r
return m_ids;\r
}\r
\r
- const Assertion* getAssertion(const char* id) const;\r
-\r
- void addAttributes(const vector<Attribute*>& attributes) {\r
- throw ConfigurationException("addAttributes method not implemented by this session cache plugin.");\r
- }\r
- void addAssertion(Assertion* assertion) {\r
- throw ConfigurationException("addAssertion method not implemented by this session cache plugin.");\r
- }\r
-\r
time_t expires() const { return m_expires; }\r
time_t lastAccess() const { return m_lastAccess; }\r
void validate(const Application& application, const char* client_addr, time_t timeout, bool local=true);\r
\r
int m_version;\r
mutable DDF m_obj;\r
- saml2::NameID* m_nameid;\r
mutable multimap<string,Attribute*> m_attributes;\r
mutable vector<const char*> m_ids;\r
- mutable map<string,Assertion*> m_tokens;\r
time_t m_expires,m_lastAccess;\r
RemotedCache* m_cache;\r
Mutex* m_lock;\r
RemotedCache(const DOMElement* e);\r
~RemotedCache();\r
\r
- string insert(\r
- time_t expires,\r
- const Application& application,\r
- const char* client_addr=NULL,\r
- const saml2md::EntityDescriptor* issuer=NULL,\r
- const saml2::NameID* nameid=NULL,\r
- const char* authn_instant=NULL,\r
- const char* session_index=NULL,\r
- const char* authncontext_class=NULL,\r
- const char* authncontext_decl=NULL,\r
- const vector<const Assertion*>* tokens=NULL,\r
- const multimap<string,Attribute*>* attributes=NULL\r
- );\r
Session* find(const char* key, const Application& application, const char* client_addr=NULL, time_t timeout=0);\r
void remove(const char* key, const Application& application, const char* client_addr);\r
\r
}\r
}\r
\r
-const Assertion* RemotedSession::getAssertion(const char* id) const\r
-{\r
- map<string,Assertion*>::const_iterator i = m_tokens.find(id);\r
- if (i!=m_tokens.end())\r
- return i->second;\r
-\r
- // Fetch from remoted cache.\r
- DDF in("getAssertion::"REMOTED_SESSION_CACHE"::SessionCache");\r
- DDFJanitor jin(in);\r
- in.structure();\r
- in.addmember("key").string(m_obj.name());\r
- in.addmember("id").string(id);\r
-\r
- DDF out=SPConfig::getConfig().getServiceProvider()->getListenerService()->send(in);\r
- DDFJanitor jout(out);\r
- \r
- // Parse and bind the document into an XMLObject.\r
- istringstream instr(out.string());\r
- DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(instr); \r
- XercesJanitor<DOMDocument> janitor(doc);\r
- auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));\r
- janitor.release();\r
- \r
- Assertion* token = dynamic_cast<Assertion*>(xmlObject.get());\r
- if (!token)\r
- throw FatalProfileException("Cached assertion was of an unknown object type.");\r
-\r
- // Transfer ownership to us.\r
- xmlObject.release();\r
- m_tokens[id]=token;\r
- return token;\r
-}\r
-\r
void RemotedSession::validate(const Application& application, const char* client_addr, time_t timeout, bool local)\r
{\r
// Basic expiration?\r
time_t now = time(NULL);\r
if (now > m_expires) {\r
m_cache->m_log.info("session expired (ID: %s)", m_obj.name());\r
- throw RetryableProfileException("Your session has expired, and you must re-authenticate.");\r
+ throw opensaml::RetryableProfileException("Your session has expired, and you must re-authenticate.");\r
}\r
\r
// Address check?\r
m_cache->m_log.debug("comparing client address %s against %s", client_addr, getClientAddress());\r
if (strcmp(getClientAddress(),client_addr)) {\r
m_cache->m_log.warn("client address mismatch");\r
- throw RetryableProfileException(\r
+ throw opensaml::RetryableProfileException(\r
"Your IP address ($1) does not match the address recorded at the time the session was established.",\r
params(1,client_addr)\r
);\r
delete shutdown_wait;\r
}\r
\r
-string RemotedCache::insert(\r
- time_t expires,\r
- const Application& application,\r
- const char* client_addr,\r
- const saml2md::EntityDescriptor* issuer,\r
- const saml2::NameID* nameid,\r
- const char* authn_instant,\r
- const char* session_index,\r
- const char* authncontext_class,\r
- const char* authncontext_decl,\r
- const vector<const Assertion*>* tokens,\r
- const multimap<string,Attribute*>* attributes\r
- )\r
-{\r
- DDF in("insert::"REMOTED_SESSION_CACHE"::SessionCache");\r
- DDFJanitor jin(in);\r
- in.structure();\r
- if (expires) {\r
-#ifndef HAVE_GMTIME_R\r
- struct tm* ptime=gmtime(&expires);\r
-#else\r
- struct tm res;\r
- struct tm* ptime=gmtime_r(&expires,&res);\r
-#endif\r
- char timebuf[32];\r
- strftime(timebuf,32,"%Y-%m-%dT%H:%M:%SZ",ptime);\r
- in.addmember("expires").string(timebuf);\r
- }\r
- in.addmember("application_id").string(application.getId());\r
- if (client_addr)\r
- in.addmember("client_addr").string(client_addr);\r
- if (issuer) {\r
- auto_ptr_char provid(issuer->getEntityID());\r
- in.addmember("entity_id").string(provid.get());\r
- }\r
- if (authn_instant)\r
- in.addmember("authn_instant").string(authn_instant);\r
- if (session_index)\r
- in.addmember("session_index").string(session_index);\r
- if (authncontext_class)\r
- in.addmember("authncontext_class").string(authncontext_class);\r
- if (authncontext_decl)\r
- in.addmember("authncontext_decl").string(authncontext_decl);\r
- \r
- if (nameid) {\r
- ostringstream namestr;\r
- namestr << *nameid;\r
- in.addmember("nameid").string(namestr.str().c_str());\r
- }\r
-\r
- if (tokens) {\r
- in.addmember("assertions").list();\r
- in.addmember("tokens").list();\r
- for (vector<const Assertion*>::const_iterator t = tokens->begin(); t!=tokens->end(); ++t) {\r
- ostringstream tokenstr;\r
- tokenstr << *(*t);\r
- auto_ptr_char tokenid((*t)->getID());\r
- DDF tokid = DDF(NULL).string(tokenid.get());\r
- in["assertions"].add(tokid);\r
- DDF tok = DDF(tokenid.get()).string(tokenstr.str().c_str());\r
- in["tokens"].add(tok);\r
- }\r
- }\r
- \r
- if (attributes) {\r
- DDF attr;\r
- DDF attrs = in.addmember("attributes").list();\r
- for (multimap<string,Attribute*>::const_iterator a=attributes->begin(); a!=attributes->end(); ++a) {\r
- attr = a->second->marshall();\r
- attrs.add(attr);\r
- }\r
- }\r
-\r
- DDF out=application.getServiceProvider().getListenerService()->send(in);\r
- DDFJanitor jout(out);\r
- if (out["key"].isstring()) {\r
- // Transaction Logging\r
- auto_ptr_char name(nameid ? nameid->getName() : NULL);\r
- const char* pid = in["entity_id"].string();\r
- TransactionLog* xlog = application.getServiceProvider().getTransactionLog();\r
- Locker locker(xlog);\r
- xlog->log.infoStream() <<\r
- "New session (ID: " <<\r
- out["key"].string() <<\r
- ") with (applicationId: " <<\r
- application.getId() <<\r
- ") for principal from (IdP: " <<\r
- (pid ? pid : "none") <<\r
- ") at (ClientAddress: " <<\r
- (client_addr ? client_addr : "none") <<\r
- ") with (NameIdentifier: " <<\r
- (name.get() ? name.get() : "none") <<\r
- ")";\r
-\r
- if (attributes) {\r
- xlog->log.infoStream() <<\r
- "Cached the following attributes with session (ID: " <<\r
- out["key"].string() <<\r
- ") for (applicationId: " <<\r
- application.getId() <<\r
- ") {";\r
- for (multimap<string,Attribute*>::const_iterator a=attributes->begin(); a!=attributes->end(); ++a)\r
- xlog->log.infoStream() << "\t" << a->second->getId() << " (" << a->second->valueCount() << " values)";\r
- xlog->log.info("}");\r
- for_each(attributes->begin(), attributes->end(), cleanup_pair<string,Attribute>());\r
- }\r
-\r
- return out["key"].string();\r
- }\r
- throw RetryableProfileException("A remoted cache insertion operation did not return a usable session key.");\r
-}\r
-\r
Session* RemotedCache::find(const char* key, const Application& application, const char* client_addr, time_t timeout)\r
{\r
#ifdef _DEBUG\r
cache->cleanup();\r
return NULL;\r
}\r
-\r
-/* These are currently unimplemented.\r
-\r
-void RemotedSession::addAttributes(const vector<Attribute*>& attributes)\r
-{\r
- DDF in("addAttributes::"REMOTED_SESSION_CACHE);\r
- DDFJanitor jin(in);\r
- in.structure();\r
- in.addmember("key").string(m_key.c_str());\r
- in.addmember("application_id").string(m_appId.c_str());\r
-\r
- DDF attr;\r
- DDF attrs = in.addmember("attributes").list();\r
- for (vector<Attribute*>::const_iterator a=attributes.begin(); a!=attributes.end(); ++a) {\r
- attr = (*a)->marshall();\r
- attrs.add(attr);\r
- }\r
-\r
- attr=SPConfig::getConfig().getServiceProvider()->getListenerService()->send(in);\r
- DDFJanitor jout(attr);\r
- \r
- // Transfer ownership to us.\r
- m_attributes.insert(m_attributes.end(), attributes.begin(), attributes.end());\r
-}\r
-\r
-void RemotedSession::addAssertion(Assertion* assertion)\r
-{\r
- if (!assertion)\r
- throw FatalProfileException("Unknown object type passed to session cache for storage.");\r
-\r
- DDF in("addAssertion::"REMOTED_SESSION_CACHE);\r
- DDFJanitor jin(in);\r
- in.structure();\r
- in.addmember("key").string(m_key.c_str());\r
- in.addmember("application_id").string(m_appId.c_str());\r
- \r
- ostringstream os;\r
- os << *assertion;\r
- string token(os.str());\r
- auto_ptr_char tokenid(assertion->getID());\r
- in.addmember("assertion_id").string(tokenid.get());\r
- in.addmember("assertion").string(token.c_str());\r
-\r
- DDF out = SPConfig::getConfig().getServiceProvider()->getListenerService()->send(in);\r
- out.destroy();\r
- \r
- // Add to local record and token map.\r
- // Next attempt to find and lock session will refresh from remote store anyway.\r
- m_obj["assertions"].addmember(tokenid.get()).string(token.c_str());\r
- m_ids.clear();\r
- m_tokens[tokenid.get()] = assertion;\r
-}\r
-\r
-*/
\ No newline at end of file
#include "SessionCache.h"\r
#include "SPConfig.h"\r
#include "SPRequest.h"\r
-#include "TransactionLog.h"\r
-#include "attribute/filtering/AttributeFilter.h"\r
-#include "attribute/resolver/AttributeExtractor.h"\r
-#include "attribute/resolver/AttributeResolver.h"\r
#include "handler/SessionInitiator.h"\r
#include "remoting/ListenerService.h"\r
-#include "security/PKIXTrustEngine.h"\r
#include "util/DOMPropertySet.h"\r
#include "util/SPConstants.h"\r
\r
-#include <sys/types.h>\r
-#include <sys/stat.h>\r
#include <log4cpp/Category.hh>\r
#include <log4cpp/PropertyConfigurator.hh>\r
-#include <saml/SAMLConfig.h>\r
-#include <saml/binding/ArtifactMap.h>\r
-#include <saml/saml1/core/Assertions.h>\r
-#include <saml/saml2/metadata/ChainingMetadataProvider.h>\r
+#include <xercesc/util/XMLUniDefs.hpp>\r
#include <xmltooling/XMLToolingConfig.h>\r
-#include <xmltooling/security/ChainingTrustEngine.h>\r
#include <xmltooling/util/NDC.h>\r
#include <xmltooling/util/ReloadableXMLFile.h>\r
+#include <xmltooling/util/XMLHelper.h>\r
+\r
+#ifndef SHIBSP_LITE\r
+# include "TransactionLog.h"\r
+# include "attribute/filtering/AttributeFilter.h"\r
+# include "attribute/resolver/AttributeExtractor.h"\r
+# include "attribute/resolver/AttributeResolver.h"\r
+# include "security/PKIXTrustEngine.h"\r
+# include <saml/SAMLConfig.h>\r
+# include <saml/binding/ArtifactMap.h>\r
+# include <saml/saml1/core/Assertions.h>\r
+# include <saml/saml2/metadata/ChainingMetadataProvider.h>\r
+# include <xmltooling/security/ChainingTrustEngine.h>\r
#include <xmltooling/util/ReplayCache.h>\r
-\r
-using namespace shibsp;\r
using namespace opensaml::saml2;\r
using namespace opensaml::saml2md;\r
using namespace opensaml;\r
+#endif\r
+\r
+using namespace shibsp;\r
using namespace xmltooling;\r
using namespace log4cpp;\r
using namespace std;\r
const char* getId() const {return getString("id").second;}\r
const char* getHash() const {return m_hash.c_str();}\r
\r
+#ifndef SHIBSP_LITE\r
MetadataProvider* getMetadataProvider(bool required=true) const {\r
if (required && !m_base && !m_metadata)\r
throw ConfigurationException("No MetadataProvider available.");\r
AttributeResolver* getAttributeResolver() const {\r
return (!m_attrResolver && m_base) ? m_base->getAttributeResolver() : m_attrResolver;\r
}\r
- const set<string>& getRemoteUserAttributeIds() const {\r
- return (m_attributeIds.empty() && m_base) ? m_base->getRemoteUserAttributeIds() : m_attributeIds;\r
- }\r
CredentialResolver* getCredentialResolver() const {\r
return (!m_credResolver && m_base) ? m_base->getCredentialResolver() : m_credResolver;\r
}\r
const PropertySet* getRelyingParty(const EntityDescriptor* provider) const;\r
+ const vector<const XMLCh*>& getAudiences() const {\r
+ return (m_audiences.empty() && m_base) ? m_base->getAudiences() : m_audiences;\r
+ }\r
+#endif\r
+ const set<string>& getRemoteUserAttributeIds() const {\r
+ return (m_attributeIds.empty() && m_base) ? m_base->getRemoteUserAttributeIds() : m_attributeIds;\r
+ }\r
\r
const SessionInitiator* getDefaultSessionInitiator() const;\r
const SessionInitiator* getSessionInitiatorById(const char* id) const;\r
const vector<const Handler*>& getAssertionConsumerServicesByBinding(const XMLCh* binding) const;\r
const Handler* getHandler(const char* path) const;\r
\r
- const vector<const XMLCh*>& getAudiences() const {\r
- return (m_audiences.empty() && m_base) ? m_base->getAudiences() : m_audiences;\r
- }\r
-\r
// Provides filter to exclude special config elements.\r
short acceptNode(const DOMNode* node) const;\r
\r
const ServiceProvider* m_sp; // this is ok because its locking scope includes us\r
const XMLApplication* m_base;\r
string m_hash;\r
+#ifndef SHIBSP_LITE\r
MetadataProvider* m_metadata;\r
TrustEngine* m_trust;\r
AttributeExtractor* m_attrExtractor;\r
AttributeResolver* m_attrResolver;\r
CredentialResolver* m_credResolver;\r
vector<const XMLCh*> m_audiences;\r
+#endif\r
set<string> m_attributeIds;\r
\r
// manage handler objects\r
// maps unique ID strings to session initiators\r
map<string,const SessionInitiator*> m_sessionInitMap;\r
\r
+#ifndef SHIBSP_LITE\r
// RelyingParty properties\r
DOMPropertySet* m_partyDefault;\r
#ifdef HAVE_GOOD_STL\r
#else\r
map<const XMLCh*,PropertySet*> m_partyMap;\r
#endif\r
+#endif\r
};\r
\r
// Top-level configuration implementation\r
\r
RequestMapper* m_requestMapper;\r
map<string,Application*> m_appmap;\r
+#ifndef SHIBSP_LITE\r
map< string,pair< PropertySet*,vector<const SecurityPolicyRule*> > > m_policyMap;\r
+#endif\r
\r
// Provides filter to exclude special config elements.\r
short acceptNode(const DOMNode* node) const;\r
{\r
public:\r
XMLConfig(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT".Config")),\r
- m_impl(NULL), m_listener(NULL), m_sessionCache(NULL), m_tranLog(NULL) {\r
+ m_impl(NULL), m_listener(NULL), m_sessionCache(NULL)\r
+#ifndef SHIBSP_LITE\r
+ , m_tranLog(NULL)\r
+#endif\r
+ {\r
}\r
\r
void init() {\r
delete m_impl;\r
delete m_sessionCache;\r
delete m_listener;\r
+#ifndef SHIBSP_LITE\r
delete m_tranLog;\r
- XMLToolingConfig::getConfig().setReplayCache(NULL);\r
SAMLConfig::getConfig().setArtifactMap(NULL);\r
for_each(m_storage.begin(), m_storage.end(), cleanup_pair<string,StorageService>());\r
+#endif\r
+ XMLToolingConfig::getConfig().setReplayCache(NULL);\r
}\r
\r
// PropertySet\r
const DOMElement* getElement() const {return m_impl->getElement();}\r
\r
// ServiceProvider\r
+#ifndef SHIBSP_LITE\r
TransactionLog* getTransactionLog() const {\r
if (m_tranLog)\r
return m_tranLog;\r
}\r
return NULL;\r
}\r
+#endif\r
\r
ListenerService* getListenerService(bool required=true) const {\r
if (required && !m_listener)\r
return (i!=m_impl->m_appmap.end()) ? i->second : NULL;\r
}\r
\r
+#ifndef SHIBSP_LITE\r
const PropertySet* getPolicySettings(const char* id) const {\r
map<string,pair<PropertySet*,vector<const SecurityPolicyRule*> > >::const_iterator i = m_impl->m_policyMap.find(id);\r
if (i!=m_impl->m_policyMap.end())\r
return i->second.second;\r
throw ConfigurationException("Security Policy ($1) not found, check <SecurityPolicies> element.", params(1,id));\r
}\r
+#endif\r
\r
protected:\r
pair<bool,DOMElement*> load();\r
XMLConfigImpl* m_impl;\r
mutable ListenerService* m_listener;\r
mutable SessionCache* m_sessionCache;\r
+#ifndef SHIBSP_LITE\r
mutable TransactionLog* m_tranLog;\r
mutable map<string,StorageService*> m_storage;\r
+#endif\r
};\r
\r
#if defined (_MSC_VER)\r
static const XMLCh _AttributeExtractor[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,E,x,t,r,a,c,t,o,r);\r
static const XMLCh _AttributeFilter[] = UNICODE_LITERAL_15(A,t,t,r,i,b,u,t,e,F,i,l,t,e,r);\r
static const XMLCh _AttributeResolver[] = UNICODE_LITERAL_17(A,t,t,r,i,b,u,t,e,R,e,s,o,l,v,e,r);\r
+ static const XMLCh _AssertionConsumerService[] = UNICODE_LITERAL_24(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e);\r
+ static const XMLCh _Audience[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);\r
+ static const XMLCh Binding[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);\r
static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r);\r
static const XMLCh DefaultRelyingParty[] = UNICODE_LITERAL_19(D,e,f,a,u,l,t,R,e,l,y,i,n,g,P,a,r,t,y);\r
+ static const XMLCh _Extensions[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);\r
static const XMLCh fatal[] = UNICODE_LITERAL_5(f,a,t,a,l);\r
static const XMLCh _Handler[] = UNICODE_LITERAL_7(H,a,n,d,l,e,r);\r
static const XMLCh _id[] = UNICODE_LITERAL_2(i,d);\r
static const XMLCh Library[] = UNICODE_LITERAL_7(L,i,b,r,a,r,y);\r
static const XMLCh Listener[] = UNICODE_LITERAL_8(L,i,s,t,e,n,e,r);\r
static const XMLCh logger[] = UNICODE_LITERAL_6(l,o,g,g,e,r);\r
+ static const XMLCh _ManageNameIDService[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,S,e,r,v,i,c,e);\r
static const XMLCh MemoryListener[] = UNICODE_LITERAL_14(M,e,m,o,r,y,L,i,s,t,e,n,e,r);\r
static const XMLCh _MetadataProvider[] = UNICODE_LITERAL_16(M,e,t,a,d,a,t,a,P,r,o,v,i,d,e,r);\r
static const XMLCh OutOfProcess[] = UNICODE_LITERAL_12(O,u,t,O,f,P,r,o,c,e,s,s);\r
static const XMLCh SecurityPolicies[] = UNICODE_LITERAL_16(S,e,c,u,r,i,t,y,P,o,l,i,c,i,e,s);\r
static const XMLCh _SessionCache[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,C,a,c,h,e);\r
static const XMLCh _SessionInitiator[] = UNICODE_LITERAL_16(S,e,s,s,i,o,n,I,n,i,t,i,a,t,o,r);\r
+ static const XMLCh _SingleLogoutService[] = UNICODE_LITERAL_19(S,i,n,g,l,e,L,o,g,o,u,t,S,e,r,v,i,c,e);\r
static const XMLCh _StorageService[] = UNICODE_LITERAL_14(S,t,o,r,a,g,e,S,e,r,v,i,c,e);\r
static const XMLCh TCPListener[] = UNICODE_LITERAL_11(T,C,P,L,i,s,t,e,n,e,r);\r
static const XMLCh _TrustEngine[] = UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e);\r
const ServiceProvider* sp,\r
const DOMElement* e,\r
const XMLApplication* base\r
- ) : m_sp(sp), m_base(base), m_metadata(NULL), m_trust(NULL), m_attrExtractor(NULL), m_attrFilter(NULL), m_attrResolver(NULL),\r
- m_credResolver(NULL), m_partyDefault(NULL), m_sessionInitDefault(NULL), m_acsDefault(NULL)\r
+ ) : m_sp(sp), m_base(base),\r
+#ifndef SHIBSP_LITE\r
+ m_metadata(NULL), m_trust(NULL), m_attrExtractor(NULL), m_attrFilter(NULL), m_attrResolver(NULL), m_credResolver(NULL), m_partyDefault(NULL),\r
+#endif\r
+ m_sessionInitDefault(NULL), m_acsDefault(NULL)\r
{\r
#ifdef _DEBUG\r
xmltooling::NDC ndc("XMLApplication");\r
setParent(base);\r
\r
SPConfig& conf=SPConfig::getConfig();\r
+#ifndef SHIBSP_LITE\r
SAMLConfig& samlConf=SAMLConfig::getConfig();\r
+#endif\r
XMLToolingConfig& xmlConf=XMLToolingConfig::getConfig();\r
\r
m_hash=getId();\r
m_hash+=getString("entityID").second;\r
- m_hash=samlConf.hashSHA1(m_hash.c_str(), true);\r
+ // TODO: some kind of non-hash method\r
+ //m_hash=samlConf.hashSHA1(m_hash.c_str(), true);\r
\r
pair<bool,const char*> attributes = getString("REMOTE_USER");\r
if (attributes.first) {\r
try {\r
// A handler is based on the Binding property in conjunction with the element name.\r
// If it's an ACS or SI, also handle index/id mappings and defaulting.\r
- if (XMLHelper::isNodeNamed(child,samlconstants::SAML20MD_NS,AssertionConsumerService::LOCAL_NAME)) {\r
- auto_ptr_char bindprop(child->getAttributeNS(NULL,EndpointType::BINDING_ATTRIB_NAME));\r
+ if (XMLString::equals(child->getLocalName(),_AssertionConsumerService)) {\r
+ auto_ptr_char bindprop(child->getAttributeNS(NULL,Binding));\r
if (!bindprop.get() || !*(bindprop.get())) {\r
log.warn("md:AssertionConsumerService element has no Binding attribute, skipping it...");\r
child = XMLHelper::getNextSiblingElement(child);\r
m_sessionInitDefault=sihandler;\r
}\r
}\r
- else if (XMLHelper::isNodeNamed(child,samlconstants::SAML20MD_NS,SingleLogoutService::LOCAL_NAME)) {\r
- auto_ptr_char bindprop(child->getAttributeNS(NULL,EndpointType::BINDING_ATTRIB_NAME));\r
+ else if (XMLString::equals(child->getLocalName(),_SingleLogoutService)) {\r
+ auto_ptr_char bindprop(child->getAttributeNS(NULL,Binding));\r
if (!bindprop.get() || !*(bindprop.get())) {\r
log.warn("md:SingleLogoutService element has no Binding attribute, skipping it...");\r
child = XMLHelper::getNextSiblingElement(child);\r
}\r
handler=conf.SingleLogoutServiceManager.newPlugin(bindprop.get(),make_pair(child, getId()));\r
}\r
- else if (XMLHelper::isNodeNamed(child,samlconstants::SAML20MD_NS,ManageNameIDService::LOCAL_NAME)) {\r
- auto_ptr_char bindprop(child->getAttributeNS(NULL,EndpointType::BINDING_ATTRIB_NAME));\r
+ else if (XMLString::equals(child->getLocalName(),_ManageNameIDService)) {\r
+ auto_ptr_char bindprop(child->getAttributeNS(NULL,Binding));\r
if (!bindprop.get() || !*(bindprop.get())) {\r
log.warn("md:ManageNameIDService element has no Binding attribute, skipping it...");\r
child = XMLHelper::getNextSiblingElement(child);\r
child = XMLHelper::getNextSiblingElement(child);\r
}\r
\r
+#ifndef SHIBSP_LITE\r
DOMNodeList* nlist=e->getElementsByTagNameNS(samlconstants::SAML20_NS,Audience::LOCAL_NAME);\r
for (XMLSize_t i=0; nlist && i<nlist->getLength(); i++)\r
if (nlist->item(i)->getParentNode()->isSameNode(e) && nlist->item(i)->hasChildNodes())\r
}\r
}\r
\r
-\r
// Finally, load relying parties.\r
child = XMLHelper::getFirstChildElement(e,DefaultRelyingParty);\r
if (child) {\r
child = XMLHelper::getNextSiblingElement(child,RelyingParty);\r
}\r
}\r
- \r
- if (conf.isEnabled(SPConfig::OutOfProcess)) {\r
- // Really finally, build local browser profile and binding objects.\r
- // TODO: may need some bits here...\r
- }\r
+#endif \r
}\r
catch (exception&) {\r
cleanup();\r
\r
void XMLApplication::cleanup()\r
{\r
+ for_each(m_handlers.begin(),m_handlers.end(),xmltooling::cleanup<Handler>());\r
+#ifndef SHIBSP_LITE\r
delete m_partyDefault;\r
#ifdef HAVE_GOOD_STL\r
for_each(m_partyMap.begin(),m_partyMap.end(),cleanup_pair<xstring,PropertySet>());\r
#else\r
for_each(m_partyMap.begin(),m_partyMap.end(),cleanup_pair<const XMLCh*,PropertySet>());\r
#endif\r
- for_each(m_handlers.begin(),m_handlers.end(),xmltooling::cleanup<Handler>());\r
delete m_credResolver;\r
delete m_attrResolver;\r
delete m_attrFilter;\r
delete m_attrExtractor;\r
delete m_trust;\r
delete m_metadata;\r
+#endif\r
}\r
\r
short XMLApplication::acceptNode(const DOMNode* node) const\r
{\r
- if (XMLHelper::isNodeNamed(node,samlconstants::SAML20_NS,saml2::Attribute::LOCAL_NAME))\r
- return FILTER_REJECT;\r
- else if (XMLHelper::isNodeNamed(node,samlconstants::SAML20_NS,Audience::LOCAL_NAME))\r
- return FILTER_REJECT;\r
const XMLCh* name=node->getLocalName();\r
if (XMLString::equals(name,_Application) ||\r
- XMLString::equals(name,AssertionConsumerService::LOCAL_NAME) ||\r
- XMLString::equals(name,SingleLogoutService::LOCAL_NAME) ||\r
- XMLString::equals(name,ManageNameIDService::LOCAL_NAME) ||\r
+ XMLString::equals(name,_Audience) ||\r
+ XMLString::equals(name,_AssertionConsumerService) ||\r
+ XMLString::equals(name,_SingleLogoutService) ||\r
+ XMLString::equals(name,_ManageNameIDService) ||\r
XMLString::equals(name,_SessionInitiator) ||\r
XMLString::equals(name,DefaultRelyingParty) ||\r
XMLString::equals(name,RelyingParty) ||\r
return FILTER_ACCEPT;\r
}\r
\r
+#ifndef SHIBSP_LITE\r
+\r
const PropertySet* XMLApplication::getRelyingParty(const EntityDescriptor* provider) const\r
{\r
if (!m_partyDefault && m_base)\r
return m_partyDefault;\r
}\r
\r
+#endif\r
+\r
const SessionInitiator* XMLApplication::getDefaultSessionInitiator() const\r
{\r
if (m_sessionInitDefault) return m_sessionInitDefault;\r
const XMLCh* name=node->getLocalName();\r
if (XMLString::equals(name,Applications) ||\r
XMLString::equals(name,_ArtifactMap) ||\r
- XMLString::equals(name,Extensions::LOCAL_NAME) ||\r
+ XMLString::equals(name,_Extensions) ||\r
XMLString::equals(name,Implementation) ||\r
XMLString::equals(name,Listener) ||\r
XMLString::equals(name,MemoryListener) ||\r
\r
void XMLConfigImpl::doExtensions(const DOMElement* e, const char* label, Category& log)\r
{\r
- const DOMElement* exts=XMLHelper::getFirstChildElement(e,Extensions::LOCAL_NAME);\r
+ const DOMElement* exts=XMLHelper::getFirstChildElement(e,_Extensions);\r
if (exts) {\r
exts=XMLHelper::getFirstChildElement(exts,Library);\r
while (exts) {\r
\r
try {\r
SPConfig& conf=SPConfig::getConfig();\r
+#ifndef SHIBSP_LITE\r
SAMLConfig& samlConf=SAMLConfig::getConfig();\r
+#endif\r
XMLToolingConfig& xmlConf=XMLToolingConfig::getConfig();\r
const DOMElement* SHAR=XMLHelper::getFirstChildElement(e,OutOfProcess);\r
const DOMElement* SHIRE=XMLHelper::getFirstChildElement(e,InProcess);\r
XMLToolingConfig::getConfig().log_config(logpath.get());\r
}\r
\r
+#ifndef SHIBSP_LITE\r
if (first)\r
m_outer->m_tranLog = new TransactionLog();\r
+#endif\r
}\r
\r
// First load any property sets.\r
\r
if (conf.isEnabled(SPConfig::Caching)) {\r
if (conf.isEnabled(SPConfig::OutOfProcess)) {\r
+#ifndef SHIBSP_LITE\r
// First build any StorageServices.\r
string inmemID;\r
child=XMLHelper::getFirstChildElement(SHAR,_StorageService);\r
log.info("building in-memory ArtifactMap...");\r
samlConf.setArtifactMap(new ArtifactMap(child));\r
}\r
+#endif\r
}\r
else {\r
child=XMLHelper::getFirstChildElement(SHIRE,_SessionCache);\r
}\r
}\r
\r
+#ifndef SHIBSP_LITE\r
// Load security policies.\r
child = XMLHelper::getLastChildElement(e,SecurityPolicies);\r
if (child) {\r
child = XMLHelper::getNextSiblingElement(child,Policy);\r
}\r
}\r
+#endif\r
\r
// Load the default application. This actually has a fixed ID of "default". ;-)\r
child=XMLHelper::getLastChildElement(e,Applications);\r
XMLConfigImpl::~XMLConfigImpl()\r
{\r
for_each(m_appmap.begin(),m_appmap.end(),cleanup_pair<string,Application>());\r
+#ifndef SHIBSP_LITE\r
for (map< string,pair<PropertySet*,vector<const SecurityPolicyRule*> > >::iterator i=m_policyMap.begin(); i!=m_policyMap.end(); ++i) {\r
delete i->second.first;\r
for_each(i->second.second.begin(), i->second.second.end(), xmltooling::cleanup<SecurityPolicyRule>());\r
}\r
+#endif\r
delete m_requestMapper;\r
if (m_document)\r
m_document->release();\r
--- /dev/null
+/*
+ * 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.
+ */
+
+/**
+ * CGIParser.cpp
+ *
+ * CGI GET/POST parameter parsing
+ */
+
+#include "internal.h"
+#include "lite/CGIParser.h"
+
+#include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/util/URLEncoder.h>
+
+using namespace opensaml;
+using namespace xmltooling;
+using namespace std;
+
+
+CGIParser::CGIParser(const HTTPRequest& request)
+{
+ const char* pch=NULL;
+ if (!strcmp(request.getMethod(),"POST"))
+ pch=request.getRequestBody();
+ else
+ pch=request.getQueryString();
+ size_t cl=pch ? strlen(pch) : 0;
+
+ const URLEncoder* dec = XMLToolingConfig::getConfig().getURLEncoder();
+ while (cl && pch) {
+ char *name;
+ char *value;
+ value=fmakeword('&',&cl,&pch);
+ plustospace(value);
+ dec->decode(value);
+ name=makeword(value,'=');
+ kvp_map.insert(pair<const string,char*>(name,value));
+ free(name);
+ }
+}
+
+CGIParser::~CGIParser()
+{
+ for (multimap<string,char*>::iterator i=kvp_map.begin(); i!=kvp_map.end(); i++)
+ free(i->second);
+}
+
+pair<CGIParser::walker,CGIParser::walker> CGIParser::getParameters(const char* name) const
+{
+ return kvp_map.equal_range(name);
+}
+
+/* Parsing routines modified from NCSA source. */
+char* CGIParser::makeword(char *line, char stop)
+{
+ int x = 0,y;
+ char *word = (char *) malloc(sizeof(char) * (strlen(line) + 1));
+
+ for(x=0;((line[x]) && (line[x] != stop));x++)
+ word[x] = line[x];
+
+ word[x] = '\0';
+ if(line[x])
+ ++x;
+ y=0;
+
+ while(line[x])
+ line[y++] = line[x++];
+ line[y] = '\0';
+ return word;
+}
+
+char* CGIParser::fmakeword(char stop, size_t *cl, const char** ppch)
+{
+ int wsize;
+ char *word;
+ int ll;
+
+ wsize = 1024;
+ ll=0;
+ word = (char *) malloc(sizeof(char) * (wsize + 1));
+
+ while(1)
+ {
+ word[ll] = *((*ppch)++);
+ if(ll==wsize-1)
+ {
+ word[ll+1] = '\0';
+ wsize+=1024;
+ word = (char *)realloc(word,sizeof(char)*(wsize+1));
+ }
+ --(*cl);
+ if((word[ll] == stop) || word[ll] == EOF || (!(*cl)))
+ {
+ if(word[ll] != stop)
+ ll++;
+ word[ll] = '\0';
+ return word;
+ }
+ ++ll;
+ }
+}
+
+void CGIParser::plustospace(char *str)
+{
+ register int x;
+
+ for(x=0;str[x];x++)
+ if(str[x] == '+') str[x] = ' ';
+}
--- /dev/null
+/*
+ * 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.
+ */
+
+/**
+ * @file shibsp/lite/CGIParser.h
+ *
+ * CGI GET/POST parameter parsing
+ */
+
+#ifndef __shibsp_cgi_h__
+#define __shibsp_cgi_h__
+
+#include <shibsp/base.h>
+#include <xmltooling/io/HTTPRequest.h>
+
+namespace opensaml {
+
+#if defined (_MSC_VER)
+ #pragma warning( push )
+ #pragma warning( disable : 4251 )
+#endif
+
+ /**
+ * CGI GET/POST parameter parsing
+ */
+ class SHIBSP_API CGIParser
+ {
+ MAKE_NONCOPYABLE(CGIParser);
+ public:
+ /**
+ * Constructor
+ *
+ * @param request HTTP request interface
+ */
+ CGIParser(const xmltooling::HTTPRequest& request);
+
+ ~CGIParser();
+
+ /** Alias for multimap iterator. */
+ typedef std::multimap<std::string,char*>::const_iterator walker;
+
+ /**
+ * Returns a pair of bounded iterators around the values of a parameter.
+ *
+ * @param name name of parameter
+ * @return a pair of multimap iterators surrounding the matching value(s)
+ */
+ std::pair<walker,walker> getParameters(const char* name) const;
+
+ private:
+ char* fmakeword(char stop, unsigned int *cl, const char** ppch);
+ char* makeword(char *line, char stop);
+ void plustospace(char *str);
+
+ std::multimap<std::string,char*> kvp_map;
+ };
+
+#if defined (_MSC_VER)
+ #pragma warning( pop )
+#endif
+
+};
+
+#endif /* __shibsp_cgi_h__ */
--- /dev/null
+/*
+ * 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.
+ */
+
+/**
+ * CommonDomainCookie.cpp
+ *
+ * Helper class for maintaining discovery cookie.
+ */
+
+#include "internal.h"
+#include "lite/CommonDomainCookie.h"
+
+#include <xercesc/util/Base64.hpp>
+#include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/util/URLEncoder.h>
+
+using namespace opensaml;
+using namespace xmltooling;
+using namespace std;
+
+const char CommonDomainCookie::CDCName[] = "_saml_idp";
+
+CommonDomainCookie::CommonDomainCookie(const char* cookie)
+{
+ if (!cookie)
+ return;
+
+ // Copy it so we can URL-decode it.
+ char* b64=strdup(cookie);
+ XMLToolingConfig::getConfig().getURLEncoder()->decode(b64);
+
+ // Chop it up and save off elements.
+ vector<string> templist;
+ char* ptr=b64;
+ while (*ptr) {
+ while (*ptr && isspace(*ptr)) ptr++;
+ char* end=ptr;
+ while (*end && !isspace(*end)) end++;
+ templist.push_back(string(ptr,end-ptr));
+ ptr=end;
+ }
+ free(b64);
+
+ // Now Base64 decode the list.
+ unsigned int len;
+ for (vector<string>::iterator i=templist.begin(); i!=templist.end(); ++i) {
+ XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(i->c_str()),&len);
+ if (decoded && *decoded) {
+ m_list.push_back(reinterpret_cast<char*>(decoded));
+ XMLString::release(&decoded);
+ }
+ }
+}
+
+const char* CommonDomainCookie::set(const char* entityID)
+{
+ // First scan the list for this IdP.
+ for (vector<string>::iterator i=m_list.begin(); i!=m_list.end(); i++) {
+ if (*i == entityID) {
+ m_list.erase(i);
+ break;
+ }
+ }
+
+ // Append it to the end.
+ m_list.push_back(entityID);
+
+ // Now rebuild the delimited list.
+ unsigned int len;
+ string delimited;
+ for (vector<string>::const_iterator j=m_list.begin(); j!=m_list.end(); j++) {
+ if (!delimited.empty()) delimited += ' ';
+
+ XMLByte* b64=Base64::encode(reinterpret_cast<const XMLByte*>(j->c_str()),j->length(),&len);
+ XMLByte *pos, *pos2;
+ for (pos=b64, pos2=b64; *pos2; pos2++)
+ if (isgraph(*pos2))
+ *pos++=*pos2;
+ *pos=0;
+
+ delimited += reinterpret_cast<char*>(b64);
+ XMLString::release(&b64);
+ }
+
+ m_encoded=XMLToolingConfig::getConfig().getURLEncoder()->encode(delimited.c_str());
+ return m_encoded.c_str();
+}
--- /dev/null
+/*
+ * 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.
+ */
+
+/**
+ * @file shibsp/lite/CommonDomainCookie.h
+ *
+ * Helper class for maintaining discovery cookie.
+ */
+
+#ifndef __shibsp_cdc_h__
+#define __shibsp_cdc_h__
+
+#include <shibsp/base.h>
+
+#include <string>
+#include <vector>
+
+#if defined (_MSC_VER)
+ #pragma warning( push )
+ #pragma warning( disable : 4250 4251 )
+#endif
+
+namespace opensaml {
+ /**
+ * Helper class for maintaining discovery cookie.
+ */
+ class SHIBSP_API CommonDomainCookie {
+ MAKE_NONCOPYABLE(CommonDomainCookie);
+ public:
+ /**
+ * Parses a cookie for reading or writing.
+ *
+ * @param cookie the raw cookie value
+ */
+ CommonDomainCookie(const char* cookie);
+
+ ~CommonDomainCookie() {}
+
+ /**
+ * Returns list of IdPs stored in cookie.
+ *
+ * @return reference to vector of entityIDs
+ */
+ const std::vector<std::string>& get() const {
+ return m_list;
+ }
+
+ /**
+ * Adds/moves an IdP to the front of the list.
+ *
+ * @param entityID name of IdP to add
+ * @return new value of cookie
+ */
+ const char* set(const char* entityID);
+
+ /** Name of cookie ("_saml_idp") */
+ static const char CDCName[];
+
+ private:
+ std::string m_encoded;
+ std::vector<std::string> m_list;
+ };
+};
+
+#if defined (_MSC_VER)
+ #pragma warning( pop )
+#endif
+
+#endif /* __saml_cdc_h__ */
--- /dev/null
+/*
+ * 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.
+ */
+
+/**
+ * SAMLConstants.cpp
+ *
+ * SAML XML namespace constants
+ */
+
+
+#include "internal.h"
+#include "lite/SAMLConstants.h"
+#include <xercesc/util/XMLUniDefs.hpp>
+
+using namespace xercesc;
+using namespace samlconstants;
+
+const XMLCh samlconstants::PAOS_NS[] = // urn:liberty:paos:2003-08
+{ chLatin_u, chLatin_r, chLatin_n, chColon,
+ chLatin_l, chLatin_i, chLatin_b, chLatin_e, chLatin_r, chLatin_t, chLatin_y, chColon,
+ chLatin_p, chLatin_a, chLatin_o, chLatin_s, chColon,
+ chDigit_2, chDigit_0, chDigit_0, chDigit_3, chDash, chDigit_0, chDigit_8, chNull
+};
+
+const XMLCh samlconstants::PAOS_PREFIX[] = UNICODE_LITERAL_4(p,a,o,s);
+
+const XMLCh samlconstants::SAML1_NS[] = // urn:oasis:names:tc:SAML:1.0:assertion
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
+ chLatin_a, chLatin_s, chLatin_s, chLatin_e, chLatin_r, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
+};
+
+const XMLCh samlconstants::SAML1P_NS[] = // urn:oasis:names:tc:SAML:1.0:protocol
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull
+};
+
+const XMLCh samlconstants::SAML1_PREFIX[] = UNICODE_LITERAL_4(s,a,m,l);
+
+const XMLCh samlconstants::SAML1P_PREFIX[] = UNICODE_LITERAL_5(s,a,m,l,p);
+
+const XMLCh samlconstants::SAML20_VERSION[] = // 2.0
+{ chDigit_2, chPeriod, chDigit_0, chNull
+};
+
+const XMLCh samlconstants::SAML20_NS[] = // urn:oasis:names:tc:SAML:2.0:assertion
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_a, chLatin_s, chLatin_s, chLatin_e, chLatin_r, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
+};
+
+const XMLCh samlconstants::SAML20P_NS[] = // urn:oasis:names:tc:SAML:2.0:protocol
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull
+};
+
+const XMLCh samlconstants::SAML20MD_NS[] = // urn:oasis:names:tc:SAML:2.0:metadata
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chNull
+};
+
+const XMLCh samlconstants::SAML20AC_NS[] = // urn:oasis:names:tc:SAML:2.0:ac
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_a, chLatin_c, chNull
+};
+
+const XMLCh samlconstants::SAML20_PREFIX[] = UNICODE_LITERAL_4(s,a,m,l);
+
+const XMLCh samlconstants::SAML20P_PREFIX[] = UNICODE_LITERAL_5(s,a,m,l,p);
+
+const XMLCh samlconstants::SAML20MD_PREFIX[] = UNICODE_LITERAL_2(m,d);
+
+const XMLCh samlconstants::SAML20AC_PREFIX[] = UNICODE_LITERAL_2(a,c);
+
+const XMLCh samlconstants::SAML20ECP_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,
+ chLatin_S, chLatin_S, chLatin_O, chColon, chLatin_e, chLatin_c, chLatin_p, chNull
+};
+
+const XMLCh samlconstants::SAML20ECP_PREFIX[] = UNICODE_LITERAL_3(e,c,p);
+
+const XMLCh samlconstants::SAML20DCE_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:DCE
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,
+ chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,
+ chLatin_D, chLatin_C, chLatin_E, chNull
+};
+
+const XMLCh samlconstants::SAML20DCE_PREFIX[] = UNICODE_LITERAL_3(D,C,E);
+
+const XMLCh samlconstants::SAML20X500_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,
+ chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,
+ chLatin_X, chDigit_5, chDigit_0, chDigit_0, chNull
+};
+
+const XMLCh samlconstants::SAML20X500_PREFIX[] = { chLatin_x, chDigit_5, chDigit_0, chDigit_0 };
+
+const XMLCh samlconstants::SAML20XACML_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:XACML
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,
+ chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,
+ chLatin_X, chLatin_A, chLatin_C, chLatin_M, chLatin_L, chNull
+};
+
+const XMLCh samlconstants::SAML20XACML_PREFIX[] = UNICODE_LITERAL_9(x,a,c,m,l,p,r,o,f);
+
+const XMLCh samlconstants::SAML1MD_NS[] = // urn:oasis:names:tc:SAML:profiles:v1metadata
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,
+ chLatin_v, chDigit_1, chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chNull
+};
+
+const XMLCh samlconstants::SAML1MD_PREFIX[] =
+{ chLatin_s, chLatin_a, chLatin_m, chLatin_l, chDigit_1, chLatin_m, chLatin_d, chNull };
+
+const XMLCh samlconstants::SAML10_PROTOCOL_ENUM[] = // urn:oasis:names:tc:SAML:1.0:protocol
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull
+};
+
+const XMLCh samlconstants::SAML11_PROTOCOL_ENUM[] = // urn:oasis:names:tc:SAML:1.1:protocol
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull
+};
+
+const XMLCh samlconstants::SAML20MD_QUERY_EXT_NS[] = // urn:oasis:names:tc:SAML:metadata:ext:query
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon,
+ chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chColon,
+ chLatin_e, chLatin_x, chLatin_t, chColon, chLatin_q, chLatin_u, chLatin_e, chLatin_r, chLatin_y, chNull
+};
+
+const XMLCh samlconstants::SAML20MD_QUERY_EXT_PREFIX[] = UNICODE_LITERAL_5(q,u,e,r,y);
+
+const XMLCh samlconstants::SAML20P_THIRDPARTY_EXT_NS[] = // urn:oasis:names:tc:SAML:protocol:ext:third-party
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+ chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+ chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon,
+ chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chColon,
+ chLatin_e, chLatin_x, chLatin_t, chColon,
+ chLatin_t, chLatin_h, chLatin_i, chLatin_r, chLatin_d, chDash, chLatin_p, chLatin_a, chLatin_r, chLatin_t, chLatin_y, chNull
+};
+
+const XMLCh samlconstants::SAML20P_THIRDPARTY_EXT_PREFIX[] = UNICODE_LITERAL_6(t,h,r,p,t,y);
+
+const char samlconstants::SAML1_BINDING_SOAP[] = "urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding";
+
+const char samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT[] = "urn:oasis:names:tc:SAML:1.0:profiles:artifact-01";
+
+const char samlconstants::SAML1_PROFILE_BROWSER_POST[] = "urn:oasis:names:tc:SAML:1.0:profiles:browser-post";
+
+const char samlconstants::SAML20_BINDING_SOAP[] = "urn:oasis:names:tc:SAML:2.0:bindings:SOAP";
+
+const char samlconstants::SAML20_BINDING_HTTP_ARTIFACT[] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact";
+
+const char samlconstants::SAML20_BINDING_HTTP_POST[] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST";
+
+const char samlconstants::SAML20_BINDING_HTTP_POST_SIMPLESIGN[] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign";
+
+const char samlconstants::SAML20_BINDING_HTTP_REDIRECT[] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect";
+
+const char samlconstants::SAML20_BINDING_URL_ENCODING_DEFLATE[] = "urn:oasis:names:tc:SAML:2.0:bindings:URL-Encoding:DEFLATE";
--- /dev/null
+/*
+ * 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.
+ */
+
+/**
+ * @file shibsp/lite/SAMLConstants.h
+ *
+ * SAML XML namespace constants
+ */
+
+#ifndef __shibsp_xmlconstants_h__
+#define __shibsp_xmlconstants_h__
+
+#include <xmltooling/util/XMLConstants.h>
+
+/**
+ * SAML related constants.
+ */
+namespace samlconstants {
+
+ /** Liberty PAOS XML Namespace ("urn:liberty:paos:2003-08") */
+ extern SHIBSP_API const XMLCh PAOS_NS[];
+
+ /** Liberty PAOS QName prefix ("paos") */
+ extern SHIBSP_API const XMLCh PAOS_PREFIX[];
+
+ /** SAML 1.X Assertion XML namespace ("urn:oasis:names:tc:SAML:1.0:assertion") */
+ extern SHIBSP_API const XMLCh SAML1_NS[];
+
+ /** SAML 1.X Protocol XML namespace ("urn:oasis:names:tc:SAML:1.0:protocol") */
+ extern SHIBSP_API const XMLCh SAML1P_NS[];
+
+ /** SAML 1.X Assertion QName prefix ("saml") */
+ extern SHIBSP_API const XMLCh SAML1_PREFIX[];
+
+ /** SAML 1.X Protocol QName prefix ("samlp") */
+ extern SHIBSP_API const XMLCh SAML1P_PREFIX[];
+
+ /** SAML 2.0 Version ("2.0") */
+ extern SHIBSP_API const XMLCh SAML20_VERSION[];
+
+ /** SAML 2.0 Assertion XML namespace ("urn:oasis:names:tc:SAML:2.0:assertion") */
+ extern SHIBSP_API const XMLCh SAML20_NS[];
+
+ /** SAML 2.0 Protocol XML namespace ("urn:oasis:names:tc:SAML:2.0:protocol") */
+ extern SHIBSP_API const XMLCh SAML20P_NS[];
+
+ /** SAML 2.0 Metadata XML namespace ("urn:oasis:names:tc:SAML:2.0:metadata") */
+ extern SHIBSP_API const XMLCh SAML20MD_NS[];
+
+ /** SAML 2.0 AuthnContext XML namespace ("urn:oasis:names:tc:SAML:2.0:ac") */
+ extern SHIBSP_API const XMLCh SAML20AC_NS[];
+
+ /** SAML 2.0 Assertion QName prefix ("saml") */
+ extern SHIBSP_API const XMLCh SAML20_PREFIX[];
+
+ /** SAML 2.0 Protocol QName prefix ("samlp") */
+ extern SHIBSP_API const XMLCh SAML20P_PREFIX[];
+
+ /** SAML 2.0 Metadata QName prefix ("md") */
+ extern SHIBSP_API const XMLCh SAML20MD_PREFIX[];
+
+ /** SAML 2.0 AuthnContext QName prefix ("ac") */
+ extern SHIBSP_API const XMLCh SAML20AC_PREFIX[];
+
+ /** SAML 2.0 Enhanced Client/Proxy SSO Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp") */
+ extern SHIBSP_API const XMLCh SAML20ECP_NS[];
+
+ /** SAML 2.0 Enhanced Client/Proxy SSO Profile QName prefix ("ecp") */
+ extern SHIBSP_API const XMLCh SAML20ECP_PREFIX[];
+
+ /** SAML 2.0 DCE PAC Attribute Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:attribute:DCE") */
+ extern SHIBSP_API const XMLCh SAML20DCE_NS[];
+
+ /** SAML 2.0 DCE PAC Attribute Profile QName prefix ("DCE") */
+ extern SHIBSP_API const XMLCh SAML20DCE_PREFIX[];
+
+ /** SAML 2.0 X.500 Attribute Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500") */
+ extern SHIBSP_API const XMLCh SAML20X500_NS[];
+
+ /** SAML 2.0 X.500 Attribute Profile QName prefix ("x500") */
+ extern SHIBSP_API const XMLCh SAML20X500_PREFIX[];
+
+ /** SAML 2.0 XACML Attribute Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:attribute:XACML") */
+ extern SHIBSP_API const XMLCh SAML20XACML_NS[];
+
+ /** SAML 2.0 XACML Attribute Profile QName prefix ("xacmlprof") */
+ extern SHIBSP_API const XMLCh SAML20XACML_PREFIX[];
+
+ /** SAML 1.x Metadata Profile XML Namespace ("urn:oasis:names:tc:SAML:profiles:v1metadata") */
+ extern SHIBSP_API const XMLCh SAML1MD_NS[];
+
+ /** SAML 1.x Metadata Profile QName prefix ("saml1md") */
+ extern SHIBSP_API const XMLCh SAML1MD_PREFIX[];
+
+ /** SAML 1.0 Protocol Enumeration constant ("urn:oasis:names:tc:SAML:1.0:protocol") */
+ extern SHIBSP_API const XMLCh SAML10_PROTOCOL_ENUM[];
+
+ /** SAML 1.1 Protocol Enumeration constant ("urn:oasis:names:tc:SAML:1.1:protocol") */
+ extern SHIBSP_API const XMLCh SAML11_PROTOCOL_ENUM[];
+
+ /** SAML Query Requester Metadata Extension XML Namespace ("urn:oasis:names:tc:SAML:metadata:ext:query") */
+ extern SHIBSP_API const XMLCh SAML20MD_QUERY_EXT_NS[];
+
+ /** SAML Query Requester Metadata Extension QName prefix ("query") */
+ extern SHIBSP_API const XMLCh SAML20MD_QUERY_EXT_PREFIX[];
+
+ /** SAML Third-Party Request Protocol Extension XML Namespace ("urn:oasis:names:tc:SAML:protocol:ext:third-party") */
+ extern SHIBSP_API const XMLCh SAML20P_THIRDPARTY_EXT_NS[];
+
+ /** SAML Third-Party Request Protocol Extension QName prefix ("query") */
+ extern SHIBSP_API const XMLCh SAML20P_THIRDPARTY_EXT_PREFIX[];
+
+ /** SAML 1.x SOAP binding ("urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding") */
+ extern SHIBSP_API const char SAML1_BINDING_SOAP[];
+
+ /** SAML 1.x Browser Artifact profile ("urn:oasis:names:tc:SAML:1.0:profiles:artifact-01") */
+ extern SHIBSP_API const char SAML1_PROFILE_BROWSER_ARTIFACT[];
+
+ /** SAML 1.x Browser POST profile ("urn:oasis:names:tc:SAML:1.0:profiles:browser-post") */
+ extern SHIBSP_API const char SAML1_PROFILE_BROWSER_POST[];
+
+ /** SAML 2.0 SOAP binding ("urn:oasis:names:tc:SAML:2.0:bindings:SOAP") */
+ extern SHIBSP_API const char SAML20_BINDING_SOAP[];
+
+ /** SAML 2.0 HTTP-Artifact binding ("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact") */
+ extern SHIBSP_API const char SAML20_BINDING_HTTP_ARTIFACT[];
+
+ /** SAML 2.0 HTTP-POST binding ("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST") */
+ extern SHIBSP_API const char SAML20_BINDING_HTTP_POST[];
+
+ /** SAML 2.0 HTTP-POST-SimpleSign binding ("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign") */
+ extern SHIBSP_API const char SAML20_BINDING_HTTP_POST_SIMPLESIGN[];
+
+ /** SAML 2.0 HTTP-Redirect binding ("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect") */
+ extern SHIBSP_API const char SAML20_BINDING_HTTP_REDIRECT[];
+
+ /** SAML 2.0 HTTP-Redirect DEFLATE URL encoding ("urn:oasis:names:tc:SAML:2.0:bindings:URL-Encoding:DEFLATE") */
+ extern SHIBSP_API const char SAML20_BINDING_URL_ENCODING_DEFLATE[];
+};
+
+#endif /* __shibsp_xmlconstants_h__ */
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="shibsp-lite"\r
+ ProjectGUID="{81F0F7A6-DC36-46EF-957F-F9E81D4403F7}"\r
+ RootNamespace="shibsp-lite"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+ IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories=".;..;..\..\cpp-xmltooling"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WANT_TCP_SHAR;SHIBSP_LITE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BrowseInformation="1"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="4"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="log4cppD.lib xerces-c_2D.lib xmltooling-lite1D.lib wsock32.lib"\r
+ OutputFile="$(OutDir)\$(ProjectName)1_0D.dll"\r
+ LinkIncremental="2"\r
+ AdditionalLibraryDirectories="..\..\cpp-xmltooling\Debug"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="2"\r
+ ImportLibrary="$(TargetDir)$(ProjectName)1D.lib"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+ IntermediateDirectory="$(ProjectName)-(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ CharacterSet="1"\r
+ WholeProgramOptimization="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=".;..;..\..\cpp-xmltooling"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WANT_TCP_SHAR;SHIBSP_LITE"\r
+ RuntimeLibrary="2"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="log4cpp.lib xerces-c_2.lib xmltooling-lite1.lib wsock32.lib"\r
+ OutputFile="$(OutDir)\$(ProjectName)1_0.dll"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\cpp-xmltooling\Release"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="2"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ ImportLibrary="$(TargetDir)$(ProjectName)1.lib"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F2-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ <File\r
+ RelativePath=".\AbstractSPRequest.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Application.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ServiceProvider.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\SessionCache.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\SPConfig.cpp"\r
+ >\r
+ </File>\r
+ <Filter\r
+ Name="util"\r
+ >\r
+ <File\r
+ RelativePath=".\util\DOMPropertySet.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\util\SPConstants.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\util\TemplateParameters.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="remoting"\r
+ >\r
+ <Filter\r
+ Name="impl"\r
+ >\r
+ <File\r
+ RelativePath=".\remoting\impl\ddf.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\remoting\impl\ListenerService.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\remoting\impl\SocketListener.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\remoting\impl\SocketListener.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\remoting\impl\TCPListener.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Filter>\r
+ <Filter\r
+ Name="impl"\r
+ >\r
+ <File\r
+ RelativePath=".\impl\RemotedSessionCache.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\impl\XMLAccessControl.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\impl\XMLRequestMapper.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\impl\XMLServiceProvider.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="attribute"\r
+ >\r
+ <File\r
+ RelativePath=".\attribute\Attribute.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="handler"\r
+ >\r
+ <Filter\r
+ Name="impl"\r
+ >\r
+ <File\r
+ RelativePath=".\handler\impl\AbstractHandler.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\AssertionConsumerService.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\ChainingSessionInitiator.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\RemotedHandler.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\SAML1Consumer.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\SAML2Consumer.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\SAML2SessionInitiator.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\SAMLDSSessionInitiator.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\SessionInitiator.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\Shib1SessionInitiator.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\impl\WAYFSessionInitiator.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Filter>\r
+ <Filter\r
+ Name="lite"\r
+ >\r
+ <File\r
+ RelativePath=".\lite\CGIParser.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\CommonDomainCookie.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\SAMLConstants.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFC}"\r
+ >\r
+ <File\r
+ RelativePath=".\AbstractSPRequest.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\AccessControl.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Application.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\base.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\exceptions.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\internal.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\RequestMapper.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\resource.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ServiceProvider.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\SessionCache.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\SPConfig.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\SPRequest.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\version.h"\r
+ >\r
+ </File>\r
+ <Filter\r
+ Name="util"\r
+ >\r
+ <File\r
+ RelativePath=".\util\DOMPropertySet.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\util\PropertySet.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\util\SPConstants.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\util\TemplateParameters.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="remoting"\r
+ >\r
+ <File\r
+ RelativePath=".\remoting\ddf.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\remoting\ListenerService.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="attribute"\r
+ >\r
+ <File\r
+ RelativePath=".\attribute\Attribute.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\attribute\NameIDAttribute.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\attribute\ScopedAttribute.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\attribute\SimpleAttribute.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="handler"\r
+ >\r
+ <File\r
+ RelativePath=".\handler\AbstractHandler.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\AssertionConsumerService.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\Handler.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\RemotedHandler.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\handler\SessionInitiator.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="lite"\r
+ >\r
+ <File\r
+ RelativePath=".\lite\CGIParser.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\CommonDomainCookie.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\GenericRequest.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\GenericResponse.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\HTTPRequest.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\HTTPResponse.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lite\SAMLConstants.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Filter>\r
+ <Filter\r
+ Name="Resource Files"\r
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD02}"\r
+ >\r
+ <File\r
+ RelativePath=".\shibsp.rc"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
- AdditionalIncludeDirectories=".;..;"..\..\cpp-opensaml1";"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""\r
+ AdditionalIncludeDirectories=".;..;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""\r
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WANT_TCP_SHAR"\r
MinimalRebuild="true"\r
BasicRuntimeChecks="3"\r
RuntimeLibrary="3"\r
+ BrowseInformation="1"\r
WarningLevel="3"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="4"\r
/>\r
<Tool\r
Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=".;..;"..\..\cpp-opensaml1";"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""\r
+ AdditionalIncludeDirectories=".;..;"..\..\cpp-opensaml2";"..\..\cpp-xmltooling""\r
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WANT_TCP_SHAR"\r
RuntimeLibrary="2"\r
WarningLevel="3"\r
Name="impl"\r
>\r
<File\r
- RelativePath=".\impl\RemotedSessionCache.cpp"\r
- >\r
- </File>\r
- <File\r
RelativePath=".\impl\StorageServiceSessionCache.cpp"\r
>\r
</File>\r
#define __shibsp_constants_h__
#include <shibsp/base.h>
-#include <saml/util/SAMLConstants.h>
+#ifndef SHIBSP_LITE
+# include <saml/util/SAMLConstants.h>
+#else
+# include <xmltooling/util/XMLConstants.h>
+#endif
/**
* Shibboleth SP XML constants.