1
byu_xj
SVN Apache and Xoops users
  • 2006/5/13 3:00

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


I have been working to get Apache2 WebDAV with SVN to authenticate against the XOOPS user database. I wanted to duplicate the work done byhttp://blog.platinumsolutions.com/node/46

I can proclaim success on the first goal of the project. I will not detail the steps to get apache2 SVN and auth_mysql installed. After these are installed and apache2 is running properly then you can modify the apache configuration file for SVN.

Here are the contents of my configuration file.
<IfDefine SVN>
        <
IfModule !mod_dav_svn.c>
                
LoadModule dav_svn_module       modules/mod_dav_svn.so
        
</IfModule>
        <
Location /svn>
                
DAV svn
                SVNParentPath 
/usr/data/repository/
                
AuthType Basic
                AuthName 
"Subversion repository"
                
SSLRequireSSL
                AuthMySQLUser auth_svn
                AuthMySQLPassword pass
                AuthMySQLDB xoops_database
                AuthMySQLUserTable xxxx_users
                AuthMySQLNameField loginname
                AuthMySQLPasswordField pass
                AuthMySQLPwEncryption md5
                
Require valid-user
        
</Location>
        <
IfDefine SVN_AUTHZ>
                <
IfModule !mod_authz_svn.c>
                        
LoadModule authz_svn_module     modules/mod_authz_svn.so
                
</IfModule>
        </
IfDefine>
</
IfDefine>


The directives in the above code should obviously be modified for your installation of xoops.
AuthMySQLUser auth_svn
AuthMySQLPassword auth


These are the directives that specify the username and password of a MySQL user that has select permission on the user table of the XOOPS database.

This above will allow access control to svn repositories from all registered users in the XOOPS database. The next step is to get group control integrated. I do not know php or MySQL but getting group integration is as easy as writing a XOOPS script to write a flat text file in the proper format and in the proper location.

If any of you are interested doing this then here is a link that descibes the format(among other things).
http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV



2
byu_xj
Re: htpasswd auth system
  • 2006/5/4 20:12

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Ok now I am stuck.

Here is what I have:

AuthMySQLDB my_xoopsdb
AuthMySQLUserTable xxxx_users
AuthMySQLNameField uname
AuthMySQLPasswordField pass

Am I using the correct entries for

AuthMySQLNameField uname
AuthMySQLPasswordField pass

I have checked the access for this database from the commandline and it will work. I am not certain what other thing I could be missing.

Edit:
I also checkout the directive

AuthMySQLPwEncryption md5

Is this the correct encryption? Here are the options

AuthMySQLPwEncryption none | crypt | scrambled | md5 | aes | sha1



3
byu_xj
Re: htpasswd auth system
  • 2006/5/4 19:43

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Making progress. I now have authorization via a MySQL database. It is a test database but it works.

Here are my settings in 47_mod_dav_svn.conf (This is the apache subversion configuration file)

<IfDefine SVN>
        <
IfModule !mod_dav_svn.c>
<
IfDefine SVN>
        <
IfModule !mod_dav_svn.c>
                
LoadModule dav_svn_module       modules/mod_dav_svn.so
        
</IfModule>
        <
Location /svn>
                
DAV svn
                SVNParentPath 
/usr/data/repository/
                
AuthType Basic
                AuthName 
"Subversion repository"
                
SSLRequireSSL
                
#AuthUserFile /var/svn/conf/svnusers
                
AuthMySQLUser authuser
                AuthMySQLPassword PaSsW0Rd
                AuthMySQLDB auth
                AuthMySQLUserTable users
                AuthMySQLNameField user_name
                AuthMySQLPasswordField user_passwd
                
Require valid-user
        
</Location>
        <
IfDefine SVN_AUTHZ>
                <
IfModule !mod_authz_svn.c>
                        
LoadModule authz_svn_module     modules/mod_authz_svn.so
                
</IfModule>
        </
IfDefine>
</
IfDefine>



4
byu_xj
Re: htpasswd auth system
  • 2006/5/4 18:15

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Here is what I am looking for. I will see if I can implement this to access a XOOPS database.

http://www.svnforum.org/2017/viewtopic.php?t=730&sid=00051f6193e7d3257f4756b8afc2e60d


Here is the entry for the <location /svn> </location> tag.

<Location /svn>
  
DAV svn
  SVNPath 
