2021-12-03

How to get username after successful kerberos authentication using NGINX?

I have followed this tutorial (https://techexpert.tips/nginx/nginx-kerberos-authentication/) to creates a "special page" /test on my NGINX server that requires successful Kerberos authentication to access it. So this much works. The problem is, I want the application to know who actually just successfully authenticated to the site so I can show them their specific information. So, for example, instead of popping up a page that says this to everyone: Nginx authentication test I want to have a page that will add the authenticated Kerberos username to the output or issue a cookie with the authenticated username in it. This needs to support multiple, simultaneous users accessing the website so each will have access to their own information.

I should add that when I tailf the /var/log/nginx/access.log, I see a line that gets spit out with two dashes and what appears to be browser information from the browser accessing the site. Then after successful Kerberos authentication, another line gets spit out to that log that has what appears to be the username filled in for the second dash. So it seems like this information is available somewhere in nginx if I could only get access to it. I don't really want to grab it from the access.log file. ;-)



from Recent Questions - Stack Overflow https://ift.tt/3rKSZb5
https://ift.tt/eA8V8J

No comments:

Post a Comment