<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>On my old server with shib SP 2.4.3 and apache 2.2.16-6 I use to
      protect a login location with <br>
    </p>
    <p><Location /shibwayf><br>
       AuthType shibboleth<br>
       ShibRequestSetting requireSession 0<br>
       require shibboleth<br>
      # require valid-user<br>
      </Location><br>
      <br>
    </p>
    <p>and it worked fine, REMOTE_USER was populated with eppn attribute</p>
    <p>Now on my new server with shibboleth 2.5.3  and apache 2.4.18 ,
      REMOTE_USER keeps beeing empty </p>
    <p>shibboleth2.xml does contains : <ApplicationDefaults
      entityID=<a class="moz-txt-link-rfc2396E" href="http://cat-med.int.fr/sp">"http://cat-med.int.fr/sp"</a><br>
                               <b>REMOTE_USER="eppn</b> persistent-id
      targeted-id"><br>
    </p>
    <p>I did adapted (I think, unless miss enterpreted ?)  shib
      directives in apache according to </p>
    <p><a
href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPhtaccess">https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPhtaccess</a><br>
      <a
href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig">https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig</a></p>
    <p>so now I have<br>
    </p>
    <p><Location /shibwayf><br>
       ShibRequireSession On<br>
       AuthType shibboleth<br>
       require shib-session<br>
      </Location><br>
    </p>
    <p>but my perl script that returns shib vars , keeps showing
      REMOTE_USER empty, and no eppn attribute</p>
    <p>Although shibd transaction.log file does show</p>
    <p>2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]: New session
      (ID: _55603840c23568736392b95fa148915c) with (applicationId:
      default) for principal from (IdP:
      <a class="moz-txt-link-freetext" href="https://idp3.int.fr/idp/shibboleth">https://idp3.int.fr/idp/shibboleth</a>) at (ClientAddress:
      137.149.2.21) with (NameIdentifier:
AAdzZWNyZXQxLGNVJLa11v9lqrUjFkxbiOPuDtRXTo/f0NuZPQ4hbu/CQUMS3Tw8ASwSiT0sXdM3a6r4wSsJsp4eUpz3UiWclieM/KJt0e1VfsCfJml6IKX0btnOg4THDxVibOn3gHL8kmZiXmWSz+F1Lz6Klf4=)
      using (Protocol: urn:oasis:names:tc:SAML:2.0:protocol) from
      (AssertionID: _d8df6c0d8f905f32af0fc3e766d9a911)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]: Cached the
      following attributes with session (ID:
      _55603840c23568736392b95fa148915c) for (applicationId: default) {<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:    
      entitlement (7 values)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:     sn (1
      values)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:     mail (1
      values)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:    
      unscoped-affiliation (1 values)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:    
      displayName (1 values)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:    
      primary-orgunit-dn (1 values)<br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:     givenName
      (1 values)<br>
      <b>2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]:     eppn
        (1 values)</b><br>
      2018-01-26 15:34:22 INFO Shibboleth-TRANSACTION [5]: }<br>
    </p>
    <p>here's my CGI perl <br>
    </p>
    <p><i>#!/usr/bin/perl</i><i><br>
      </i><i><br>
      </i><i>print "Content-type: text/html\n\n";</i><i><br>
      </i><i><br>
      </i></p>
    <p><i>print "<pre>\n";</i><i><br>
      </i><i><br>
      </i><i>foreach $key (sort keys(%ENV)) {</i><i><br>
      </i><i>  print "$key = $ENV{$key}<p>";</i><i><br>
      </i><i>}</i><i><br>
      </i><i>print "</pre>\n";</i><br>
    </p>
    <p>it returns among others </p>
    <p><br>
    </p>
    <h3>
      <pre><p>QUERY_STRING = </p><p>REMOTE_PORT = 56972</p><p><u>REMOTE_USER = </u></p><p>REQUEST_METHOD = GET</p><p>REQUEST_SCHEME = https</p><p>REQUEST_URI = /shibwayf/shibtest.pl</p></pre>
    </h3>
    <h3>
      <pre><p>Shib_Application_ID = default</p><p>Shib_Authentication_Instant = 2018-01-26T14:34:46.921Z</p><p>Shib_Authentication_Method = urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</p><p>Shib_AuthnContext_Class = urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</p><p>Shib_Identity_Provider = <a class="moz-txt-link-freetext" href="https://idpmt.tem-tsp.eu/idp/shibboleth">https://idpmt.tem-tsp.eu/idp/shibboleth</a></p><p>Shib_Session_ID = _79a39530eaa16b476da62f1ff005ff39</p><p>Shib_Session_Index = _45fe0a10df95cb4dcafb183719a5ec2e</p></pre>
    </h3>
    <p>but no </p>
    <h3>
      <pre>REMOTE_USER = <a class="moz-txt-link-abbreviated" href="mailto:procacci@int.fr">procacci@int.fr</a></pre>
    </h3>
    <h3>
      <pre><p>eppn = <a class="moz-txt-link-abbreviated" href="mailto:procacci@int.fr">procacci@int.fr</a></p><p>unscoped_affiliation = employee</p></pre>
    </h3>
    <p>As I used to have in my old server</p>
    <p>did I missed something in my apache <location> or
      shibboleth2.xml config ?</p>
    <p>Regards .</p>
    <h3>
      <pre><p>
</p></pre>
    </h3>
  </body>
</html>