<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",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-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">To create attributes with “constant” or “static” values, look at the Static DataConnector. You will also need to make an AttributeDefinition for the attribute,
 and this will be a “Simple” AttributeDefinition whose source attribute ID is defined in your Static DataConnector.  And the Dependency will be the ID that you give your Static DataConnector.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="https://wiki.shibboleth.net/confluence/display/IDP30/StaticDataConnector">https://wiki.shibboleth.net/confluence/display/IDP30/StaticDataConnector</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="https://wiki.shibboleth.net/confluence/display/IDP30/SimpleAttributeDefinition">https://wiki.shibboleth.net/confluence/display/IDP30/SimpleAttributeDefinition</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Both of these will go in your attribute-resolver.xml file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Stephen C. Losen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">ITS - Systems and Storage<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">University of Virginia<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="mailto:scl@virginia.edu"><span style="color:#0563C1">scl@virginia.edu</span></a>    434-924-0640<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> users [mailto:users-bounces@shibboleth.net]
<b>On Behalf Of </b>Santu Ghosh<br>
<b>Sent:</b> Friday, November 24, 2017 9:48 AM<br>
<b>To:</b> Shib Users <users@shibboleth.net><br>
<b>Subject:</b> Re: Custom Attribute definitation<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks Rod and Peter.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Please my apologies for incomplete description.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Sure I will keep in mind everything that you guys advised.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks a lot.<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 24 Nov 2017 19:29, "Peter Schober" <<a href="mailto:peter.schober@univie.ac.at">peter.schober@univie.ac.at</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">* Santu Ghosh <<a href="mailto:mon.snahasish@gmail.com">mon.snahasish@gmail.com</a>> [2017-11-24 13:35]:<o:p></o:p></p>
<div>
<p class="MsoNormal">> To do this I have done in :<br>
><br>
> 1) attribute-resolver-full.xml<o:p></o:p></p>
</div>
<p class="MsoNormal">[...]<br>
> 2) attribute-resolver-ldap.xml<br>
<br>
None of these files are being used by the IDP by default, only<br>
attribute-resolver.xml is. The files you changed are merely examples<br>
(none of which you are following, so this is doubly useless).<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
> <AttributeDefinition xsi:type="Mapped" id="AREA"><br>
>         <DefaultValue>USA</DefaultValue><br>
>          <ValueMap><br>
>                 <ReturnValue>USA</ReturnValue><br>
>                  <SourceValue>USA</SourceValue><br>
>         </ValueMap><o:p></o:p></p>
</div>
<p class="MsoNormal">What should mapping "USA" to "USA" accomplish?<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
>  <AttributeDefinition xsi:type="Simple" id="AREA"><br>
>         <DefaultValue>USA</DefaultValue><br>
>          <ValueMap><br>
>                 <ReturnValue>USA</ReturnValue><br>
>                  <SourceValue>USA</SourceValue><br>
>         </ValueMap><o:p></o:p></p>
</div>
<p class="MsoNormal">Obviously (?) a "Simple" attribute defintion is not a mapped attribute<br>
defintion and therefore cannot have a ValueMap.<br>
<br>
Nothing you're doing here makes any sense. If the existing<br>
documentation doesn't help you can ask specific questions about parts<br>
that are unclear.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
> 3) ldap.properties<br>
><br>
> idp.attribute.resolver.LDAP.returnAttributes    = ou,uid,mail,surname,realm<o:p></o:p></p>
</div>
<p class="MsoNormal">The fact that you limit your default LDAP query to these attributes<br>
does not influence anything you're doing above. So this is immaterial<br>
unless you (later) want to generate something based on data from LDAP.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
> 4) global.xml<br>
><br>
> <bean id="abc" class="java.lang.String"><br>
>   <constructor-arg value="USA"/><br>
> </bean><br>
><br>
> <bean id="AREA" class="java.lang.String"><br>
>   <constructor-arg value="USA"/><br>
> </bean><o:p></o:p></p>
</div>
<p class="MsoNormal">Could you point out the documentattion that suggests this?<br>
<br>
To answer the (not asked) question of how to produce an attribute with a<br>
static string as its value:<br>
<br>
* You define a "Static" data connector that has an Attribute as child<br>
  element, with an id of your choice, and a Value child element with<br>
  the static string value.<br>
<br>
* You define a "Simple" attribute with a uniquie id and the<br>
  sourceAttributeID set to the id of the attribute you defined in the<br>
  Data COnnector. Also add a Dependency element to reference the data<br>
  connector.<br>
<br>
To release the attribute you write a filter rule referencing the id of<br>
the attribute you dedined, as always.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
> but above setting ends with an error.<o:p></o:p></p>
</div>
<p class="MsoNormal">No doubt. But for the future you'll also need to be specific and<br>
provide the error message. We do not have access to your system (nor<br>
do we want to) and most of us here are not clairvoyant.<br>
<span style="color:#888888"><br>
-peter</span><o:p></o:p></p>
<div>
<p class="MsoNormal">--<br>
For Consortium Member technical support, see <a href="https://wiki.shibboleth.net/confluence/x/coFAAg" target="_blank">
https://wiki.shibboleth.net/confluence/x/coFAAg</a><br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">
users-unsubscribe@shibboleth.net</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>