Thanks for reply.
I have seen the links suggested by you, but in my case there
is no change in
'users' table in 'authority' database. 'users' is the
table where I am
storing 'user_name' and 'user_pass'.
I am using 'mm.mysql-2.0.4-bin.jar' driver in
'%TomcatHome%\Server\Lib'
folder
However through this I am able to authenticate Slide. I am
mentioning the
contents of my 'domain.xml' file below. Whether it require
any correction.
Or I should do other entries also.
Other than this I have done following entry in
'Server.xml' also to
implement JDBCRealm.
-------------------------
[server.xml]
-------------------------
<Realm
className="org.apache.catalina.realm.JDBCRealm"
debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority?user=r
oot;password=root"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
roleNameCol="role_name" />
-------------------------
-------------------------
[domain.xml]
-------------------------
...
...
- <configuration>
- <!-- Paths configuration
-->
<userspath>/users</userspath>
- <!-- Roles definition
-->
<role
name="root">slideroles.basic.RootRole</rol
e>
<role
name="user">slideroles.basic.UserRole</rol
e>
<role
name="guest">slideroles.basic.GuestRole</r
ole>
- <!-- Users management
-->
<auto-create-users>true</auto-create-users>
- <!--
<auto-create-users>root</auto-create-users>
-->
- <!--
<auto-create-users-role>user</auto-create-users-rol
e>
<auto-create-users-role>slideroles.basic.UserRole</
auto-create-users-role>
<auto-create-users-role>org.apache.slide.structure.Sub
jectNode</auto-create-users-role>
-->
<auto-create-users-role>slideroles.basic.RootRoleImpl&
lt;/auto-create-users-role>
- <!-- Actions mapping
-->
<read-object>/actions/read</read-object>
<create-object>/actions/write</create-object>
<remove-object>/actions/write</remove-object>
<grant-permission>/actions/write-acl</grant-permiss
ion>
<revoke-permission>/actions/write-acl</revoke-permi
ssion>
<read-permissions>/actions/read-acl</read-permissio
ns>
<read-own-permissions>/actions/read-current-user-privi
lege-set</read-own-permissions>
<lock-object>/actions/write</lock-object>
<kill-lock>/actions/unlock</kill-lock>
<read-locks>/actions/read</read-locks>
<read-revision-metadata>/actions/read</read-revisio
n-metadata>
<create-revision-metadata>/actions/write-properties<
;/create-revision-metadata>
<modify-revision-metadata>/actions/write-properties<
;/modify-revision-metadata>
<remove-revision-metadata>/actions/write-properties<
;/remove-revision-metadata>
<read-revision-content>/actions/read</read-revision
-content>
<create-revision-content>/actions/write-content</cr
eate-revision-content>
<modify-revision-content>/actions/write-content</mo
dify-revision-content>
<remove-revision-content>/actions/write-content</re
move-revision-content>
<bind-member>/actions/bind</bind-member>
<unbind-member>/actions/unbind</unbind-member>
- <!-- Paths configuration
-->
<userspath>/users</userspath>
<rolespath>/roles</rolespath>
<actionspath>/actions</actionspath>
<filespath>/files</filespath>
<auto-create-users>true</auto-create-users>
<parameter
name="dav">true</parameter>
<parameter
name="standalone">true</parameter>
<parameter
name="acl_inheritance_type">path</paramete
r>
- <!-- Nested roles: 0 means no nesting (default), 1
means one sublevel,
etc.
-->
<parameter
name="nested_roles_maxdepth">0</parameter&
gt;
- <!-- Can be "off", "write" and
"full"
-->
<parameter
name="sequential-mode">full</parameter>
- <!-- "false" lets all read-only methods be
executed outside of
transactions
-->
<parameter
name="all-methods-in-transactions">true</p
arameter>
- <!-- Setting this to true will force Slide to
internally convert the
username a user
enters at login to lowercase. This is
useful for users who
can't be bothered
with turning off their capslock key before
logging in.
-->
<parameter
name="force-lowercase-login">false</parame
ter>
</configuration>
- <data>
- <objectnode
classname="org.apache.slide.structure.SubjectNode&quo
t; uri="/">
- <!-- Subject can be:
any user "all"
authenticated user
"authenticated"
unauthenticated user
"unauthenticated"
self "self"
owner of resource "owner"
a user
"/users/john"
a role
"/roles/admin"
-->
<permission action="all"
subject="/roles/root"
inheritable="true" />
<permission action="/actions/read-acl"
subject="all" inheritable="true"
negative="true" />
<permission action="/actions/write-acl"
subject="all" inheritable="true"
negative="true" />
<permission action="/actions/unlock"
subject="all" inheritable="true"
negative="true" />
<permission action="/actions/read"
subject="all" inheritable="true"
/>
- <!-- /users
-->
...
...
-------------------------
Regards
-Rohit
Darren Hartford wrote:
>
> If you search the mailing list there is a number of
posts related to
> this.
>
> http://www.nabble.com/forum/Sear
ch.jtp?forum=336&local=y&query=auto+crea
> te+user
>
> Similar results when you search the Wiki
> h
ttp://wiki.apache.org/jakarta-slide/AutoCreateUser
>
> -D
>
>> -----Original Message-----
>> From: rohitajm [mailto:rohitajm rediffmail.com]
>> Sent: Wednesday, August 16, 2006 3:30 AM
>> To: slide-user jakarta.apache.org
>> Subject: Automatic creation of users??
>>
>>
>> Hello All,
>>
>> I am using JDBCRealm for authentication of user in
Slide. For
>> this I am using MySQL. I have created table
'users', which
>> store usernames and their passwords. From this I am
able to
>> login as 'root' or 'john' or any other user
which already
>> exists in Slide.
>>
>> What I want is: Whenever I create a user in Slide
it should
>> automatically be created in MySQL database. Please
suggest
>> what changes I should do in 'server.xml' or
'domain.xml' or
>> in some other file.
>>
>> Please help.
>>
>> -rohit
>>
>
------------------------------------------------------------
---------
>
>
>
--
View this message in context: http://www.nabble.com/Automatic-creat
ion-of-users---tf2113715.html#a5846906
Sent from the Jakarta Slide - User forum at Nabble.com.
------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribe jakarta.apache.org
For additional commands, e-mail: slide-user-help jakarta.apache.org
|