Hi again,

Commenting out the following if-then-else as Nate recommended works in
remoteuser.py works to achieve this goal:

            #if not environ[ 'HTTP_REMOTE_USER' ].count( '@' ):
            #    if self.maildomain is not None:
            #        environ[ 'HTTP_REMOTE_USER' ] += '@' + self.maildomain
            #    else:
            #        title = "Access to Galaxy is denied"
            #        message = """
            #            Galaxy is configured to authenticate users
via an external
            #            method (such as HTTP authentication in
Apache), but only a
            #            username (not an email address) was provided by the
            #            upstream (proxy) server.  Since Galaxy
usernames are email
            #            addresses, a default mail domain must be set.</p>
            #           <p>Please contact your local Galaxy administrator.  The
            #            variable <code>remote_user_maildomain</code>
must be set
            #            before you may access Galaxy.
            #        """
            #        return self.error( start_response, title, message )

So far in regular Galaxy use everything works no problem, people's
email addresses are their usernames and email services work in Windows
as your username is your email nickname.

-L

On Thu, Jun 9, 2011 at 11:00 PM, Leandro Hermida
<soft...@leandrohermida.com> wrote:
> Hi Nate,
>
> Thank so much for the instructions :) , yes this is what I would want
> to do as Galaxy was adding an empty @ after the username.  Yep in a
> Windows domain environment the bare username (sAMAccountName) is also
> an email nickname and works with the Exchange server when you use SMTP
> services.
>
> thank a lot,
> Leandro
>
> On Thu, Jun 9, 2011 at 6:54 PM, Nate Coraor <n...@bx.psu.edu> wrote:
>> Leandro Hermida wrote:
>>> Hi,
>>>
>>> Is it possible to tell Galaxy to use the bare username passed back by
>>> external authentication as the email address without appending any
>>> domain?  It seems to complain if it isn't in email address format and
>>> asks you to set up a domain to append in universe.wsgi.
>>>
>>> I would like to use the bare username as the email address since it
>>> works fine as an email address in for example any Active
>>> Directory-based organization and also in many non-academic
>>> organizations it is preferred not to use the email addresses as the
>>> ID.
>>
>> Hi Leandro,
>>
>> If you're using any of Galaxy's mail services, your SMTP server would
>> also need to be able to accept mail to users with no domain.  That said,
>> you should be able to hack
>> lib/galaxy/web/framework/middleware/remoteuser.py to do what you want.
>>
>> Specifically, remove/comment the conditional:
>>
>>  if not environ[ 'HTTP_REMOTE_USER' ].count( '@' ):
>>
>> --nate
>>
>>>
>>> thanks in advance,
>>> Leandro
>>> ___________________________________________________________
>>> Please keep all replies on the list by using "reply all"
>>> in your mail client.  To manage your subscriptions to this
>>> and other Galaxy lists, please use the interface at:
>>>
>>>   http://lists.bx.psu.edu/
>>
>

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to