You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by lmk <lo...@yahoo.fr> on 2008/08/20 18:44:29 UTC

tomcat 5.5 DataSourceRealm not taken in charge

hello all,

I try ti use tomcat security management with DataSourceRealm but I never get 
authentication console, log shows that user 'Successfully passed all
security constraints'
I declare Realm inside server.xml:

<Realm className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="jdbc/auth" userTable="USERS" userNameCol="login"
userCredCol="password" />

and security constraints on web.xml

<security-constraint>
  <display-name>TOMCAT SECURITY</display-name>
  <web-resource-collection>
   <web-resource-name>Entire Application</web-resource-name>
   <url-pattern>/*</url-pattern>   
  </web-resource-collection>
 </security-constraint>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>

did  I forget anything..?

thanks!


-- 
View this message in context: http://www.nabble.com/tomcat-5.5-DataSourceRealm--not-taken-in-charge-tp19073540p19073540.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: tomcat 5.5 DataSourceRealm not taken in charge

Posted by lmk <lo...@yahoo.fr>.
yes I set all parameters on the realm defined on the server.xml, but, I
forgot realm definition on the context.xml, so, tomcat use first realm on
the context.xml.
it works fine now..
thanks a lot..



Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> To whom it may concern,
> 
> lmk wrote:
>> it seems that role is mandatory, so i add role name,
>> now user authenticated successfully but it he cannot access to resources
>> because of exception:
>> exception retrieving roles for "USERNAME"
> 
> You have not set any of the following attributes on the <Realm>:
> 
> userRoleTable
> roleNameCol
> 
> Please see http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html for
> details.
> 
>> I defined the Roles table and role columns inside releam and the user
>> USERNAME has an athorized role..
> 
> No, you didn't:
> 
>> <Realm className="org.apache.catalina.realm.DataSourceRealm"
>> dataSourceName="jdbc/auth" userTable="USERS" userNameCol="login"
>> userCredCol="password" />
> 
> If you changed your <Realm> configuration, please post what you have, now.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkitmrIACgkQ9CaO5/Lv0PBNggCeL3pdmtguMcyEace9pRLQzQGp
> cy8An2/lzZ+tqgCQD8jo9tLvHmKjuWL6
> =qXoP
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/tomcat-5.5-DataSourceRealm--not-taken-in-charge-tp19073540p19102853.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: tomcat 5.5 DataSourceRealm not taken in charge

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom it may concern,

lmk wrote:
> it seems that role is mandatory, so i add role name,
> now user authenticated successfully but it he cannot access to resources
> because of exception:
> exception retrieving roles for "USERNAME"

You have not set any of the following attributes on the <Realm>:

userRoleTable
roleNameCol

Please see http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html for
details.

> I defined the Roles table and role columns inside releam and the user
> USERNAME has an athorized role..

No, you didn't:

> <Realm className="org.apache.catalina.realm.DataSourceRealm"
> dataSourceName="jdbc/auth" userTable="USERS" userNameCol="login"
> userCredCol="password" />

If you changed your <Realm> configuration, please post what you have, now.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkitmrIACgkQ9CaO5/Lv0PBNggCeL3pdmtguMcyEace9pRLQzQGp
cy8An2/lzZ+tqgCQD8jo9tLvHmKjuWL6
=qXoP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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: tomcat 5.5 DataSourceRealm not taken in charge

Posted by lmk <lo...@yahoo.fr>.
thanks!
it seems that role is mandatory, so i add role name,
now user authenticated succefely but it he cannot access to ressources
because of exception:
exception retrieving roles for "USERNAME"
I defined the Roles table and role columns inside releam and the user
USERNAME has an athorized role..





Pid-2 wrote:
> 
> lmk wrote:
>> hello all,
>> 
>> I try ti use tomcat security management with DataSourceRealm but I never
>> get 
>> authentication console, log shows that user 'Successfully passed all
>> security constraints'
>> I declare Realm inside server.xml:
>> 
>> <Realm className="org.apache.catalina.realm.DataSourceRealm"
>> dataSourceName="jdbc/auth" userTable="USERS" userNameCol="login"
>> userCredCol="password" />
>> 
>> and security constraints on web.xml
>> 
>> <security-constraint>
>>   <display-name>TOMCAT SECURITY</display-name>
>>   <web-resource-collection>
>>    <web-resource-name>Entire Application</web-resource-name>
>>    <url-pattern>/*</url-pattern>   
>>   </web-resource-collection>
> 
> <auth-constraint>
>   <role-name>someusertype</role-name>
> <auth-constraint>
> 
>>  </security-constraint>
>>  <login-config>
>>   <auth-method>BASIC</auth-method>
>>  </login-config>
> 
> <security-role>
>   <role-name>someusertype</role-name>
> </security-role>
> 
> p
> 
> 
>> did  I forget anything..?
>> 
>> thanks!
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/tomcat-5.5-DataSourceRealm--not-taken-in-charge-tp19073540p19085907.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: tomcat 5.5 DataSourceRealm not taken in charge

Posted by Pid <p...@pidster.com>.
lmk wrote:
> hello all,
> 
> I try ti use tomcat security management with DataSourceRealm but I never get 
> authentication console, log shows that user 'Successfully passed all
> security constraints'
> I declare Realm inside server.xml:
> 
> <Realm className="org.apache.catalina.realm.DataSourceRealm"
> dataSourceName="jdbc/auth" userTable="USERS" userNameCol="login"
> userCredCol="password" />
> 
> and security constraints on web.xml
> 
> <security-constraint>
>   <display-name>TOMCAT SECURITY</display-name>
>   <web-resource-collection>
>    <web-resource-name>Entire Application</web-resource-name>
>    <url-pattern>/*</url-pattern>   
>   </web-resource-collection>

<auth-constraint>
  <role-name>someusertype</role-name>
<auth-constraint>

>  </security-constraint>
>  <login-config>
>   <auth-method>BASIC</auth-method>
>  </login-config>

<security-role>
  <role-name>someusertype</role-name>
</security-role>

p


> did  I forget anything..?
> 
> thanks!
> 
> 


---------------------------------------------------------------------
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