You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by rafabbri <ra...@libero.it> on 2008/08/05 15:34:57 UTC
tomcat5 and jaas
I'm a beginner in this technology and I try to configure Tomcat 5.0.28 in
order to use JAASRealm as detailed in the next link
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JAASRealm
but these informations seem to be not enought for my knoweledge.
I can't integrate jaas with tomcat, I don't know what I must write in
web.xml and in server.xml
In my server.xml I wrote a section like this:
<Realm className="org.apache.catalina.realm.JAASRealm"
appName="Sample"
userClassNames="sample.principal.SamplePrincipal"
debug="99"/>
but I don't now what I must do for roleClassNames
If you have a completed sample, plese send it
Thank's in advance
Excuse me for my bad english
--
View this message in context: http://www.nabble.com/tomcat5-and-jaas-tp18831242p18831242.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat5 and jaas
Posted by rafabbri <ra...@libero.it>.
Thank for your reply
In the mean time I did some steps a head
In web.xml I add the next lines:
<!-- Define a Security Constraint on this Application -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Sample</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>your-role</role-name>
</auth-constraint>
</security-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Sample</realm-name>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<description>
The role that is required to log in to the Manager Application
</description>
<role-name>your-role</role-name>
</security-role>
And now tomcat tell me login and password.
if the user is authenticated tomcat tell me the next message:
[SampleLoginModule] user entered user name: testUser
[SampleLoginModule] user entered password: testPassword
[SampleLoginModule] authentication succeeded
[SampleLoginModule] added SamplePrincipal to Subject
but in my browser I found the next error:
type Status report
message Access to the requested resource has been denied
description Access to the specified resource (Access to the requested
resource has been denied) has been forbidden.
I think that this error is due by a wrong role but I don't know how to send
tomcat a right role that in this case is "your-role"
Thank's in advance
--
View this message in context: http://www.nabble.com/tomcat5-and-jaas-tp18831242p18831826.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat5 and jaas
Posted by Mark Thomas <ma...@apache.org>.
rafabbri wrote:
> I'm a beginner in this technology and I try to configure Tomcat 5.0.28 in
The 5.0.x series is no longer supported. It is also quote old. You shoudl
consider upgrading to 5.5.x or better yet 6.0.x
> order to use JAASRealm as detailed in the next link
> http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JAASRealm
Those are the docs for 5.5.x, not 5.0.x. This may well be different. You'll
need to look at the docs that come with 5.0.28
> but these informations seem to be not enought for my knoweledge.
>
> I can't integrate jaas with tomcat, I don't know what I must write in
> web.xml and in server.xml
>
> In my server.xml I wrote a section like this:
>
> <Realm className="org.apache.catalina.realm.JAASRealm"
> appName="Sample"
> userClassNames="sample.principal.SamplePrincipal"
> debug="99"/>
> but I don't now what I must do for roleClassNames
You can ignore it - is is optional.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org