svn not prompting while access svn repo - authentication

i have installed svn1.9.4(apache subversion) in fedoa 23. follow this link.
After that, Create and configure SVN repository then, goes to http://localhost/svn/testrepo it s not throw username ans password to authenticate to access the repo
Configuration files:
etc/httpd/conf.modules.d/10-subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
#AuthzSVNAccessFile /etc/svn-access-control
Require valid-user
</LimitExcept>
</Location>
var/www/svn/testrepo/conf/svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = testrepo
var/www/svn/gworksrepo/conf/passwd
[users]
user1 = password1
user2 = password2
Note: i refer this link, but still i have same issue
Suggest me Whats Wrong in my Configuration and how to fix this

Related

How to configure SVN access control

I want to restrict access of selected users to selected SVN repositories by Apache. However, as I did the configuration using the authz mechanism, I don't have any access to the repositories after logging into SVN. http://<my_server>/svn/ displays a "Collection of Repositories" list which is empty. http://<my_server>/svn/mytestrepo1 is showing "Forbidden You don't have permission to access this resource."
The configuration looks like this (Debian OS):
the repositories are located in /svn directory
I created the users with the command htpasswd -cm /etc/apache2/dav_svn.passwd admin1
content of the /etc/apache2/mods-enabled/dav_svn.conf file:
<Location /svn>
DAV svn
SVNParentPath /svn
SVNListParentPath On
AuthType Basic
AuthName "SVN repos"
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/svn_access.acl
# <LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
# </LimitExcept>
</Location>
content of the /etc/apache2/svn_access.acl file:
[groups]
admin = admin1
users = test1
[/]
* = r
#admin = rw
[repo:/mytestrepo1]
#users = rw
How can I solve this problem?
Ok, I found it. My svn_access.acl file had a lot of tabbed and commented lines. When I cleaned it and started with simple:
[/]
* = rw
it is working.

Integrate apache subversion with the active directory in windows server

Initially I have installed apache server 2.4 in windows server 2012 R2 and i have installed apache subversion 1.8.7 and i have copied module files(.so files) from subversion to apache server.I have created a repository. I have setup the "AuthUserFile" and "AuthzSVNAccessFile" I have given following code in httpd.conf
<Location /project1>
DAV svn
SVNPath E:\svn_testing\project1
AuthType Basic
AuthName "Subversion Project1 repository"
AuthUserFile c:/etc/svn-auth-file
Require valid-user
AuthzSVNAccessFile c:/etc/svn-acl
</Location>
I have used tortoise svn client to connect to repository which i have successfully connected I have successfully created files,commit the files.
Later i want to setup authentication with the active directory I have added following code in http.conf file
<Location /project1>
DAV svn
SVNPath E:\svn_testing\project1
SVNParentPath E:\svn_testing
SVNListparentPath on
Order allow,deny
Allow from all
AuthType Basic
AuthBasicProvider ldap
#AuthzLDAPAuthoritative off
AuthName "Active_directory_integration"
AuthzSVNAccessFile C:\etc\svn-acl
AuthLDAPURL "ldap://***********(ip address):389/DC=*******,DC=com?sAMAccountName?sub?(objectClass=*)"
#this assumes you have created a dedicated bind user "apache_bind" on your active directory
AuthLDAPBindDN "CN=Administrator,CN=users,DC=*******,DC=com"
#warning: this password for AD apache_bind user is in plain text!
AuthLDAPBindPassword *************
#AuthLDAPFollowReferrals off
AuthLDAPGroupAttributeIsDN on
AuthLDAPGroupAttribute member
#SSLRequireSSL
require ldap-group OU=********,DC=********,DC=com
#require valid-user
</Location>
But when i try to restart the server apache server it is showing "The Requested operation has failed" I have checked the log files but there is nothing there
It seem you are trying to search the whole AD-Catalog, as you do not specify any OU. this is not supported by Windows AD. However the whole Catalog is available by using port 3268
Please try this:
AuthLDAPURL "ldap://***********(ip address):3268/DC=*******,DC=com?sAMAccountName?sub?(objectClass=*)"
AuthLDAPGroupAttribute member
require ldap-group OU=********,DC=********,DC=com
Organizational Units (ou) dont have the attribute member, according to https://msdn.microsoft.com/en-us/library/ms683886(v=vs.85).aspx.
You should try the DN of the group you want to access your repo.
On my server this would look like this:
require ldap-group cn=thegroup,ou=groups,dc=example,dc=com
Notice the cn, which is a groupOfNames with the member attribute in my case.

