Peter 的个人资料Peter's ruminations照片日志列表更多 工具 帮助

日志


10月6日

Shib CA PKI federation startup.

If you want to run you own CA, we wrote a book encouraging those with few crypto skills to at least try (these were the folks with enough programming skills in visual basic to build object servers/components but not build systems). We aimed to complement the CAPICOM library Microsoft eventually released to the same audience - crypto APIs for dummies ..still wanting the assurance that they were using "reputable" and standard security services.

 

http://www.amazon.com/gp/offer-listing/0201309807/ref=dp_olp_1

 

Even tho it’s a book about a non SAML entity, it may yet help one to learn to bootstrap a SAML federation - a (distant) family member of the CA ...that we did write about. The step of issuing SAML metadata to bootstrap a federation is analogous to the CA administrator issuing a certificate to an OCSP validation authority (flame shield up).

 

I doubt that book talked much about it (tho I cannot really remember which control topics I wrote about, any more), Validation Authorities aimed to authorize a farm of servers listening on anycast addresses across the internet to make "status" statements on behalf of a leaf CA. The signatures could be across simple small messages (IETF), or Merkle hash trees (patented). Whereas a Validation Authority validation network might use IETF's signed OCSP messages to dynamically issue (a) signed statement(s) about a static cert to which various attributes about the subject (managed by third parties) may be attached, a SAML IDP issues signed XML "assertions"...to which various attributes about the subject (managed by third parties) may be attached (strangely enough). By fiat, attributes can be entitlements, and attribute contracts would (I grudgingly suppose) implement what a CISSP would probably call a network-/federation- wide non-discretionary security policy by controlling their release (IDP side) and acceptance (SP side).

 

 

Be aware that, in the book referenced, there is no academic tone and no text book grade organization of knowledge about the various issues involved in operating a CA. Read it before an exam, you will probably fail. (So don’t!  It was written to make you think, vs score highly on tests.) Note, furthermore, that anyone with a "professional" reputation to uphold in PKI gets as far away from the book (and the book's authors) as possible. It’s a PKI for dummies who would like to be otherwise - which is kind of an oxymoron within the PKI profession. Be aware that the code is 10 years old, written in languages that are not supported any longer by Microsoft, and though the compiled objects are still reputed to work with a modern Windows Server platform, the OS security models have changed so much that one might wish to start again. Actually... please start again!

 

The main object of the particular writing effort was... to persuade the unwashed, the perhaps-scorned, and the feeling-inept about certificates that they too COULD run their own CA - and then go off and do local integration ...using the (Microsoft) component-ware we focused on.

 

Peter.

 

 

------------

 

I'm sure that some people think the polite thing would be to say "sorry, we can't help you". And I might do that in some cases, but NOT with this question. Setting up a federation and creating/managing metadata is not something you can just wing. It would be like running a CA with the same level of understanding. It demands a serious response.

 

FWIW, I'm very glad that you found a solution you're happy with.

 

-- Scott

4月27日

Shibboleth2 ECP for IIS7/Windows 2008

To allow IIS7 (via the shib_isapi handler) to invoke the NativeSP in "handler" mode (so Shib2 act as a layer 5 protocol engine, rather than web-session middleware) and then support a trial generting a SAMLRequest using ECP and PAOS, I did the following

1. in isapi src, alter code lines as follows

    A pair<bool,long> res = stf.getServiceProvider().doAuthentication(stf, true); // note true for 2nd parm

    B dynabuf handlervar(256);   // define val as global, and have CRT static alloc space

    C GetHeader(pn,pfc,"url",handlervar,256,false);  // add line to ShibTargetIsapiF constructor, after existing GetHeader(url). Fast hack to store inbound querystring as global char* in handlervar

    D // The filter never processes the POST, so stub these methods.
            const char* getQueryString() const {
                  return (char*)handlervar;                        // implement using nasty hack, for use by CGIReader
                  //   throw IOException("getQueryString not implemented");  // comment away not implemented throw
            }

2. in isapi src, comment out any undesirable, "non protocol" features

    g_Config->setFeatures(
        SPConfig::Listener |
       // SPConfig::Caching |                //disable caching support in library
        SPConfig::RequestMapping |
        SPConfig::InProcess |
        SPConfig::Logging |
        SPConfig::Handlers
        );

3. In a shibboleth2.xml SP config file generated by TestShib harness, ensure default SessionInitiator has (undocumented) attribute ECP="true"

   <SessionInitiator type="SAML2" Location="/TestShib" ECP="true"        

   // note case sensitivity of ECP

4. Invoke trial usin tool like curl(1) ...using GET to induce protocol run, where providerId parameter is demonstrably set to "none" to showcase the ECP scenario. Run-time mux/demux requirements for trial varied by changing "TestShib" and applicationId=<val>. Invokes protocol engine for layer 5 S-SDU/initiate, in raw mode.

https://win8pw.rapattoni.local/Shibboleth.sso/TestShib?applicationId=default&providerId=none

5. Ensure HTTP Request has conforming http request headers (taken verbatim from SAML2 documentation/latest-errata)

   Accept: text/html; application/vnd.paos+xml
   PAOS: ver="urn:liberty:paos:2003-08” ; "urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp"

Unless I missed some of my code hacks, this produces a trial as follows. Since this is the first time in 12 months of trying with 3 windows products that I've got this far with ECP ...Im pretty happy with Shib2! Thanks!

GET /Shibboleth.sso/TestShib?applicationId=default&providerId=none HTTP/1.1
Accept-Language: en-us,en-securid
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022)
Connection: Keep-Alive
Host: win8pw.rapattoni.local
Accept: text/html; application/vnd.paos+xml
PAOS: ver="urn:liberty:paos:2003-08" ; "urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp"

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate, private
Pragma: no-cache
Content-Type: application/vnd.paos+xml
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sat, 26 Apr 2008 22:30:38 GMT
Connection: close
Content-Length: 1515

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><paos:Request xmlns:paos="urn:liberty:paos:2003-08" S:actor="http://schemas.xmlsoap.org/soap/actor/next" S:mustUnderstand="1" responseConsumerURL="http://win8pw.rapattoni.local/Shibboleth.sso/SAML2/ECP" service="urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp"/><ecp:Request xmlns:ecp="urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp" IsPassive="0" S:actor="http://schemas.xmlsoap.org/soap/actor/next" S:mustUnderstand="1"><saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://win8pw.rapattoni.local/shibboleth-sp</saml:Issuer><samlp:IDPList xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"><samlp:IDPEntry ProviderID="none"/></samlp:IDPList></ecp:Request><ecp:RelayState xmlns:ecp="urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp" S:actor="http://schemas.xmlsoap.org/soap/actor/next" S:mustUnderstand="1"/></S:Header><S:Body><samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="http://win8pw.rapattoni.local/Shibboleth.sso/SAML2/ECP" ID="_f5c9b87a8863ad2f94c7be25b5522cc3" IssueInstant="2008-04-26T22:30:38Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS" Version="2.0"><saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://win8pw.rapattoni.local/shibboleth-sp</saml:Issuer><samlp:NameIDPolicy AllowCreate="1"/><samlp:Scoping><samlp:IDPList><samlp:IDPEntry ProviderID="none"/></samlp:IDPList></samlp:Scoping></samlp:AuthnRequest></S:Body></S:Envelope>

