<div dir="ltr">Thanks Simo & Fraser,<div><br></div><div>Creating a .netrc file on the client computer with according to the SO postings with below content made things work perfectly!<br><font face="monospace, monospace">machine gitserver.my.lan  username '' password ''<br>machine gitserver         username '' password ''</font></div><div><br></div><div>I would like to use TLS and I've made it work by turning off ssl validation in git:<br>git config --global http.sslVerify false</div><div><br></div><div>If I would like to use ssl validation, is there some way to use a certificate for the CNAME? Seems I can only add certificate (at least from the UI) for a valid principal?</div><div><br></div><div>(I'm using freeipa-server 4.2.3 on F23)</div><div><br></div><div>Regards,<br></div><div><p>-- john</p>







</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-08 23:55 GMT+01:00 Simo Sorce <span dir="ltr"><<a href="mailto:simo@redhat.com" target="_blank">simo@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>On 08/11/15 08:07, John Obaterspok wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello,<br>
<br>
Anyone got git-http-backend working with freeipa group auhentication and<br>
would like to share their apache .conf file?<br>
<br>
<br>
I've tried this on the IPA server with a dummy git repository setup in<br>
/opt/gitrepos/test1.git<br>
gitserver.my.lan is a CNAME for ipaserver.my.lan<br>
<br>
First, "git clone <a href="http://gitserver.my.lan/test1.git" rel="noreferrer" target="_blank">http://gitserver.my.lan/test1.git</a>" prompts (even though I<br>
have a ticket) for user+pwd but still fails.<br>
<br>
Any suggestions are welcome!<br>
<br>
-- john<br>
<br>
<br>
<VirtualHost gitserver.my.lan:80><br>
<br>
         DocumentRoot /opt/gitrepos<br>
<br>
         # semanage fcontext -a -t git_rw_content_t '/opt/gitrepos(/.*)?'<br>
         # restorecon -R -v /opt/gitrepos<br>
<br>
         SetEnv GIT_PROJECT_ROOT /opt/gitrepos<br>
         SetEnv GIT_HTTP_EXPORT_ALL<br>
         SetEnv REMOTE_USER $REDIRECT_REMOTE_USER<br>
         ScriptAlias / /usr/libexec/git-core/git-http-backend/<br>
         ServerName gitserver.my.lan<br>
<br>
         <Directory "/usr/libexec/git-core"><br>
                 Options Indexes<br>
                 AllowOverride None<br>
                 Require all granted<br>
         </Directory><br>
<br>
         <Directory "/opt/gitrepos"><br>
                 Options Indexes<br>
                 AllowOverride None<br>
                 Require all granted<br>
         </Directory><br>
<br>
         <LocationMatch "/"><br>
                 AuthType Kerberos<br>
                 AuthName "Kerberos Login"<br>
                 KrbAuthRealm MY.LAN<br>
                 Krb5KeyTab /etc/httpd/conf/ipa.keytab<br>
                 KrbMethodNegotiate on<br>
                 KrbMethodK5Passwd off<br>
                 KrbSaveCredentials on<br>
                 KrbVerifyKDC on<br>
                 KrbServiceName HTTP<br>
<br>
                 AuthLDAPUrl<br>
ldap://ipaserver.my.lan:389/dc=my,dc=lan?krbPrincipalName<br>
                 Require ldap-group cn=ipausers,dc=my,dc=lan<br>
</blockquote>
<br></div></div>
This should probably be somehting like: cn=ipausers,cn=groups,cn=accounts,dc=my,dc=lan<br>
<br>
Although you should probably create a git specific group, especially if you want it to be a posix group that can own files (ipausers is not a posix group and we are actually trying to phase it out)<br>
<br>
Also you are not doing LDAP authentication, you only want to do authorization, and for that you may want to actually use nsswitch based authorization which can be cached by sssd and not a query out to LDAP for each connection.<br>
Unfortunately the basic Apache modules do not support system group authentication directly, so what you may do instead is to have a cron job that do the following:<br>
getent group git-users | cut -d: -f1,4 |tr ',' ' ' > /my/authorization/file<br>
<br>
And in apache have set the following directives instead of the above two:<br>
AuthGroupFile /my/authorization/file<br>
Require group git-users<br>
<br>
HTH,<br>
Simo<span><font color="#888888"><br>
<br>
<br>
-- <br>
Simo Sorce * Red Hat, Inc * New York<br>
<br>
-- <br>
Manage your subscription for the Freeipa-users mailing list:<br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
Go to <a href="http://freeipa.org" rel="noreferrer" target="_blank">http://freeipa.org</a> for more info on the project<br>
</font></span></blockquote></div><br></div></div>