Re: reverse-proxy ReviewBoard through external Apache with basic auth?

2016-07-28 Thread Christian Hammond
Hi Will,

If the external Review Board server is requiring Basic Auth for access
(outside of our Basic Auth requests in the API), then that may be a
problem. You're dealing with two different kinds of authentication. I'm not
sure from your description whether things are set up so that Review Board
is expecting Basic Auth for authentication using some custom backend, or if
you just have an extra layer around the access to your server.

Can you tell me more about the auth setup, and how/why things are set up
this way?

Generally, I'd recommend not using Basic Auth for your Review Board server,
and instead using something backed by LDAP, if you need some kind of
external management of users.

We have Nginx set up to forward requests to our Apache running Review
Board, and it works great, but we're not using Basic Auth.

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Wed, Jul 27, 2016 at 10:04 AM, Will Partain 
wrote:

> I am failing to reverse-proxy through an external Apache 2.4 server to
> a ReviewBoard service (2.6.5.1).
>
> The external server is (let's say) external.example.com.  Its Apache
> config includes:
>
>   ProxyPass /reviews http://backend.example.com/reviews
>
>   
> ProxyPassReverse  http://backend.example.com/reviews
> ProxyPassReverseCookieDomain backend.example.com external.example.com
> RequestHeaderunset  Accept-Encoding
>
> <%= @httpd_auth_thing %>
>   
>
> where the @httpd_auth_thing turns into a standard Apache Basic
> authentication thing.
>
> The backend server (also Apache 2.4) includes standard ReviewBoard
> runes, i.e.
>
> WSGIPassAuthorization On
> WSGIScriptAlias "/reviews" "<%= @reviewboard_home
> -%>/htdocs/reviewboard.wsgi/reviews"
>
> /htdocs">
> AllowOverride All
> Options -Indexes +FollowSymLinks
> #  #partain: our addition:
>AuthName <%= @httpd_auth_name %>
>AuthUserFile <%= @httpd_auth_user_file %>
>AuthType Basic
>
>  Require valid-user
>  Require local
>
> 
>
> (Puppet fills in the template with obvious things.)
>
> I then make admin and user "accounts" through the admin interface.
> All good.
>
> If you use a browser to connect *directly* to backend.example.com/reviews/
> (just for testing...), all the ReviewBoard stuff works.
>
> If you connect (properly) through external.example.com/reviews/, a
> fair few things work, e.g. all the admin functions.
>
> But if you start doing review things (i.e. tickle the "Web API" ?),
> things don't go well.  One example might be: click to add a comment on
> a review -- it will take the comment, but never bring up a
> 'Publish'/'Discard' button, and the comment will in fact not be there.
>
> A worry I have: the external.example.com Apache requires Basic
> authentication.  Its username/passwords have nothing to do with
> ReviewBoard.
>
> So... I login to ReviewBoard (apparently OK).  But, in subsequent
> requests, an "Authorization: Basic " header (with the
> *external.example.com* info) is being passed back to
> backend.example.com, and that *may* be confusing things.
>
> For example, I'm logged in as 'admin', looking at a review... I then
> click on 'Admin' (to go do admin).  It asks me to login again -- why?
> because it thinks I'm 'partain' (because it got that from the [bogus]
> Basic authentication?).
>
> When I changed the ReviewBoard username/password to match the
> external.example.com HTTP username/password (so that the
> 'Authorization' info would happen to be correct), that did not
> appear to help.
>
> Is this analysis even partly right?  What should I look at next?
> Does *anyone* have a working reverse-proxied ReviewBoard with Apache?
> Thanks,
>
> Will
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using REMOTE_USER to authenticate in reviewboard

2016-07-28 Thread Christian Hammond
Hi Abhi,

The authenticate() method is needed for the login page, which will require
a password. If you just never use that page, you won't have to worry about
using those parameters as-is (see X509AuthBackend and X509AuthMiddleware).

What kind of problems are you hitting, specifically? Any errors?

For the record, your auth backend will need to be a subclass of our
AuthBackend class. You can use multiple inheritance for this, though. We
have more specialized needs than what Django provides by default, so just
dropping in a subclass of RemoteUserBackend without complying with
AuthBackend won't work.

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Wed, Jul 27, 2016 at 5:46 AM, Abhishek Choudhary 
wrote:

> Hi,
>
> I would like to use REMOTE_USER set by Apache to authenticate users in
> ReviewBoard. I have tried adding RemoteUserMiddleware in MIDDLEWARE_CLASSES
> and my custom auth backend which extends django's RemoteUserBackend
> in AUTHENTICATION_BACKENDS in settings_local.py. But the authentication is
> not working.
>
> I looked at
> https://www.reviewboard.org/docs/manual/2.5/extending/extensions/hooks/auth-backend-hook/#auth-backend-hook
> but it requires that I provide a subclass of
> reviewboard.accounts.backends.AuthBackend
> 
> whose authenticate method takes username and password as arguments. But i
> don't have password corresponding to the username.
>
> Could you someone help me with this? Has anyone tried using this with
> ReviewBoard v2.5.x?
>
> Thanks,
> Abhi
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board doesn't send emails

