B
Bradley E. Rintoul
Hello:
I'm having trouble getting BASIC authentication to work in Tomcat
using NetBeans as an IDE (maybe a irrelevant fact).
I have made the entries required in web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>
SecurityPages
</web-resource-name>
<description>
Security Constraint /login
</description>
<url-pattern>
/add/*
</url-pattern>
<http-method>
POST
</http-method>
<http-method>
GET
</http-method>
</web-resource-collection>
<auth-constraint>
<description>
Only admin users
</description>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>
BASIC
</auth-method>
<realm-name>
This realm
</realm-name>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
And I have made an entry in tomcat-users.xml listing the username,
password and role I'd like to have access.
The dialog box pops up as expected when trying to access anything in
/add, but after entering the username and password, the dialog box
keeps popping up! I know BASIC is not encrypted well and yadda-yadda,
but I don't want to go about attempting FORM based authentication if I
can't get this to work.
Any ideas out there? If any more information is required, I would be
happy to supply it. Could it be my Mozilla browser not implementing
the actions correctly?
Thanks in advance...
I'm having trouble getting BASIC authentication to work in Tomcat
using NetBeans as an IDE (maybe a irrelevant fact).
I have made the entries required in web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>
SecurityPages
</web-resource-name>
<description>
Security Constraint /login
</description>
<url-pattern>
/add/*
</url-pattern>
<http-method>
POST
</http-method>
<http-method>
GET
</http-method>
</web-resource-collection>
<auth-constraint>
<description>
Only admin users
</description>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>
BASIC
</auth-method>
<realm-name>
This realm
</realm-name>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
And I have made an entry in tomcat-users.xml listing the username,
password and role I'd like to have access.
The dialog box pops up as expected when trying to access anything in
/add, but after entering the username and password, the dialog box
keeps popping up! I know BASIC is not encrypted well and yadda-yadda,
but I don't want to go about attempting FORM based authentication if I
can't get this to work.
Any ideas out there? If any more information is required, I would be
happy to supply it. Could it be my Mozilla browser not implementing
the actions correctly?
Thanks in advance...