Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon1.gif   Use X-Forwarded-User as preset in author field, posted by Stefano Lacaprara on Tue May 16 10:21:18 2017 
    icon2.gif   Re: Use X-Forwarded-User as preset in author field, posted by Christof Hanke on Wed May 17 08:42:17 2017 
       icon2.gif   Re: Use X-Forwarded-User as preset in author field, posted by Stefano Lacaprara on Thu May 18 09:39:16 2017 
          icon2.gif   Re: Use X-Forwarded-User as preset in author field, posted by Christof Hanke on Thu May 18 10:37:16 2017 
             icon2.gif   Re: Use X-Forwarded-User as preset in author field, posted by Christof Hanke on Thu May 18 10:51:05 2017 
                icon2.gif   [solved] Re: Use X-Forwarded-User as preset in author field, posted by Stefano Lacaprara on Thu May 18 16:55:42 2017 
Message ID: 68620     Entry time: Tue May 16 10:21:18 2017     Reply to this: 68621
Icon: Entry  Author: Stefano Lacaprara  Author Email: stefano.lacaprara@pd.infn.it 
Category: Question  OS: Linux  ELOG Version: 3.1.1 
Subject: Use X-Forwarded-User as preset in author field 
Hi,
  I have an elog server which uses apache/ldap for authentication.
I would like to have the username used for ldap to be set automatically as author field in the elog.

I'm using: 
Authentication = Webserver
and I do set the env-variable X-Forwarded-User correctly to the ldap username

GET /test/?cmd=New HTTP/1.1
Host: localhost:8080
Authorization: Basic bGFjYXByYXI6TWEwMiSyYnVt
...
Cookie: elmode=Summary; sid=D7DE678B7CAA1D10; ufnm=lacaprar; urem=0
...
X-Forwarded-User: lacaprar

How can I preset author to X-Forwarded-User?
Preset Author = $??
I've tried $short_name/$long_name but I got Anonymous.
I understand that it is so because these are meant to be filled when password authentication is used: any way to use some other variable with the Webserver auth?

thanks in advance,
  Stefano
ELOG V3.1.5-3fb85fa6