2016-07-28 Thread Christian Hammond
Hi Steve,

Given what you said, it seems the e-mails *are* sending correctly (to
SendGrid, anyway). The test e-mail went out fine, and you would have seen
errors in reviewboard.log if sending had failed at any point.

So what's happening is not a failure in sending to your e-mail provider.
It's a failure in your e-mail provider to accept the message (in a way
we're not notified of) or a failure to deliver to the recipients.

We send on behalf of users, and this can get tricky depending on how things
are configured. Since the test e-mail went out, but others aren't, this is
likely where things are failing.

A couple of questions:

1) What your "Sender e-mail address" is in the Review Board e-mail
settings. Specifically, is the domain for that address a domain under your
control (configured with SendGrid)?

2) Do you have SPF/DKIM records set up properly?

3) What sort of e-mail addresses are you sending to? Are they all at a
certain domain?

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Wed, Jul 27, 2016 at 8:59 AM, Steve Thompson  wrote:

> Hi,
>
> I have a Review Board installation hosted on Google Cloud and using
> SendGrid as its SMTP server. When I go to the Admin > E-Mail settings page,
> click the checkbox labelled "Send a test email after saving" and click
> Save, I receive a test email.
>
> However, this is the only email I ever receive from RB. Today I upgraded
> to 2.5.6.1 which is working fine but I'm still not receiving emails.
>
> On looking through this forum, for a lot of people who have encountered
> this problem it's turned out to be because of a restrictive mail server
> (which is a good thing). However, not only do I not have a problem with the
> test email but /var/log/reviewboard/reviewboard.log makes no mention of
> email being sent either successfully or unsuccessfully. So before I can
> diagnose why my emails aren't being sent I need to find out why email
> transactions aren't being logged (or if they're being logged somewhere else
> and I missed that bit).
>
> RB was installed (and upgraded) using easy_install. Is there a chance
> there's another Python module that I should've installed manually but
> missed in the instructions?
>
> My logging is set to Debug - does anyone know why my logs aren't showing
> email transactions? For example
>
> root@reviewboard-2:/var/log/reviewboard# grep -i debug reviewboard.log |
> wc -l
> 63241
>
> So it's definitely logging debug messages. But
>
> root@reviewboard-2:/var/log/reviewboard# grep -i smtp reviewboard.log |
> wc -l
> 0
> root@reviewboard-2:/var/log/reviewboard# grep -i mail reviewboard.log |
> wc -l
> 0
>
> Just to clarify - all the "Send e-mails when " checkboxes are checked and
> all the registered users have valid email addresses.
>
> Any suggestions for things I can poke or tweak gratefully received.
>
> Steve
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem when expanding diff on one file from one side reviewboard 2.5

2016-07-28 Thread David Trowbridge
This seems definitely messed up.

What version of Review Board? How did you install it?

-David

On Thu, Jul 28, 2016 at 6:12 AM eran meiri  wrote:

> Hi again,
> sorry for the delay.
> lets say your diif is composed of 2 files.
> I don't want to expand the diff of both files but only one of them.
> when I press the + of one of the files
>  I get a weird view
> I HAVE ATTACHED IT
>
>
> On Friday, 15 July 2016 18:24:26 UTC+3, David Trowbridge wrote:
>
>> Perhaps you can explain more what you're having trouble understanding?
>>
>> -David
>>
>> On Tue, Jul 12, 2016 at 11:47 AM eran meiri  wrote:
>>
> Hello,
>>> when I open a diff and tries to expand more lines in a specific file (
>>> not expand all ) it opens in a way it is hard to understand.
>>>
>>> is it a known bug?
>>>
>>> --
>>> Supercharge your Review Board with Power Pack:
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons:
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "reviewboard" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to reviewboard...@googlegroups.com.
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: diff in xml not working

2016-07-28 Thread David Trowbridge
How are you creating your review requests?

-David

On Thu, Jul 28, 2016 at 6:17 AM eran meiri  wrote:

> Hello,
> I have a diff review that was done on a xml file.
>
> when I open the diff window I get a binary file note on the file:
> I have attached a screenshot
> is it possible to do diff on xml files?
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


diff in xml not working

2016-07-28 Thread eran meiri
Hello,
I have a diff review that was done on a xml file.

when I open the diff window I get a binary file note on the file:
I have attached a screenshot
is it possible to do diff on xml files?


-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.