<div dir="ltr"><div>I cant seem to get a handle on the attributes - no matter what I try.<br></div>e.g.<br><br><%<br>Response.Write(Request.ServerVariables("affiliation") & "<br><br>")<br>Response.Write(Request.ServerVariables("entitlement") & "<br><br>")<br>Response.Write(Request.ServerVariables("eppn") & "<br><br>")<br>Response.Write(Request.ServerVariables("persistent-id") & "<br><br>")<br>%><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 30, 2018 at 1:51 PM, Alexander F. French <span dir="ltr"><<a href="mailto:Alexander.F.French@dartmouth.edu" target="_blank">Alexander.F.French@dartmouth.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Scott,<br>
<br>
I didn't mean to try and draw any conceptual distinction- just provide what I think will be a working C# .NET code sample for Chanda, and illustrate the incorrect choices that are easy to stumble in to.<br>
<br>
The wiki explains the ideas quite clearly, but the .NET code sample at the bottom of the page is setup to send a programmer who is looking to read *attributes* in either of the wrong directions before they get to the working answer.<br>
<br>
When I'm writing C# .NET code, I find the compiler and the runtime are pretty set on the C# .NET terminology... so it tends to be material for writing working code.<br>
<br>
Alex<br>
<br>
-----Original Message-----<br>
From: users [mailto:<a href="mailto:users-bounces@shibboleth.net">users-bounces@<wbr>shibboleth.net</a>] On Behalf Of Cantor, Scott<br>
Sent: Monday, January 29, 2018 4:33 PM<br>
To: Shib Users <<a href="mailto:users@shibboleth.net">users@shibboleth.net</a>><br>
Subject: RE: Programmatic Access to SP Attributes<br>
<br>
> In .NET your attributes will be available as Server Variables:<br>
>       Request.ServerVariables.<wbr>GetValues("HTTP_BLAH");<br>
><br>
> Attributes will *not* be available in the Request Headers:<br>
>       //bad<br>
>       Request.Headers.GetValues("<wbr>HTTP_BLAH"); // won't exist<br>
>       //bad<br>
>       //you will find<br>
>       Request.Headers.GetValues("<wbr>BLAH");      //don't use this!  It's coming<br>
> from the user's browser and shouldn't be trusted!<br>
>       //bad<br>
<br>
I don't know what distinctions you're trying to draw but:<br>
<br>
a) The only way the ISAPI module (NOT the beta of the IIS7 module) makes the data available is in request headers, and<br>
<br>
b) they are not from the browser, they have to be sanitized and protected by the SP by clearing them and detecting attempts to spoof them, which the module does.<br>
<br>
They are in headers. Period. The native module changes that, allowing for either case.<br>
<br>
What the APIs do and what they seem to be called is immaterial, it's a mess of conflicting names and weird problems that is covered at some length in the wiki since some of them are inherently risky.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
For Consortium Member technical support, see <a href="https://wiki.shibboleth.net/confluence/x/coFAAg" rel="noreferrer" target="_blank">https://wiki.shibboleth.net/<wbr>confluence/x/coFAAg</a><br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.<wbr>net</a><br>
</font></span></blockquote></div><br></div>