File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes BASIC authenication trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "BASIC authenication trouble" Watch "BASIC authenication trouble" New topic
Author

BASIC authenication trouble

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello:

I am trying to set up BASIC authentication on a servlet on OAS 10.1.3.1. I want to constrain every method of access to the servlet. I have created a realm through the Security Providers. Here are my web.xml:

<security-constraint>
<web-resource-collection>
<web-resource-name>CodeReloading</web-resource-name>
<url-pattern>/codereloadservlet</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>OPTIONS</http-method>
<http-method>DELETE</http-method>
<http-method>TRACE</http-method>
<http-method>HEAD</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>codereloadrole</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>codereloadrole</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>codereload</realm-name>
</login-config>

My realm ("codereload") has one role, "codereloadrole" and one user "user1" (password: "pass1") and the user is attached to the role. I get the popup login box when going to the servlet but user1/pass1 does not work. Am I missing some bit of configuration?

Thanks
Eric
John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
I figured out the problem . . . when using a custom realm you must prefix the user with the realm name e.g. codereload/user1. but now I get



BASIC authentication is supposed to be easier than this! Does anybody know what this means?

Thanks
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BASIC authenication trouble