tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ognjen.d.blagoje...@gmail.com>
Subject Re: FW: configuring realm UserDatabase do not works
Date Tue, 13 Aug 2013 07:30:26 GMT
Francesco,

On 13.8.2013 1:01, Francesco Viscomi wrote:
> When I try to access the protect resource I get:
(...)
> HTTP Status 403 - Access to the requested resource has been denied

Error 403 means that user is authenticatied but not authorized (e.g. 
username and password are correct, but something is wrong with 
configuration of roles).


> 1)  Adding the following statement to the the tomcat-user.xml:
> <role rolename="UserRole"/>
> <user username="user" password="uuu" role="UserRole"/>

Here is your problem. Name of the attribute for <user> tag is "roles", 
not "role". You should change that to:

   <role rolename="UserRole"/>
   <user username="user" password="uuu" roles="UserRole"/>


BTW, this is tricky to notice, since Tomcat will not validate file 
tomcat-users.xml against a schema.

-Ognjen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message