<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2/6/2014 10:17 PM, Griffin Cheng
[CLIB] wrote:<br>
</div>
<blockquote
cite="mid:AA96DEF1C0EBC54D989E760702DCAE32013F81F5DD58@STFMSX01.staff.cpce.hk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Garamond;
        panose-1:2 2 4 4 3 3 1 1 8 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Garamond","serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1"><span
style="font-family:"Garamond","serif"">Also,
I would resort from shelling out to decrypt (the code I post
earlier is a proof-of-concept but the execution is flawed for
simultaneous accesses), but I would opt for calling GPG API
instead.<o:p></o:p></span></div>
</blockquote>
<br>
If you want to do this on the SP side, use Scott's link as a general
guide, but the plugin type you'll want to implement is an
AttributeDecoder. In the Shibboleth SP source, the definition is in
<br>
<br>
/shibsp/attribute/AttributeDecoder.h<br>
<br>
In that same directory, the StringAttributeDecoder.cpp file might
serve as a useful starting point, assuming you want to end up with a
string value after decryption. You'd basically be hooking in your
GPG API calls just prior to the dest.push_back(val.get()) call on
line 111 (SVN commit 3883 = SP release 2.5.3).<br>
<br>
Then, in your attribute-map.xml file, you'd specify an
AttributeDecoder for the encrypted Attribute with your plugin as the
xsi:type.<br>
<br>
If you want to do it on the IdP side, the easiest way (if the GPG
API is available as a Java .jar) would be to use a
ScriptedAttributeDefinition in the attribute-resolver.xml for that
attribute, and call the GPG API functions from the script. See the
docs for ScriptedAttributeDefinition for more info and examples:<br>
<br>
<a
href="https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverScriptAttributeDefinition">https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverScriptAttributeDefinition</a><br>
<pre class="moz-signature" cols="72">--
%% Christopher A. Bongaarts %% <a class="moz-txt-link-abbreviated" href="mailto:cab@umn.edu">cab@umn.edu</a> %%
%% OIT - Identity Management %% <a class="moz-txt-link-freetext" href="http://umn.edu/~cab">http://umn.edu/~cab</a> %%
%% University of Minnesota %% +1 (612) 625-1809 %%
</pre>
</body>
</html>