/path/repository
  AuthType Basic
  AuthName 
"Subversion repository"
  
Auth_MySQL_Username sql_user
  Auth_MySQL_Password sql_pw
  Auth_MySQL_DB sql_db
  Auth_MySQL_Password_Table sql_table
  Auth_MySQL_Username_Field username
  Auth_MySQL_Password_Field password
  Auth_MYSQL_Group_Table sql_table
  Auth_MYSQL_Group_Field group
  Auth_MySQL_Encrypted_Passwords On
  Auth_MySQL_Non_Persistent On
  Auth_MYSQL_Empty_Passwords Off
  Auth_MySQL On
  
Require valid-user
  
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require 
group admin
  
</LimitExcept>
</
Location>
<
Location /svn/trunk>
  Require 
valid-user
  Satisfy Any
  
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require 
group admin
  
</LimitExcept>
</
Location>
<
Location /svn/branches/testing>
  Require 
valid-user
  
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require 
group admin groupa
  
</LimitExcept>
</
Location>


In the above the "sql_user" and "sql_pw" is a MySQL user that has the ability to select from the "sql_db".

My myql querry skills are not that strong so I will probably fumble around with this for some time before it is perfect but I think that it is a step in the right direction.



5
byu_xj
Re: htpasswd auth system
  • 2006/5/4 15:31

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


I am looking for the same solution. I thought that there would be a module for this but I have not found one yet.

The WEBDAV link with SUBVERSION in it basic form uses htaccess files. You create username password combinations with with

% htpasswd2

I was hoping to find a module that would write XOOPS usernames and passwords to a file for this type of htaccess. This way you could use XOOPS access control on your subversion repositories.


The alternative would be for me to learn how to get htaccess to querry the XOOPS database. I have not figured this out either.



6
byu_xj
Re: What makes a PHP-script a Xoops module?
  • 2006/2/7 12:25

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


I agree that these might simply be modules in training, but a new user like me could hardly tell the difference at first. To get the appropriate visibliity I think that these should be included in the modules repository but they should not be given the same status as a real module.

Purhaps a scipts section of the modules repository.

This way I could see clearly that they are available when I am looking in the repository for a solution, but I would also see that they are not actual modules.



7
byu_xj
Re: User/group permission for content module
  • 2006/2/6 22:41

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Well this is the type of module that I am looking for. I think that I can get it to work in the mannor that I had hoped. Thanks for pointing me in this direction.



8
byu_xj
Re: User/group permission for content module
  • 2006/2/4 18:25

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Yes, I did try the Article module but I did not include that in the list. To be honest this is my first XOOPS site so I have tried about every content/news/blog module that I could find in the repository to see if they were simple to use and to see which I liked best.

I am designing a family site where I would like my extended family to be able to easily load static html pages through XOOPS.

I just looked at WF-channel and It is a little further away from the functionality that I am interested in. The look and feel of Content is what I am happy with. It is simple to use and I think that I could easily explain to my Mom how to get some information on the web.

If I had a magic php/XOOPS/mysql wand I would add a set of permissions features to the Content module.

1) I would add the ability to allow CREATE permission based on GROUP ID.

2) I would limit EDIT and DELETE permissions to the user who created the page. This user could share EDIT permissions with other USERS or GROUP.

3) The user would be able to mark the page as visable.

4) All module administrators would have the ability to modify the page in any way.

5) I would include all CREATED pages in the Extend Profile of the user



9
byu_xj
Re: User/group permission for content module
  • 2006/2/4 17:24

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


I think that I have found a solution in WF-Chanel and cloning of WF-Chanel. I have not tried this aproach yet but it looks promising.

Here is some discussion on this topic
https://xoops.org/modules/repository/singlefile.php?cid=94&lid=1464
https://xoops.org/modules/newbb/viewtopic.php?topic_id=26041



10
byu_xj
Re: User/group permission for content module
  • 2006/2/4 4:10

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Unfortunately I am looking for more than a blog. I would like to allow my users to create there own static HTML pages within pre-defined catagories.

I tried XOOPS Planet but it is mainly a blogging tool. I probably will include it in the site but it does not fullfill the role that I am interested in.




TopTop
(1) 2 »



Login

Who's Online

272 user(s) are online (171 user(s) are browsing Support Forums)


Members: 0


Guests: 272


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits