<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body text="#000000" bgcolor="#FFFFFF">
Replying to myself...<br>
<br>
<blockquote type="cite" cite="mid:ece57067-0664-86e5-b4ee-3ccd4ec162bf@jisc.ac.uk">
Hello,<br>
<br>
I'm building a SAML AA entity that instead of storing attributes, uses a REST API to retrieve them from an external server. I'm using the HTTPConnector with partial success. The external server allows for header-based authorization. When disabled (ie. no authorization),
it works fine: the request is sent and the response is obtained, parsed and the attributes generated correctly.<br>
<br>
The problem is that if authorization is enabled, I need HTTPConnector to include the authorization header. It seems it must be done using
<span style="color: rgb(23, 43, 77); font-family: SFMono-Medium,
"SF Mono", "Segoe UI Mono", "Roboto
Mono", "Ubuntu Mono", Menlo, Courier, monospace;
font-size: 14px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400;
letter-spacing: normal; orphans: 2; text-align: left;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">
headerMapRef </span>but the documentation says it must be a Bean ID, and I'm not sure where this bean must be declared and I've found 0 examples around (there are literarily 2 Google results for "headerMapRef".<br>
</blockquote>
<br>
So, I finally ended up putting the following into c14n/subject-c14n.xml (I chose this file because it's a file I'm already mapping in my Docker environment).<br>
<br>
<tt> <util:map id="AuthHeaders"></tt><tt><br>
</tt><tt> <entry key="Authorization" value="thisismysecuretoken2"/></tt><tt><br>
</tt><tt> </util:map></tt><tt><br>
</tt><br>
In my attribute-resolver.xml I have the following:<br>
<br>
<tt><resolver:DataConnector id="myHTTP" xsi:type="resolver:HTTP"</tt><tt><br>
</tt><tt> httpClientRef="shibboleth.NonCachingHttpClient"</tt><tt><br>
</tt><tt> headerMapRef="AuthHeaders"></tt><br>
<br>
And it works. Do you have any recommendation on where to put the map definition? I bet subject-c14n.xml is not the best place ever, but I tried global.xml without success.<br>
<br>
Best,<br>
Alex<br>
<pre class="moz-signature" cols="72">--
Alejandro Perez-Mendez
Technical Specialist (AAA), Trust & Identity
M (+34) 619 333 219
Skype alejandro_perez_mendez
jisc.ac.uk</pre>
<font size="1"> <font face="Corbel"> <br />
Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.<br /><br />
Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.
</font></font></body></html>