I am trying to test Waffle Integration with a Java EE Web Application running off Tomcat.
My requirement is to get the Windows client username that is accessing the application.
I am trying to test the integration without Active Directory installed. What I am doing is as follows
Firstly, will this work at all? Without Active Directory, will the waffle integration get the windows user name of the client machine at all.
This is my index.jsp that's supposed to be served when accessing the application
<%@page import="java.security.Principal" %>
<%@page import="waffle.windows.auth.WindowsAccount" %>
<%@page import="waffle.servlet.WindowsPrincipal" %>
<%@page import="com.sun.jna.platform.win32.Secur32" %>
<%@page import="com.sun.jna.platform.win32.Secur32Util" %>
<html>
<head>
<title>Testing Waffle</title>
</head>
<body>
You are logged in as remote user <b><%= request.getRemoteUser() %></b> in session <b><%= session.getId() %></b>.<br>
You are impersonating user <b><%= Secur32Util.getUserNameEx(Secur32.EXTENDED_NAME_FORMAT.NameSamCompatible) %></b>.
<br><br>
<%
if (request.getUserPrincipal() != null) {
%>
Your user principal name is <b><%= request.getUserPrincipal().getName() %></b>.
<br><br>
<%
} else {
%>
No user principal could be identified.
<br><br>
<%
}
%>
What is happening is as follows
server machine and accessing bylocalhost, the page opens up and prints as expected correctly as followsYou are logged in as remote user abc-PC\user1 You are impersonating user abc-PC\user1. Your user principal name is abc-PC\user1.
server machine, instead of localhost, if I put the IP, then an authentication pops up asking me to enter username & password. Here, if I enter the username & password, it shows the results as expected as above.client machine,when I put the IP, then an authentication pops up asking me to enter username & password. If I use the client windows username & password, then authentication failure happens. If I use server windows username & password, then authentication is successful but it prints the server windows username, as above.What am I doing wrong?
I read somewhere than instead of IP, the FQDN of the machine should be used. In this case, how will the URL look like?
--
You received this message because you are subscribed to the Google Groups "waffle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users+unsubscribe@googlegroups.com.