Re: [viewvc-dev] Enabling LDAP authentication in viewvc

"C. Michael Pilato" <[email protected]> Mon, 11 May 2015 09:17:28 -0400
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Organization CollabNet, Inc.
Message-ID <5550ABE8.8020806__31520.2821897858$1431350266$gmane$org@collab.net>
------=_Part_4291_1944925012.1431350254429
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This isn't something that you have to do at all.  Whenever Apache
executes a CGI script, it delivers a bunch of information to that script
automatically via its environment.  There's lots of information about
the incoming request, the exposed location of the script, and so on. 
One of the things also delivered is the authenticated username
associated with the request, if any.  So while LDAP auth isn't really my
area of expertise, I'm pretty sure that if you tell Apache to require
LDAP authentication for users accessing ViewVC, Apache will
automatically hand ViewVC the authenticated username and ViewVC will
automatically try to us it (assuming you've set 'svnauthz' as your
authorizer in viewvc.conf, of course).

On 05/11/2015 02:04 AM, flora vinarashi wrote:
> Hi Michael,
>  
> Thank you very much for answering my questions.
> I have enabled the LDAP authentication through Apache. Can you please
> let me know how can I pull the username from CGI environment and pass
> it to svnauthz and get their repository listed when they login to viewvc.
>  
>  
> Regards,
> Flora
>  
>
>
>
> On Friday, 8 May 2015 8:25 PM, C. Michael Pilato <[email protected]>
> wrote:
>
>
> On 05/08/2015 06:56 AM, flora vinarashi wrote:
>> Hi Team,
>> I need some help from you regarding viewvc authentication.
>> As of now, there is no authentication for viewvc in our application.
>> When the user hits /viewvc/viewvc.cgi, user is able to view all the
>> repositories available in the server.
>> I have tried changing the configuration setting in viewvc.conf for
>> svnauthz file. After doing those changes, all the repositories having
>> public access are only listed.
>> I want the viewvc to be configured in such a way that when the user
>> hits viewvc, they should be able to view their own repositories along
>> with public access repositories.
>> How this could be done?
>> Viewvc version used in our application is 1.1.3
>
> ViewVC does not currently provide an authentication framework.  It
> simply piggy-backs on the authentication framework provided by Apache
> HTTP Server.  So if you want to enable LDAP authentication for ViewVC,
> you need to do so in the Apache configuration that governs your ViewVC
> <Location>.  Once a user has authenticated against Apache, ViewVC will
> receive the authenticated username from Apache via the CGI
> environment.  It will then use that username in its
> authorization/access checks.
> -- 
> C. Michael Pilato <[email protected]> <mailto:[email protected]>
> CollabNet   <>   www.collab.net <http://www.collab.net/>   <>   Enterprise Cloud Development
>
>


-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=3116810

To unsubscribe from this discussion, e-mail: [[email protected]].
------=_Part_4291_1944925012.1431350254429
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">This isn't something that you have to
      do at all.=C2=A0 Whenever Apache executes a CGI script, it delivers a
      bunch of information to that script automatically via its
      environment.=C2=A0 There's lots of information about the incoming
      request, the exposed location of the script, and so on.=C2=A0 One of
      the things also delivered is the authenticated username associated
      with the request, if any.=C2=A0 So while LDAP auth isn't really my ar=
ea
      of expertise, I'm pretty sure that if you tell Apache to require
      LDAP authentication for users accessing ViewVC, Apache will
      automatically hand ViewVC the authenticated username and ViewVC
      will automatically try to us it (assuming you've set 'svnauthz' as
      your authorizer in viewvc.conf, of course).<br>
      <br>
      On 05/11/2015 02:04 AM, flora vinarashi wrote:<br>
    </div>
    <blockquote
cite=3D"mid:[email protected]"
      type=3D"cite">
      <div style=3D"color:#000; background-color:#fff;
        font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
        Lucida Grande, Sans-Serif;font-size:16px">
        <div id=3D"yui_3_16_0_1_1431324306225_2445"><span>Hi Michael,</span=
></div>
        <div id=3D"yui_3_16_0_1_1431324306225_2852"><span></span>=C2=A0</di=
v>
        <div id=3D"yui_3_16_0_1_1431324306225_2853" dir=3D"ltr"><span
            id=3D"yui_3_16_0_1_1431324306225_3091">Thank you very much for
            answering my questions.</span></div>
        <div id=3D"yui_3_16_0_1_1431324306225_2855" dir=3D"ltr"><span
            id=3D"yui_3_16_0_1_1431324306225_2854">I have enabled the LDAP
            authentication through Apache. Can you please let me know
            how can I pull the username from CGI environment and pass it
            to svnauthz and get their repository listed when they login
            to viewvc.</span></div>
        <div id=3D"yui_3_16_0_1_1431324306225_3006" dir=3D"ltr">=C2=A0</div=
>
        <div id=3D"yui_3_16_0_1_1431324306225_2858" dir=3D"ltr"><span></spa=
n>=C2=A0</div>
        <div id=3D"yui_3_16_0_1_1431324306225_2857" dir=3D"ltr"><span>Regar=
ds,</span></div>
        <div id=3D"yui_3_16_0_1_1431324306225_2859" dir=3D"ltr"><span>Flora=
</span></div>
        <div id=3D"yui_3_16_0_1_1431324306225_2856" dir=3D"ltr"><span></spa=
n>=C2=A0</div>
        <br>
        <div class=3D"qtdSeparateBR"><br>
          <br>
        </div>
        <div class=3D"yahoo_quoted" style=3D"display: block;">
          <div style=3D"font-family: HelveticaNeue, Helvetica Neue,
            Helvetica, Arial, Lucida Grande, Sans-Serif; font-size:
            16px;">
            <div style=3D"font-family: HelveticaNeue, Helvetica Neue,
              Helvetica, Arial, Lucida Grande, Sans-Serif; font-size:
              16px;">
              <div dir=3D"ltr"> <font face=3D"Arial" size=3D"2"> On Friday,=
 8
                  May 2015 8:25 PM, C. Michael Pilato
                  <a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:cmpilat=
