This content has been marked as final.
Show 6 replies
-
1. Re: VB.NET Client and JBoss
anil.saldhana Apr 6, 2006 4:57 PM (in response to ppollard)In the server.xml of your tomcat sar in jboss, look for the following block:
<!-- Add this option to the connector to avoid problems with .NET clients that don't implement HTTP/1.1 correctly restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$" -->
That should give you some pointers. -
2. Re: VB.NET Client and JBoss
ppollard Apr 6, 2006 5:30 PM (in response to ppollard)Adding that to the connector didn't seem to change anything.
-
3. Re: VB.NET Client and JBoss
ppollard Apr 6, 2006 6:04 PM (in response to ppollard)Here's my connector:
<Connector port="8080" address="${jboss.bind.address}" maxThreads="250" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$" />
Here's a snippet of the vb.net code:Dim cred As New System.Net.NetworkCredential cred.UserName = "user" cred.Password = "password" Dim objReq As New secTest.getValue Dim objResp As New secTest.getValueResponse Dim service As New secTest.HelloSettings service.PreAuthenticate = True service.Credentials = cred objResp = service.getValue(objReq) Console.WriteLine(objResp.result)
-
4. Re: VB.NET Client and JBoss
anil.saldhana Apr 8, 2006 11:59 AM (in response to ppollard)Try point 4 of http://wiki.jboss.org/wiki/Wiki.jsp?page=SecurityFAQ to debug things on the serverside.
-
5. Re: VB.NET Client and JBoss
ppollard Apr 10, 2006 2:45 PM (in response to ppollard)After turning on the server side debugging, here is what i got:
2006-04-10 13:08:54,101 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Saw unauthenticatedIdentity=guest 2006-04-10 13:08:54,111 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] findResource: null 2006-04-10 13:08:54,162 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Properties file=file:/C:/jboss-4.0.3SP1/server/AuthTest/conf/props/auth-users.properties, defaults=null 2006-04-10 13:08:54,162 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[guest, phil] 2006-04-10 13:08:54,162 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] findResource: null 2006-04-10 13:08:54,172 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Properties file=file:/C:/jboss-4.0.3SP1/server/AuthTest/conf/props/auth-roles.properties, defaults=null 2006-04-10 13:08:54,172 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[guest, phil] 2006-04-10 13:08:54,172 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] login 2006-04-10 13:08:54,172 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Authenticating as unauthenticatedIdentity=guest 2006-04-10 13:08:54,172 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] User 'guest' authenticated, loginOk=true 2006-04-10 13:08:54,172 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] commit, loginOk=true 2006-04-10 13:08:54,242 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Enter: doHandleRequest 2006-04-10 13:08:54,242 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Exit: doHandleRequest with status: true
My username in the .net code (phil) appears to be getting through to JBoss. It is in the users array. But it is not using that as the user making the call. It is using the 'guest' user. How do i make it use the username that is making the call instead of the unauthenticatedIdentity? -
6. Re: VB.NET Client and JBoss
ppollard Apr 10, 2006 5:50 PM (in response to ppollard)OK. I've switched to a Java Client to make sure that the problem was on the .NET side. However, i still get the same result. In my java client, i have the following:
Stub stub = (Stub) endPoint; stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, URL); stub._setProperty(Stub.USERNAME_PROPERTY,user); stub._setProperty(Stub.PASSWORD_PROPERTY,password); String response = endPoint.getValue();
And in my web service, i have:if (mysc.isCallerInRole("TheRoleICheck")) { System.out.println("After 1"); return "Is in role"; } else { System.out.println("After 2"); return "Not in role"; }
I always get whats in the else statement. Am i trying to authenticate my java client correctly? I'm sure that the username i pass in my client is in that role in my properties file.