Skip to main content

403 access denied error when switching from localhost to machine IP

3 replies [Last post]
achugh
Offline
Joined: 2004-04-09

I've recently upgraded an existing application that would earlier run on Sun One v7 update 5 to now run on Sun Java App Server v9.1_02. It runs fine over a domain created under the 'developer' profile. I am able to access the web applications from the browser, e.g. when I browse to http://localhost:8080/webapp. However, as soon as I or someone else tries it through the machine address, say http://10.0.10.10:8080/webapp -- I get a 403 access denied error after login.

message: Access to the requested resource has been denied
description: Access to the specified resource (Access to the requested resource has been denied) has been forbidden.

I get this error even if I subsequently navigate to the web application using localhost. I have to bounce the domain in order to make it available again.

Has anyone faced this issue before? If so, how did you correct this problem?
Thanks in advance,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
achugh
Offline
Joined: 2004-04-09

To fix this error, ensure commitUserAuthentication(grpList) in the login-module doesn't use a final/static list of group-names.

kumarjayanti
Offline
Joined: 2003-12-10

is there any exception that you see in the server logs ?. Please attach web.xml as well.

If it is a BASIC auth webapp, then can you kill your browser after the 403 error and try to see if the same error persists when using localhost with new browser instance.

achugh
Offline
Joined: 2004-04-09

Nothing in the server logs, the web application seems to work fine when I default the domain to file-realm, (localhost, IP both work). The original issue I see when switching to a custom-realm that authenticates users against credentials in the database. I revised the code as per http://docs.sun.com/app/docs/doc/819-3672/beabs?l=en&a=view&q=appservrealm but I've obviously missed something out. I will investigate further into the root cause. Thanks,