svn tortoisesvn redirect cycle detected for URL

i know duplicate questions about my topic.
but other answer is not helping me.
below is my conf file(i show only changed conf compared to the default conf)
httpd.conf
<Directory />
AllowOverride none
#Require all denied (default)
Require all granted (change)
</Directory>
10-subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
Alias /test /home/svn/test
<Location /test>
DAV svn
SVNParentPath /home/svn/test
SVNListParentPath On
AuthType Basic
AuthName "SVN Repository"
</Location>
In test folder, it has repositry like repo1, repo2.
Below all works well in web browser.
http://127.0.0.1/test
http://127.0.0.1/test/repo1
http://127.0.0.1/test/repo1/trunk
http://127.0.0.1/test/repo1/tags
But in tortoise work not one link below:
http://127.0.0.1/test/repo1
this link show error below:
redirect cycel detected for URL 'http://127.0.0.1/test/repo1'
other link(/test, /test/repo1/tags, /test/repo2/trunk) works well.
how can i solve this error?
AuthType Basic
->
AuthType None
I solved it..

How to configure apache to serve http://svn.example.com/robots.txt?

I access SVN repositories via
http://svn.example.com/repo1
http://svn.example.com/repo2
...
with the following Apache configuration
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<VirtualHost xxx.xxx.xxx.xxx>
ServerName svn.example.com
<Location />
DAV svn
SVNParentPath /path/to/svn/repositories
AuthzSVNAccessFile /path/to/svn/conf/auth_policy
Satisfy Any
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/svn/conf/passwdfile
Require valid-user
</Location>
</VirtualHost>
I would like to prevent web crawlers from indexing the public repositories, but I cannot figure out how to properly set up the configuration to serve robots.txt from http://svn.example.com/robots.txt.
I have found a thread "stopping webcrawlers using robots.txt" from 2006, but it didn't help me solve the problem (Ryan's suggestion for redirection didn't work).
EDIT: I would prefer to keep the repositories at the top level rather than moving them to http://svn.example.com/something/reponame.
Don't put your Subversion repositories' virtual directory in the root of your server:
Wrong
<Location />
DAV svn
SVNParentPath /path/to/svn/repositories
Right
<Location /svn>
DAV svn
SVNParentPath /path/to/svn/repositories
Instead of your repository root being http://svn.example.com, it will be http://svn.exmaple.com/svn. This frees up http://svn.example.com to be a true document root which means you can add some documentation about your site, and put in a robots.txt file under http://svn.example.com/robots.txt.
Now, a well behaved robot will see the robot.txt file and not index your Subversion repository.

How to disable anonymous checkout with apache svn server

I build a SVN server with apache. It work fine.
I don't want to anonymous could checkout, so I set httpd like
<location /svn>
DAV svn
SVNListParentPath Off
SVNParentPath C:/SVN/
Satisfy All
AuthType Basic
AuthName "Subversion Dir"
AuthUserFile "C:\Program Files (x86)\Subversion\svn-auth-conf.txt"
AuthzSVNAccessFile "C:\Program Files (x86)\Subversion\svn-acl-conf.txt"
Require valid-user
</location>
but I still can checkout by commnd line like
svn co http://repos test
without any username and password
How can I do to solve this issue?
You may have stored credentials for this URL
Remove Satisfy - read "Blanket access control" in SVN Book with sample
AuthName ...
AuthType ...
AuthUserFile ...
Require valid-user