[cpp-sp] 02/02: SSPCPP-694 Native IIS: Todo and Role Based AuthN

Rod Widdowson rdw at steadingsoftware.com
Fri Apr 28 09:53:06 EDT 2017


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

rdw pushed a commit to branch master
in repository cpp-sp.

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

commit a7c6e7ae3cdf62a8acd0b2626f2b0edff058286e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Apr 28 14:50:59 2017 +0100

    SSPCPP-694 Native IIS: Todo and Role Based AuthN
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-694
    
    Add a review note to ShibHttpModule.cpp.
    Add a fixed role to our Principal: This allows us to test Role based AuthN.
---
 iis7_shib/ShibHttpModule.cpp | 1 +
 iis7_shib/ShibUser.cpp       | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/iis7_shib/ShibHttpModule.cpp b/iis7_shib/ShibHttpModule.cpp
index 0734e07..a74cb38 100644
--- a/iis7_shib/ShibHttpModule.cpp
+++ b/iis7_shib/ShibHttpModule.cpp
@@ -38,6 +38,7 @@ ShibHttpModule::DoHandler(
     threadid += lexical_cast<string>(_getpid()) + "] native_shib";
     xmltooling::NDC ndc(threadid.c_str());
 
+    // TODO the handler and the Filter both use the same class.  Should it?
     NativeRequest handler(pHttpContext, pProvider, false);
 
     pair<bool, long> res = handler.getServiceProvider().doHandler(handler);
diff --git a/iis7_shib/ShibUser.cpp b/iis7_shib/ShibUser.cpp
index 53025d4..4728e23 100644
--- a/iis7_shib/ShibUser.cpp
+++ b/iis7_shib/ShibUser.cpp
@@ -80,17 +80,19 @@ ShibUser::DereferenceUser(VOID)
 BOOL
 ShibUser::SupportsIsInRole(VOID)
 {
-    return FALSE;
+    return TRUE;
 }
 
 HRESULT
 ShibUser::IsInRole(_In_  PCWSTR  pszRoleName, _Out_ BOOL *  pfInRole)
 {
-    return E_NOTIMPL;
+    wstring role(pszRoleName);
+    *pfInRole = (role == L"shibAuthn");
+    return S_OK;
 }
 PVOID
 ShibUser::GetUserVariable(_In_ PCSTR    pszVariableName)
 {
-    return  nullptr;
+    return  "flibby";
 }
 

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


More information about the commits mailing list