I use Apache2.4 with mod_mellon as a SAML auth solution against Azure. This works okay, but I'm like to have the UPN of the user in my custom logs.
So I tried different approaches but without luck yet:
CustomLog /var/log/apache2/myhost_request.log \
"%t %h %{MELLON_NAME_ID}e %{SSL_PROTOCOL}x %{SSL_CIPHER}x %H \"%r\" %b"
I also tried with %{MELLON_NAME_ID}x which I found somewhere, but still no output.
Is it not available to the logging engine? If so, is there a work-around for this?
I found a hint that led to a solution here:
One needs to modify the SP XML that is generated by the "mellon_create_metadata.sh" script like this:
becomes:
After adding the line, the user appears with his/her e-mail-address in the log. I think that's okay for my purpose.