[jboss-dev-forums] [JBoss AS7 Development] - BASIC Authentication in AS7
c go
do-not-reply at jboss.com
Tue May 3 03:28:00 EDT 2011
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&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110503/5b305ba2/attachment.html
More information about the jboss-dev-forums
mailing list