_________________________
Peter Williams
Chief Information Security Officer
Mobile (805) 416-6305


From: Peter Williams
Sent: Sat 4/26/2008 1:11 PM
To: shibboleth-users@internet2.edu
Subject: RE: TestShib not responding to ACSURL

I've moved on in my experiment (changing Shib2 code to suit), hopefully exploiting a response on a different thread. It noted that one can initiate a (SAML2) protocol handler using URIs of the form:

Feedback on OpenLiberty ECP plugin for Mozilla Firefox

Using instructions at http://openliberty.org/wiki/index.php?title=ECP_Plugin_Documentation&action=edit, I have the capability to now mostly build the ECP extensions, but have not succeeded to run the ECP plug-in on windows2008 Enterprise Edition.

Some pretty raw feedback follows:-

Windows does not have a shell to build .sh file scripts, or a zip command. Perhaps, only Eclipse tools (or tool extensions) should be used to build the project to maintain build portability.

I had almost no modern personal context on any of the browser/toolchain, but followed steps 1-4 quite easily

Eclipse 3.2 for Java/EE

Web Tools latest

XUL tool chain latest

SVN src control plugin.

To practice a little with Firefox (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14) and get a basic orientation, I installed the "sxipper" commercial-grade plugin, learning to install/use it on an openid site (where it did fine).

Step 5 was a little more difficult, given I have no recent context in Eclipse or its whole UI concept for the IDE. I did use the IBM JCOP Eclipse for building javacard firmware 3 years ago, and thus half-figured/half-remembered XUL project making/running out, by analogy. I think I figured things out to about 90% completion; but build documentation was just lacking (for a complete novice in this highly technical toolchain).

Step 6 is confusing. I created a txt file (I called it "foo.txt") in C:\Users\Administrator\AppData\Local\Mozilla\Firefox\Profiles\81ecn5k5.default. There is no subdirectory there called plugins, note well - taking a hint from the wiki notes.

In the .txt file, I typed one line - a DOS file path to my eclipse workspace/sub-directory wherein lie various files - exactly as checkedout from the SVN repository. The line is "C:\Users\Administrator\workspace\saml2_ecp@openliberty.org", at which directory there are several files, including saml2_ecp@openliberty.org.xpi - No local build has completed (lacking sh(1) and zip(1) - or alternative instructions)

I do note that the src file :install.rdf" (that updated_package.sh would zip up into the xpi file along with other resources) has a {GUID} in its ID field. This seems to counter the counsel of the wiki that seems to want the GUID replaced by the string saml2_ecp@openliberty.org.

Selecting the extension project root, and Launching the Firefox Launcher does launch Firefox, and allows selection of the default profile. Its not clear the extension is being loaded however, and no ECP add-on appears in the list of add-ons, under Tools.

The notes might want to suggest an SP site, with which to make a trial - and/or define a means to know at least that the extensions is at least loaded into Firefox.

_________________________
Peter Williams
Chief Information Security Officer
Mobile (805) 416-6305