Hi,

Wierdly, I tried following approach and it worked:

-copied MIDDLEWARE_CLASSES from settings.py and added 
django.contrib.auth.middleware.RemoteUserMiddleware 
after AuthenticationMiddleware in settings.py
-Went to admin account using username and password that was created at 
rb-site installation and edited Authentication method to Legacy 
Authentication Module and in backends I gave full path of my custom auth 
backend that inherits from RemoteUserBackend

After this It started respecting REMOTE_USER and logged users automatically 
and I was able to create new review requests and had access to dashboard.

Let me know if there is anything wrong with this approach and If I should 
do this some other way.

Thanks,
Abhi

On Friday, July 29, 2016 at 3:38:47 AM UTC+5:30, Christian Hammond wrote:
>
> 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 <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>
> On Wed, Jul 27, 2016 at 5:46 AM, Abhishek Choudhary <xab...@gmail.com 
> <javascript:>> 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 
>> <https://www.reviewboard.org/docs/manual/2.5/extending/coderef/python/reviewboard.accounts.backends/#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...@googlegroups.com <javascript:>.
>> 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.

Reply via email to