[email protected]">&lt;[email protected]&gt;</a> wrote:<br>
                </font> </div>
              <br>
              <br>
              <div class=3D"y_msg_container">
                <div id=3D"yiv5457007567">
                  <div>
                    <div class=3D"yiv5457007567yqt9930177707"
                      id=3D"yiv5457007567yqtfd44561">
                      <div class=3D"yiv5457007567moz-cite-prefix">On
                        05/08/2015 06:56 AM, flora vinarashi wrote:<br
                          clear=3D"none">
                      </div>
                    </div>
                    <blockquote type=3D"cite">
                      <div class=3D"yiv5457007567yqt9930177707"
                        id=3D"yiv5457007567yqtfd97734"> </div>
                      <div style=3D"color: rgb(0, 0, 0); font-family:
                        HelveticaNeue, Helvetica Neue, Helvetica, Arial,
                        Lucida Grande, Sans-Serif; font-size: 16px;
                        background-color: rgb(255, 255, 255);">
                        <div class=3D"yiv5457007567yqt9930177707"
                          id=3D"yiv5457007567yqtfd49782">
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
102"
                            dir=3D"ltr"><font face=3D"Times New Roman"> </f=
ont></div>
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
156"
                            style=3D"margin: 0cm 0cm 0pt;"><font
                              id=3D"yiv5457007567yui_3_16_0_1_1431082726484=
_2157"
                              face=3D"Calibri">Hi Team,</font></div>
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
127"
                            style=3D"margin: 0cm 0cm 0pt;"><font
                              id=3D"yiv5457007567yui_3_16_0_1_1431082726484=
_2126"
                              face=3D"Calibri">I need some help from you
                              regarding viewvc authentication.</font></div>
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
132"
                            style=3D"margin: 0cm 0cm 0pt;"><font
                              id=3D"yiv5457007567yui_3_16_0_1_1431082726484=
_2131"
                              face=3D"Calibri">As of now, there is no
                              authentication for viewvc in our
                              application. When the user hits
                              /viewvc/viewvc.cgi, user is able to view
                              all the repositories available in the
                              server.</font></div>
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
137"
                            style=3D"margin: 0cm 0cm 0pt;"><font
                              id=3D"yiv5457007567yui_3_16_0_1_1431082726484=
_2134"
                              face=3D"Calibri">I have tried changing the
                              configuration setting in viewvc.conf for
                              svnauthz file. After doing those changes,
                              all the repositories having public access
                              are only listed. </font></div>
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
138"
                            style=3D"margin: 0cm 0cm 0pt;"><font
                              id=3D"yiv5457007567yui_3_16_0_1_1431082726484=
_2125"
                              face=3D"Calibri">I want the viewvc to be
                              configured in such a way that when the
                              user hits viewvc, they should be able to
                              view their own repositories along with
                              public access repositories.</font></div>
                          <font face=3D"Times New Roman">H</font><font
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
146"
                            face=3D"Calibri">ow this could be done?</font>
                          <div
                            id=3D"yiv5457007567yui_3_16_0_1_1431082726484_2=
149"
                            style=3D"margin: 0cm 0cm 0pt;"><font
                              id=3D"yiv5457007567yui_3_16_0_1_1431082726484=
_2148"
                              face=3D"Calibri">Viewvc version used in our
                              application is 1.1.3</font></div>
                        </div>
                      </div>
                    </blockquote>
                    <br clear=3D"none">
                    ViewVC does not currently provide an authentication
                    framework.=C2=A0 It simply piggy-backs on the
                    authentication framework provided by Apache HTTP
                    Server.=C2=A0 So if you want to enable LDAP
                    authentication for ViewVC, you need to do so in the
                    Apache configuration that governs your ViewVC
                    &lt;Location&gt;.=C2=A0 Once a user has authenticated
                    against Apache, ViewVC will receive the
                    authenticated username from Apache via the CGI
                    environment.=C2=A0 It will then use that username in it=
s
                    authorization/access checks.<br clear=3D"none">
                    <pre class=3D"yiv5457007567moz-signature">--=20
C. Michael Pilato <a moz-do-not-send=3D"true" class=3D"yiv5457007567moz-txt=
-link-rfc2396E" href=3D"mailto:[email protected]" target=3D"_blank" rel=
=3D"nofollow" shape=3D"rect" ymailto=3D"mailto:[email protected]">&lt;cmp=
[email protected]&gt;</a>
CollabNet   &lt;&gt;   <a moz-do-not-send=3D"true" class=3D"yiv5457007567mo=
z-txt-link-abbreviated" href=3D"http://www.collab.net/" target=3D"_blank" r=
el=3D"nofollow" shape=3D"rect">www.collab.net</a>   &lt;&gt;   Enterprise C=
loud Development
</pre>
                    <div class=3D"yiv5457007567yqt9930177707"
                      id=3D"yiv5457007567yqtfd69574"> </div>
                  </div>
                </div>
                <br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class=3D"moz-signature" cols=3D"72">--=20
C. Michael Pilato <a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:cmpilat=
[email protected]">&lt;[email protected]&gt;</a>
CollabNet   &lt;&gt;   <a class=3D"moz-txt-link-abbreviated" href=3D"http:/=
/www.collab.net">www.collab.net</a>   &lt;&gt;   Enterprise Cloud Developme=
nt
</pre>
  </body>
</html>

------=_Part_4291_1944925012.1431350254429--