c go [
http://community.jboss.org/people/goc] created the discussion
"BASIC Authentication in AS7"
To view the discussion, visit:
http://community.jboss.org/message/603131#603131
--------------------------------------------------------------
I'm running in some troubles using Basic Authentication in AS7 to secure the access to
a simple test servlet.
Standard error message is:
[org.jboss.security.auth.spi.UsersRolesLoginModule]
(http-localhost.localdomain-127.0.0.1-8080-1) Failed to load users/passwords/role files:
java.io.IOException: No properties file: users.properties or defaults:
defaultUsers.properties found
Specifying the users.properties & roles.properties files in standalone.xml causes the
same error:
[org.jboss.security.auth.spi.UsersRolesLoginModule]
(http-localhost.localdomain-127.0.0.1-8080-1) Failed to load users/passwords/role files:
java.io.IOException: No properties file: /absolute/path/to/users.properties or defaults:
defaultUsers.properties found
The application's jboss-web.xml file looks like this:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE jboss-web
PUBLIC -//JBoss//DTD Web Application 2.3V2//EN
http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd>
<jboss-web>
<security-domain>other</security-domain>
</jboss-web>
The servlet security is defined like this (web.xml):
<security-constraint>
<web-resource-collection>
<web-resource-name>All resources</web-resource-name>
<description>Protects all resources</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Test Realm</realm-name>
</login-config>
<security-role>
<role-name>role</role-name>
</security-role>
Is there anything obvious that I could be missing?
P.S.: Sorry for my English
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/603131#603131]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]