You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vinod Kone <vi...@gmail.com> on 2013/07/28 20:11:42 UTC

Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

FYI

---------- Forwarded message ----------
From: İlim Uğur <il...@gmail.com>
Date: Sun, Jul 28, 2013 at 3:29 AM
Subject: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)
To: Vinod Kone <vi...@twitter.com>, Jan Schaumann <js...@twitter.com>


Hey,

I am continuing to work on the repo. I thought I would be done by Saturday
at the latest, but I am having some issues with Cyrus SASL. I tried asking
about it on #cyrus channel on freenode last night, and 15 mins ago, but
there isn't any responses so far. Sent an email to sasl mailing list, too,
which is below, actually. I am still working on the issue, but wanted to
send you a copy of the message describing the problem I'm having, in case
either one of you may be awake.

- İlim



---------- Forwarded message ----------
From: İlim Uğur <il...@gmail.com>
Date: 2013/7/28
Subject: SASL Empty Mechlist Issue(Ubuntu Desktop)
To: cyrus-sasl@lists.andrew.cmu.edu


Hey,

I am having some issues with my attempt at using Cyrus SASL and wanted to
ask for some guidance/help.

I am currently trying to implement a sample client-server code that does
ANONYMOUS authentication on my ubuntu(not a server) localhost. However,
sasl_listmech() returns an empty list on the server side, and even if I
send a hard-coded list(i.e. "ANONYMOUS") sasl_client_start() returns
SASL_NOMECH. Any ideas on how I can fix this?

Just FYI, I installed Cyrus SASL the "quick & dirty way", as described in
Cyrus SASL documentation. Also, you can find the actual code on
https://www.github.com/ilimugur/sasltrial.

Cheers,

-İlim

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by Chris Aniszczyk <zx...@twitter.com>.
How is this coming along?

The pencils down date is coming up! :)
http://www.google-melange.com/gsoc/events/google/gsoc2013

On Thu, Aug 15, 2013 at 3:45 PM, Vinod Kone <vi...@gmail.com> wrote:

> Sweet. Thanks Kevin for helping out Ilim!
>
> Its too bad the libs built from Cyrus SASL source don't work out. But yea,
> we can worry about that later.
>
> @Ilim: Migrating to Mesos sounds good!
>
>
> On Thu, Aug 15, 2013 at 1:35 PM, İlim Uğur <il...@gmail.com> wrote:
>
>> There is finally some good news on the issue. With the help of lyda from
>> #mesos IRC channel, I managed to see my code successfully run on a virtual
>> Ubuntu 12.04 Server, and on an Ubuntu 13.04 Desktop, after downloading
>> libsasl2-dev and libsasl2-modules via apt-get. You may test it yourself by
>> cloning it from my github repo on http://github.com/ilimugur/sasltrial
>>
>> I have been compiling Cyrus SASL from the source since the beginning of
>> the program, but it turns out the packages were the better way to go.
>>
>> Just to remind everyone, this code is a sample client-server application
>> that does anonymous authentication using Cyrus SASL library.
>>
>> I will now proceed with migrating the classes I coded into Mesos source.
>>
>> Feel free to ask any questions you may have.
>>
>> - İlim
>>
>>
>>
>>
>> 2013/8/14 İlim Uğur <il...@gmail.com>
>>
>>> Hey Vinod,
>>>
>>> Nothing in particular is blocking me from sharing my vagrant
>>> environment, actually. As soon as I saw that Cyrus SASL seemed to work
>>> decently, I wanted to make some progress before preparing a configuration
>>> file for my setup. I am new to Vagrant, but I guess I can form a
>>> configuration file today, with some shell scripting.
>>>
>>> You are correct on what is not working with my setup. The server side
>>> gives out an error when AuthenticatorServer::startAuthProcess() calls
>>> sasl_server_start(). Internally, as far as GDB helps, it seems
>>> sasl_server_start() calls sasl_server_step(), which returns SASL_NOMECH,
>>> causing server to fail the authentication negotiation. I got as deep as I
>>> can trace with GDB and as it turns out, a function named
>>> _sasl_auxprop_lookup() in lib/auxprop.c returns SASL_NOMECH after failing
>>> to find an auxprop plugin. This is, I suppose, the same reason why
>>> sample-client and sample-server shipped with Cyrus SASL do not work on my
>>> setup.
>>>
>>> The only irrational part to the issue is, auxprop plugin, which helps
>>> checking passwords, is looked for during anonymous authentication, even
>>> though anonymous mechanism does not require a password. Does it? I suspect
>>> the problem is again with the setup, as I had managed to run sample-client
>>> and sample-server on an Ubuntu 12.04 Desktop(not virtual) two weeks ago.
>>> Would Jan have any ideas on this part?
>>>
>>> Have some experience relevant to your question of what happens when I
>>> try without Vagrant, too. On a physical Ubuntu 13.04 Desktop, which I set
>>> up a week ago, I am getting a compilation error when on the "make" stage of
>>> Cyrus SASL installation, in digestmd5.c, to be specific. I will try it on a
>>> plain virtual Ubuntu 12.04 server(without Vagrant) and let you know of the
>>> result.
>>>
>>> - İlim
>>>
>>>
>>>
>>>
>>> 2013/8/12 Vinod Kone <vi...@gmail.com>
>>>
>>>> Hey Ilim.
>>>>
>>>> Great to hear that you are making progress. Can you let us know what is
>>>> blocking you from sharing your vagrant environment? Is it something we
>>>> can
>>>> help with?
>>>>
>>>> Also, I'm a bit confused about what is working and what isn't in your
>>>> vagrant + virtual box setup. If I understand correctly the client seems
>>>> to
>>>> be working but the server is not? Is this true even if you take vagrant
>>>> +
>>>> virtual box out of the equation, i.e, ubuntu on bare metal?
>>>>
>>>> Cheers,
>>>>
>>>> -- Vinod
>>>>
>>>>
>>>> On Sun, Aug 11, 2013 at 10:50 PM, İlim Uğur <il...@gmail.com> wrote:
>>>>
>>>> > Hey,
>>>> >
>>>> > There is some progress with the issue, and although it is not
>>>> completely
>>>> > resolved yet, I wanted to let everyone hear about the progress.
>>>> >
>>>> > When Vinod and Jan mentioned setting up some common environment, I
>>>> decided
>>>> > to try a tool I heard about, called Vagrant (
>>>> http://www.vagrantup.com/ ).
>>>> > It basically helps you set up a custom work environment with the help
>>>> of VM
>>>> > technologies. Then you can share the configuration of your dev.
>>>> environment
>>>> > with the rest of the development team and you get to have the same
>>>> > workspace.
>>>> >
>>>> > I created a default Ubuntu 12.04 server using Vagrant and installed
>>>> all the
>>>> > relevant packages and files in it. Sadly, I can not share my workspace
>>>> > configuration for the moment. Still, as pluginviewer command listed
>>>> > seemingly all the plugins we wanted Cyrus SASL to install, it appears
>>>> > everything worked fine on this Ubuntu box.
>>>> >
>>>> > I had encountered problems with trying to install Cyrus SASL to a
>>>> virtual
>>>> > Ubuntu 12.04 server I created using VirtualBox. I also could not
>>>> > successfully run sample-client and sample-server code provided by
>>>> Cyrus
>>>> > SASL on this box(i.e. the one I created using Vagrant). However, I did
>>>> > manage to correct a few mistakes in my code, which, for the client
>>>> side at
>>>> > least, seem to work fine now, at least on the mentioned dev.
>>>> environment.
>>>> >
>>>> > There is an issue on the server-side code, though. I tried tracing the
>>>> > program using GDB, but it seems a function(sasl_server_step) returns
>>>> > something(SASL_NOMECH) it actually can not return. I will go on
>>>> looking
>>>> > into that in a few hours.
>>>> >
>>>> > It feels great to finally have made some progress with the issue. I
>>>> hope I
>>>> > can make faster progress after resolving this.
>>>> >
>>>> > - İlim
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > 2013/8/10 Jan Schaumann <js...@netmeister.org>
>>>> >
>>>> > > ?lim U?ur <il...@gmail.com> wrote:
>>>> > >
>>>> > > > He suggested I should redo the configuration step, this time
>>>> specifying
>>>> > > the
>>>> > > > plugin directory parameter. I did what he suggested, it had no
>>>> effect.
>>>> > > the
>>>> > > > tool called pluginviewer showed that I only have EXTERNAL plugin
>>>> > > available.
>>>> > > > So he thought the problem is not my code but the way I installed
>>>> sasl.
>>>> > >
>>>> > > I can't tell for certain, but my instinct and experience suggests
>>>> that
>>>> > > this likely to be the cause.
>>>> > >
>>>> > > Where do you currently develop on?  Is this host accessible by
>>>> others
>>>> > > (Vinod and me) to help troubleshoot the issue?
>>>> > >
>>>> > > If not, then I think we should consider setting up an EC2 instance
>>>> to
>>>> > > poke around together; long-distance trouble-shooting is always
>>>> tricky.
>>>> > >
>>>> > > > dwhite ilim: if pluginviewer is failing, then you have a
>>>> fundamental
>>>> > > > problem with your sasl install.
>>>> > > > dwhite you could strace pluginview, to see where it's looking for
>>>> > shared
>>>> > > > libraries
>>>> > > > dwhite you may have a mix of cyrus sasl installed (native ubuntu
>>>> > packages
>>>> > > > and newly compiled packages). ldd on one of your binaries may
>>>> confirm
>>>> > > that.
>>>> > > > dwhite at this point i'd rule out your code being the primary
>>>> issue.
>>>> > >
>>>> > > All of this sounds like good ways to try to troubleshoot the
>>>> > > installation.  Did you follow these suggestions?
>>>> > >
>>>> > > -Jan
>>>> > >
>>>> >
>>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Twitter GSOC" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to twitter-gsoc+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Twitter GSOC" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to twitter-gsoc+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Cheers,

Chris Aniszczyk | Open Source | Twitter, Inc.
@cra | +1 512 961 6719

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by Vinod Kone <vi...@gmail.com>.
Sweet. Thanks Kevin for helping out Ilim!

Its too bad the libs built from Cyrus SASL source don't work out. But yea,
we can worry about that later.

@Ilim: Migrating to Mesos sounds good!


On Thu, Aug 15, 2013 at 1:35 PM, İlim Uğur <il...@gmail.com> wrote:

> There is finally some good news on the issue. With the help of lyda from
> #mesos IRC channel, I managed to see my code successfully run on a virtual
> Ubuntu 12.04 Server, and on an Ubuntu 13.04 Desktop, after downloading
> libsasl2-dev and libsasl2-modules via apt-get. You may test it yourself by
> cloning it from my github repo on http://github.com/ilimugur/sasltrial
>
> I have been compiling Cyrus SASL from the source since the beginning of
> the program, but it turns out the packages were the better way to go.
>
> Just to remind everyone, this code is a sample client-server application
> that does anonymous authentication using Cyrus SASL library.
>
> I will now proceed with migrating the classes I coded into Mesos source.
>
> Feel free to ask any questions you may have.
>
> - İlim
>
>
>
>
> 2013/8/14 İlim Uğur <il...@gmail.com>
>
>> Hey Vinod,
>>
>> Nothing in particular is blocking me from sharing my vagrant environment,
>> actually. As soon as I saw that Cyrus SASL seemed to work decently, I
>> wanted to make some progress before preparing a configuration file for my
>> setup. I am new to Vagrant, but I guess I can form a configuration file
>> today, with some shell scripting.
>>
>> You are correct on what is not working with my setup. The server side
>> gives out an error when AuthenticatorServer::startAuthProcess() calls
>> sasl_server_start(). Internally, as far as GDB helps, it seems
>> sasl_server_start() calls sasl_server_step(), which returns SASL_NOMECH,
>> causing server to fail the authentication negotiation. I got as deep as I
>> can trace with GDB and as it turns out, a function named
>> _sasl_auxprop_lookup() in lib/auxprop.c returns SASL_NOMECH after failing
>> to find an auxprop plugin. This is, I suppose, the same reason why
>> sample-client and sample-server shipped with Cyrus SASL do not work on my
>> setup.
>>
>> The only irrational part to the issue is, auxprop plugin, which helps
>> checking passwords, is looked for during anonymous authentication, even
>> though anonymous mechanism does not require a password. Does it? I suspect
>> the problem is again with the setup, as I had managed to run sample-client
>> and sample-server on an Ubuntu 12.04 Desktop(not virtual) two weeks ago.
>> Would Jan have any ideas on this part?
>>
>> Have some experience relevant to your question of what happens when I try
>> without Vagrant, too. On a physical Ubuntu 13.04 Desktop, which I set up a
>> week ago, I am getting a compilation error when on the "make" stage of
>> Cyrus SASL installation, in digestmd5.c, to be specific. I will try it on a
>> plain virtual Ubuntu 12.04 server(without Vagrant) and let you know of the
>> result.
>>
>> - İlim
>>
>>
>>
>>
>> 2013/8/12 Vinod Kone <vi...@gmail.com>
>>
>>> Hey Ilim.
>>>
>>> Great to hear that you are making progress. Can you let us know what is
>>> blocking you from sharing your vagrant environment? Is it something we
>>> can
>>> help with?
>>>
>>> Also, I'm a bit confused about what is working and what isn't in your
>>> vagrant + virtual box setup. If I understand correctly the client seems
>>> to
>>> be working but the server is not? Is this true even if you take vagrant +
>>> virtual box out of the equation, i.e, ubuntu on bare metal?
>>>
>>> Cheers,
>>>
>>> -- Vinod
>>>
>>>
>>> On Sun, Aug 11, 2013 at 10:50 PM, İlim Uğur <il...@gmail.com> wrote:
>>>
>>> > Hey,
>>> >
>>> > There is some progress with the issue, and although it is not
>>> completely
>>> > resolved yet, I wanted to let everyone hear about the progress.
>>> >
>>> > When Vinod and Jan mentioned setting up some common environment, I
>>> decided
>>> > to try a tool I heard about, called Vagrant (
>>> http://www.vagrantup.com/ ).
>>> > It basically helps you set up a custom work environment with the help
>>> of VM
>>> > technologies. Then you can share the configuration of your dev.
>>> environment
>>> > with the rest of the development team and you get to have the same
>>> > workspace.
>>> >
>>> > I created a default Ubuntu 12.04 server using Vagrant and installed
>>> all the
>>> > relevant packages and files in it. Sadly, I can not share my workspace
>>> > configuration for the moment. Still, as pluginviewer command listed
>>> > seemingly all the plugins we wanted Cyrus SASL to install, it appears
>>> > everything worked fine on this Ubuntu box.
>>> >
>>> > I had encountered problems with trying to install Cyrus SASL to a
>>> virtual
>>> > Ubuntu 12.04 server I created using VirtualBox. I also could not
>>> > successfully run sample-client and sample-server code provided by Cyrus
>>> > SASL on this box(i.e. the one I created using Vagrant). However, I did
>>> > manage to correct a few mistakes in my code, which, for the client
>>> side at
>>> > least, seem to work fine now, at least on the mentioned dev.
>>> environment.
>>> >
>>> > There is an issue on the server-side code, though. I tried tracing the
>>> > program using GDB, but it seems a function(sasl_server_step) returns
>>> > something(SASL_NOMECH) it actually can not return. I will go on looking
>>> > into that in a few hours.
>>> >
>>> > It feels great to finally have made some progress with the issue. I
>>> hope I
>>> > can make faster progress after resolving this.
>>> >
>>> > - İlim
>>> >
>>> >
>>> >
>>> >
>>> > 2013/8/10 Jan Schaumann <js...@netmeister.org>
>>> >
>>> > > ?lim U?ur <il...@gmail.com> wrote:
>>> > >
>>> > > > He suggested I should redo the configuration step, this time
>>> specifying
>>> > > the
>>> > > > plugin directory parameter. I did what he suggested, it had no
>>> effect.
>>> > > the
>>> > > > tool called pluginviewer showed that I only have EXTERNAL plugin
>>> > > available.
>>> > > > So he thought the problem is not my code but the way I installed
>>> sasl.
>>> > >
>>> > > I can't tell for certain, but my instinct and experience suggests
>>> that
>>> > > this likely to be the cause.
>>> > >
>>> > > Where do you currently develop on?  Is this host accessible by others
>>> > > (Vinod and me) to help troubleshoot the issue?
>>> > >
>>> > > If not, then I think we should consider setting up an EC2 instance to
>>> > > poke around together; long-distance trouble-shooting is always
>>> tricky.
>>> > >
>>> > > > dwhite ilim: if pluginviewer is failing, then you have a
>>> fundamental
>>> > > > problem with your sasl install.
>>> > > > dwhite you could strace pluginview, to see where it's looking for
>>> > shared
>>> > > > libraries
>>> > > > dwhite you may have a mix of cyrus sasl installed (native ubuntu
>>> > packages
>>> > > > and newly compiled packages). ldd on one of your binaries may
>>> confirm
>>> > > that.
>>> > > > dwhite at this point i'd rule out your code being the primary
>>> issue.
>>> > >
>>> > > All of this sounds like good ways to try to troubleshoot the
>>> > > installation.  Did you follow these suggestions?
>>> > >
>>> > > -Jan
>>> > >
>>> >
>>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Twitter GSOC" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to twitter-gsoc+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by İlim Uğur <il...@gmail.com>.
There is finally some good news on the issue. With the help of lyda from
#mesos IRC channel, I managed to see my code successfully run on a virtual
Ubuntu 12.04 Server, and on an Ubuntu 13.04 Desktop, after downloading
libsasl2-dev and libsasl2-modules via apt-get. You may test it yourself by
cloning it from my github repo on http://github.com/ilimugur/sasltrial

I have been compiling Cyrus SASL from the source since the beginning of the
program, but it turns out the packages were the better way to go.

Just to remind everyone, this code is a sample client-server application
that does anonymous authentication using Cyrus SASL library.

I will now proceed with migrating the classes I coded into Mesos source.

Feel free to ask any questions you may have.

- İlim




2013/8/14 İlim Uğur <il...@gmail.com>

> Hey Vinod,
>
> Nothing in particular is blocking me from sharing my vagrant environment,
> actually. As soon as I saw that Cyrus SASL seemed to work decently, I
> wanted to make some progress before preparing a configuration file for my
> setup. I am new to Vagrant, but I guess I can form a configuration file
> today, with some shell scripting.
>
> You are correct on what is not working with my setup. The server side
> gives out an error when AuthenticatorServer::startAuthProcess() calls
> sasl_server_start(). Internally, as far as GDB helps, it seems
> sasl_server_start() calls sasl_server_step(), which returns SASL_NOMECH,
> causing server to fail the authentication negotiation. I got as deep as I
> can trace with GDB and as it turns out, a function named
> _sasl_auxprop_lookup() in lib/auxprop.c returns SASL_NOMECH after failing
> to find an auxprop plugin. This is, I suppose, the same reason why
> sample-client and sample-server shipped with Cyrus SASL do not work on my
> setup.
>
> The only irrational part to the issue is, auxprop plugin, which helps
> checking passwords, is looked for during anonymous authentication, even
> though anonymous mechanism does not require a password. Does it? I suspect
> the problem is again with the setup, as I had managed to run sample-client
> and sample-server on an Ubuntu 12.04 Desktop(not virtual) two weeks ago.
> Would Jan have any ideas on this part?
>
> Have some experience relevant to your question of what happens when I try
> without Vagrant, too. On a physical Ubuntu 13.04 Desktop, which I set up a
> week ago, I am getting a compilation error when on the "make" stage of
> Cyrus SASL installation, in digestmd5.c, to be specific. I will try it on a
> plain virtual Ubuntu 12.04 server(without Vagrant) and let you know of the
> result.
>
> - İlim
>
>
>
>
> 2013/8/12 Vinod Kone <vi...@gmail.com>
>
>> Hey Ilim.
>>
>> Great to hear that you are making progress. Can you let us know what is
>> blocking you from sharing your vagrant environment? Is it something we can
>> help with?
>>
>> Also, I'm a bit confused about what is working and what isn't in your
>> vagrant + virtual box setup. If I understand correctly the client seems to
>> be working but the server is not? Is this true even if you take vagrant +
>> virtual box out of the equation, i.e, ubuntu on bare metal?
>>
>> Cheers,
>>
>> -- Vinod
>>
>>
>> On Sun, Aug 11, 2013 at 10:50 PM, İlim Uğur <il...@gmail.com> wrote:
>>
>> > Hey,
>> >
>> > There is some progress with the issue, and although it is not completely
>> > resolved yet, I wanted to let everyone hear about the progress.
>> >
>> > When Vinod and Jan mentioned setting up some common environment, I
>> decided
>> > to try a tool I heard about, called Vagrant ( http://www.vagrantup.com/).
>> > It basically helps you set up a custom work environment with the help
>> of VM
>> > technologies. Then you can share the configuration of your dev.
>> environment
>> > with the rest of the development team and you get to have the same
>> > workspace.
>> >
>> > I created a default Ubuntu 12.04 server using Vagrant and installed all
>> the
>> > relevant packages and files in it. Sadly, I can not share my workspace
>> > configuration for the moment. Still, as pluginviewer command listed
>> > seemingly all the plugins we wanted Cyrus SASL to install, it appears
>> > everything worked fine on this Ubuntu box.
>> >
>> > I had encountered problems with trying to install Cyrus SASL to a
>> virtual
>> > Ubuntu 12.04 server I created using VirtualBox. I also could not
>> > successfully run sample-client and sample-server code provided by Cyrus
>> > SASL on this box(i.e. the one I created using Vagrant). However, I did
>> > manage to correct a few mistakes in my code, which, for the client side
>> at
>> > least, seem to work fine now, at least on the mentioned dev.
>> environment.
>> >
>> > There is an issue on the server-side code, though. I tried tracing the
>> > program using GDB, but it seems a function(sasl_server_step) returns
>> > something(SASL_NOMECH) it actually can not return. I will go on looking
>> > into that in a few hours.
>> >
>> > It feels great to finally have made some progress with the issue. I
>> hope I
>> > can make faster progress after resolving this.
>> >
>> > - İlim
>> >
>> >
>> >
>> >
>> > 2013/8/10 Jan Schaumann <js...@netmeister.org>
>> >
>> > > ?lim U?ur <il...@gmail.com> wrote:
>> > >
>> > > > He suggested I should redo the configuration step, this time
>> specifying
>> > > the
>> > > > plugin directory parameter. I did what he suggested, it had no
>> effect.
>> > > the
>> > > > tool called pluginviewer showed that I only have EXTERNAL plugin
>> > > available.
>> > > > So he thought the problem is not my code but the way I installed
>> sasl.
>> > >
>> > > I can't tell for certain, but my instinct and experience suggests that
>> > > this likely to be the cause.
>> > >
>> > > Where do you currently develop on?  Is this host accessible by others
>> > > (Vinod and me) to help troubleshoot the issue?
>> > >
>> > > If not, then I think we should consider setting up an EC2 instance to
>> > > poke around together; long-distance trouble-shooting is always tricky.
>> > >
>> > > > dwhite ilim: if pluginviewer is failing, then you have a fundamental
>> > > > problem with your sasl install.
>> > > > dwhite you could strace pluginview, to see where it's looking for
>> > shared
>> > > > libraries
>> > > > dwhite you may have a mix of cyrus sasl installed (native ubuntu
>> > packages
>> > > > and newly compiled packages). ldd on one of your binaries may
>> confirm
>> > > that.
>> > > > dwhite at this point i'd rule out your code being the primary issue.
>> > >
>> > > All of this sounds like good ways to try to troubleshoot the
>> > > installation.  Did you follow these suggestions?
>> > >
>> > > -Jan
>> > >
>> >
>>
>
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by İlim Uğur <il...@gmail.com>.
Hey Vinod,

Nothing in particular is blocking me from sharing my vagrant environment,
actually. As soon as I saw that Cyrus SASL seemed to work decently, I
wanted to make some progress before preparing a configuration file for my
setup. I am new to Vagrant, but I guess I can form a configuration file
today, with some shell scripting.

You are correct on what is not working with my setup. The server side gives
out an error when AuthenticatorServer::startAuthProcess() calls
sasl_server_start(). Internally, as far as GDB helps, it seems
sasl_server_start() calls sasl_server_step(), which returns SASL_NOMECH,
causing server to fail the authentication negotiation. I got as deep as I
can trace with GDB and as it turns out, a function named
_sasl_auxprop_lookup() in lib/auxprop.c returns SASL_NOMECH after failing
to find an auxprop plugin. This is, I suppose, the same reason why
sample-client and sample-server shipped with Cyrus SASL do not work on my
setup.

The only irrational part to the issue is, auxprop plugin, which helps
checking passwords, is looked for during anonymous authentication, even
though anonymous mechanism does not require a password. Does it? I suspect
the problem is again with the setup, as I had managed to run sample-client
and sample-server on an Ubuntu 12.04 Desktop(not virtual) two weeks ago.
Would Jan have any ideas on this part?

Have some experience relevant to your question of what happens when I try
without Vagrant, too. On a physical Ubuntu 13.04 Desktop, which I set up a
week ago, I am getting a compilation error when on the "make" stage of
Cyrus SASL installation, in digestmd5.c, to be specific. I will try it on a
plain virtual Ubuntu 12.04 server(without Vagrant) and let you know of the
result.

- İlim



2013/8/12 Vinod Kone <vi...@gmail.com>

> Hey Ilim.
>
> Great to hear that you are making progress. Can you let us know what is
> blocking you from sharing your vagrant environment? Is it something we can
> help with?
>
> Also, I'm a bit confused about what is working and what isn't in your
> vagrant + virtual box setup. If I understand correctly the client seems to
> be working but the server is not? Is this true even if you take vagrant +
> virtual box out of the equation, i.e, ubuntu on bare metal?
>
> Cheers,
>
> -- Vinod
>
>
> On Sun, Aug 11, 2013 at 10:50 PM, İlim Uğur <il...@gmail.com> wrote:
>
> > Hey,
> >
> > There is some progress with the issue, and although it is not completely
> > resolved yet, I wanted to let everyone hear about the progress.
> >
> > When Vinod and Jan mentioned setting up some common environment, I
> decided
> > to try a tool I heard about, called Vagrant ( http://www.vagrantup.com/).
> > It basically helps you set up a custom work environment with the help of
> VM
> > technologies. Then you can share the configuration of your dev.
> environment
> > with the rest of the development team and you get to have the same
> > workspace.
> >
> > I created a default Ubuntu 12.04 server using Vagrant and installed all
> the
> > relevant packages and files in it. Sadly, I can not share my workspace
> > configuration for the moment. Still, as pluginviewer command listed
> > seemingly all the plugins we wanted Cyrus SASL to install, it appears
> > everything worked fine on this Ubuntu box.
> >
> > I had encountered problems with trying to install Cyrus SASL to a virtual
> > Ubuntu 12.04 server I created using VirtualBox. I also could not
> > successfully run sample-client and sample-server code provided by Cyrus
> > SASL on this box(i.e. the one I created using Vagrant). However, I did
> > manage to correct a few mistakes in my code, which, for the client side
> at
> > least, seem to work fine now, at least on the mentioned dev. environment.
> >
> > There is an issue on the server-side code, though. I tried tracing the
> > program using GDB, but it seems a function(sasl_server_step) returns
> > something(SASL_NOMECH) it actually can not return. I will go on looking
> > into that in a few hours.
> >
> > It feels great to finally have made some progress with the issue. I hope
> I
> > can make faster progress after resolving this.
> >
> > - İlim
> >
> >
> >
> >
> > 2013/8/10 Jan Schaumann <js...@netmeister.org>
> >
> > > ?lim U?ur <il...@gmail.com> wrote:
> > >
> > > > He suggested I should redo the configuration step, this time
> specifying
> > > the
> > > > plugin directory parameter. I did what he suggested, it had no
> effect.
> > > the
> > > > tool called pluginviewer showed that I only have EXTERNAL plugin
> > > available.
> > > > So he thought the problem is not my code but the way I installed
> sasl.
> > >
> > > I can't tell for certain, but my instinct and experience suggests that
> > > this likely to be the cause.
> > >
> > > Where do you currently develop on?  Is this host accessible by others
> > > (Vinod and me) to help troubleshoot the issue?
> > >
> > > If not, then I think we should consider setting up an EC2 instance to
> > > poke around together; long-distance trouble-shooting is always tricky.
> > >
> > > > dwhite ilim: if pluginviewer is failing, then you have a fundamental
> > > > problem with your sasl install.
> > > > dwhite you could strace pluginview, to see where it's looking for
> > shared
> > > > libraries
> > > > dwhite you may have a mix of cyrus sasl installed (native ubuntu
> > packages
> > > > and newly compiled packages). ldd on one of your binaries may confirm
> > > that.
> > > > dwhite at this point i'd rule out your code being the primary issue.
> > >
> > > All of this sounds like good ways to try to troubleshoot the
> > > installation.  Did you follow these suggestions?
> > >
> > > -Jan
> > >
> >
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by Vinod Kone <vi...@gmail.com>.
Hey Ilim.

Great to hear that you are making progress. Can you let us know what is
blocking you from sharing your vagrant environment? Is it something we can
help with?

Also, I'm a bit confused about what is working and what isn't in your
vagrant + virtual box setup. If I understand correctly the client seems to
be working but the server is not? Is this true even if you take vagrant +
virtual box out of the equation, i.e, ubuntu on bare metal?

Cheers,

-- Vinod


On Sun, Aug 11, 2013 at 10:50 PM, İlim Uğur <il...@gmail.com> wrote:

> Hey,
>
> There is some progress with the issue, and although it is not completely
> resolved yet, I wanted to let everyone hear about the progress.
>
> When Vinod and Jan mentioned setting up some common environment, I decided
> to try a tool I heard about, called Vagrant ( http://www.vagrantup.com/ ).
> It basically helps you set up a custom work environment with the help of VM
> technologies. Then you can share the configuration of your dev. environment
> with the rest of the development team and you get to have the same
> workspace.
>
> I created a default Ubuntu 12.04 server using Vagrant and installed all the
> relevant packages and files in it. Sadly, I can not share my workspace
> configuration for the moment. Still, as pluginviewer command listed
> seemingly all the plugins we wanted Cyrus SASL to install, it appears
> everything worked fine on this Ubuntu box.
>
> I had encountered problems with trying to install Cyrus SASL to a virtual
> Ubuntu 12.04 server I created using VirtualBox. I also could not
> successfully run sample-client and sample-server code provided by Cyrus
> SASL on this box(i.e. the one I created using Vagrant). However, I did
> manage to correct a few mistakes in my code, which, for the client side at
> least, seem to work fine now, at least on the mentioned dev. environment.
>
> There is an issue on the server-side code, though. I tried tracing the
> program using GDB, but it seems a function(sasl_server_step) returns
> something(SASL_NOMECH) it actually can not return. I will go on looking
> into that in a few hours.
>
> It feels great to finally have made some progress with the issue. I hope I
> can make faster progress after resolving this.
>
> - İlim
>
>
>
>
> 2013/8/10 Jan Schaumann <js...@netmeister.org>
>
> > ?lim U?ur <il...@gmail.com> wrote:
> >
> > > He suggested I should redo the configuration step, this time specifying
> > the
> > > plugin directory parameter. I did what he suggested, it had no effect.
> > the
> > > tool called pluginviewer showed that I only have EXTERNAL plugin
> > available.
> > > So he thought the problem is not my code but the way I installed sasl.
> >
> > I can't tell for certain, but my instinct and experience suggests that
> > this likely to be the cause.
> >
> > Where do you currently develop on?  Is this host accessible by others
> > (Vinod and me) to help troubleshoot the issue?
> >
> > If not, then I think we should consider setting up an EC2 instance to
> > poke around together; long-distance trouble-shooting is always tricky.
> >
> > > dwhite ilim: if pluginviewer is failing, then you have a fundamental
> > > problem with your sasl install.
> > > dwhite you could strace pluginview, to see where it's looking for
> shared
> > > libraries
> > > dwhite you may have a mix of cyrus sasl installed (native ubuntu
> packages
> > > and newly compiled packages). ldd on one of your binaries may confirm
> > that.
> > > dwhite at this point i'd rule out your code being the primary issue.
> >
> > All of this sounds like good ways to try to troubleshoot the
> > installation.  Did you follow these suggestions?
> >
> > -Jan
> >
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by İlim Uğur <il...@gmail.com>.
Hey,

There is some progress with the issue, and although it is not completely
resolved yet, I wanted to let everyone hear about the progress.

When Vinod and Jan mentioned setting up some common environment, I decided
to try a tool I heard about, called Vagrant ( http://www.vagrantup.com/ ).
It basically helps you set up a custom work environment with the help of VM
technologies. Then you can share the configuration of your dev. environment
with the rest of the development team and you get to have the same
workspace.

I created a default Ubuntu 12.04 server using Vagrant and installed all the
relevant packages and files in it. Sadly, I can not share my workspace
configuration for the moment. Still, as pluginviewer command listed
seemingly all the plugins we wanted Cyrus SASL to install, it appears
everything worked fine on this Ubuntu box.

I had encountered problems with trying to install Cyrus SASL to a virtual
Ubuntu 12.04 server I created using VirtualBox. I also could not
successfully run sample-client and sample-server code provided by Cyrus
SASL on this box(i.e. the one I created using Vagrant). However, I did
manage to correct a few mistakes in my code, which, for the client side at
least, seem to work fine now, at least on the mentioned dev. environment.

There is an issue on the server-side code, though. I tried tracing the
program using GDB, but it seems a function(sasl_server_step) returns
something(SASL_NOMECH) it actually can not return. I will go on looking
into that in a few hours.

It feels great to finally have made some progress with the issue. I hope I
can make faster progress after resolving this.

- İlim




2013/8/10 Jan Schaumann <js...@netmeister.org>

> ?lim U?ur <il...@gmail.com> wrote:
>
> > He suggested I should redo the configuration step, this time specifying
> the
> > plugin directory parameter. I did what he suggested, it had no effect.
> the
> > tool called pluginviewer showed that I only have EXTERNAL plugin
> available.
> > So he thought the problem is not my code but the way I installed sasl.
>
> I can't tell for certain, but my instinct and experience suggests that
> this likely to be the cause.
>
> Where do you currently develop on?  Is this host accessible by others
> (Vinod and me) to help troubleshoot the issue?
>
> If not, then I think we should consider setting up an EC2 instance to
> poke around together; long-distance trouble-shooting is always tricky.
>
> > dwhite ilim: if pluginviewer is failing, then you have a fundamental
> > problem with your sasl install.
> > dwhite you could strace pluginview, to see where it's looking for shared
> > libraries
> > dwhite you may have a mix of cyrus sasl installed (native ubuntu packages
> > and newly compiled packages). ldd on one of your binaries may confirm
> that.
> > dwhite at this point i'd rule out your code being the primary issue.
>
> All of this sounds like good ways to try to troubleshoot the
> installation.  Did you follow these suggestions?
>
> -Jan
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by Jan Schaumann <js...@netmeister.org>.
?lim U?ur <il...@gmail.com> wrote:
 
> He suggested I should redo the configuration step, this time specifying the
> plugin directory parameter. I did what he suggested, it had no effect. the
> tool called pluginviewer showed that I only have EXTERNAL plugin available.
> So he thought the problem is not my code but the way I installed sasl.

I can't tell for certain, but my instinct and experience suggests that
this likely to be the cause.

Where do you currently develop on?  Is this host accessible by others
(Vinod and me) to help troubleshoot the issue?

If not, then I think we should consider setting up an EC2 instance to
poke around together; long-distance trouble-shooting is always tricky.

> dwhite ilim: if pluginviewer is failing, then you have a fundamental
> problem with your sasl install.
> dwhite you could strace pluginview, to see where it's looking for shared
> libraries
> dwhite you may have a mix of cyrus sasl installed (native ubuntu packages
> and newly compiled packages). ldd on one of your binaries may confirm that.
> dwhite at this point i'd rule out your code being the primary issue.

All of this sounds like good ways to try to troubleshoot the
installation.  Did you follow these suggestions?

-Jan

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by İlim Uğur <il...@gmail.com>.
Hey,

I wanted to summarize the problem I have been having for the last few days
from a [relatively] high-level perspective. Also, I thought I should share
a conversation I had on IRC channel of cyrus.

Here is a current, and relatively high-level status of the problem I have
been working on. There is this callback mechanism Cyrus SASL provides.
Basically you can specify callback methods to initiate when SASL library
needs to retrieve information from the application. If I do not set any
callback methods, the sasl library of client and server initiates, the
libraries accept each other as new connections(not after a negotiation but
after each application providing manually typed info on the other party)
and client receives a list of mechanisms from server it can choose from.
Then, however the sasl library on client's side fails to start the
authentication negotiation procedure with ANONYMOUS mechanism.

If I do set the callback methods, though, this time the sasl library on
client's end can not even initiate, saying that a bad parameter was passed
in the structure that keeps the list of those callbacks. It is not really
reasonable, because I specified the exact same callbacks sample-client
does, only the functions were a little simpler as my code does not accept
arguments from command-line to force some choices to SASL library.

That said, below is my conversation with a developer on Cyrus IRC channel.
The issue was not solved at the end of it, but I wanted to post the
conversation here anyways, in case it ignites some ideas.

To summarize the conversation:
He suggested I should redo the configuration step, this time specifying the
plugin directory parameter. I did what he suggested, it had no effect. the
tool called pluginviewer showed that I only have EXTERNAL plugin available.
So he thought the problem is not my code but the way I installed sasl. My
only hesitation about that argument is, how sample-client and sample-server
managed to authenticate via ANONYMOUS mechanism on my computer. If there
was something wrong with enabling anonymous plugin, they could not have
authenticated, either.


dwhite ilim: does 'pluginviewer' list anonymous as an available plugin?
dwhite as an available *mechanism*?
ilim dwhite: no, actually. nice catch. but I though anonymous was enabled
by default.
dwhite ilim: well, EXTERNAL comes free with the glue library (libsasl2),
but anonymous comes, typically, in its own shared library.
dwhite ilim: did you install libsasl via a binary package?
ilim I compiled the source, and installed using the "quick and dirty way",
as described in cyrus sasl documentation. (i.e. make, make install)
dwhite ilim: i suspect you need to specify a --with-plugindir in your
./configure command.
dwhite an --with-confdir as well.
dwhite and
ilim I wonder why specifying SASL_CB_GETPATH is not enough. I thought that
was the one used for getting the path to the plugin directory.
dwhite the manpage for sasl_client_init says to use SASL_PATH
dwhite although include/sasl.h seems to indicate SASL_CB_GETPATH
ilim dwhite: I tried configuring with the options you thought I should
specify.
ilim I specified the default plugin directory(/usr/lib/sasl2) as the
location for both the plugins and the conf files.
ilim it still returned SASL_BADPARAM.
ilim And the thing is, the sample-client and sample-server can successfully
complere ANONYMOUS authentication
ilim even on my ubuntu desktop with pluginviewer displaying only external
as available.
dwhite ilim: you might try the native ubuntu packages. there may be some
shared library patch they are applying.
dwhite or you might see if they include such a patch in the package source
ilim well, without something in the sample-client & sample-server source,
they couldn't have anonymously authenticated.
ilim but grep gave no results in the source for case insensitive phrase
"ubuntu". Thought they might have some ifdefs for handling such behavior.
dwhite ilim: look for a debian/patches directory
dwhite ilim: also check out /var/log/auth.log for possible errors.
ilim dwhite: Probably as the issue is with sasl_client_init(), there is
nothing on auth.log. Again, nothing turned out for debian orpatch(using
grep).
dwhite ilim: if pluginviewer is failing, then you have a fundamental
problem with your sasl install.
dwhite you could strace pluginview, to see where it's looking for shared
libraries
dwhite you may have a mix of cyrus sasl installed (native ubuntu packages
and newly compiled packages). ldd on one of your binaries may confirm that.
dwhite at this point i'd rule out your code being the primary issue.






2013/7/31 İlim Uğur <il...@gmail.com>

> Hey,
>
> I worked some more on this issue. Still no luck, but I think I can provide
> a little more specific info on it.
>
> I did what Jan suggested about the sample-client and sample-server, and
> was able to authenticate via ANONYMOUS mechanism when I specified the path
> to the plugins. (i.e. although I had installed plugins at /usr/lib/sasl2,
> which is the default location)
>
> Then, I utilized the callback structure Cyrus SASL provides, which helps
> us feed the library data such as authname, realm, password, etc. One can
> basically provide the callback code(e.g. SASL_CB_GETPATH) proc(i.e.
> callback method) and a context data to have a callback mechanism. Then
> Cyrus SASL uses that callback to gather information such as the plugin path
> from one's application.
>
> After appropriately migrating over all the callbacks provided in
> sample-client of Cyrus SASL to my AuthenticatorClient class, I still was
> unable to authenticate. Not only that, but since I started using callbacks
> and provided them as input to sasl_client_init(), I started getting
> SASL_BADPARAM errors as its return value.
>
> I decided to dig deeper using GNU Debugger, and noticed something. In
> Cyrus SASL source, definition of sasl_client_init() is included in
> lib/client.c . I noticed I was getting the error while SASL tries to load
> plugins via _sasl_load_plugins() function. In the beginning of the
> definition of that function, in lib/dlopen.c, the parameters function takes
> are checked in an if statement. What happens is, as long as I do not
> specify SASL_CB_VERIFYFILE in my list of callbacks, WITH a callback
> function (i.e. as opposed to providing NULL as a its proc) the last
> check(i.e. !verifyfile_cb->proc) in this long if statement returns false
> value, ending in that function, and sasl_client_init() returning
> SASL_BADPARAM.
>
> Now, I do not know the required signature of thr proc method of
> SASL_CB_VERIFYFILE callback, but I sill could try to code such a method.
> Yet, what boggles my mind is, sample-client does not have a
> SASL_CB_VERIFYFILE callback, either. Yet, a default callback provided for
> SASL_CB_VERIFYFILE by _sasl_find_verifyfile_callback() to
> _sasl_load_plugins()  seems to work for sample-client, while it does not
> work for my code, which has been almost the same.
>
> It probably is really hard to get this without having a look at the code,
> but I wanted to be as specific as possible. I will be working on providing
> a SASL_CB_VERIFYFILE callback, but not a bit sure if that attempt will
> result in success.
>
> Any ideas/suggestions?
>
> - İlim
>
>
>
>
> 2013/7/29 Jan Schaumann <js...@netmeister.org>
>
>> ?lim U?ur <il...@gmail.com> wrote:
>>
>> > ./sample-server -m ANONYMOUS -i
>> local=127.0.0.1;5555,remote=127.0.0.1;5555
>> > -s http
>> > ./sample-client -m ANONYMOUS -i
>> local=127.0.0.1;5555,remote=127.0.0.1;5555
>> > -s http
>>
>> You have a few semicolons in there, which is likely not what you want.
>> (The shell will stop parsing your command at the semicolon and attempt
>> to execute the remainder after the process terminates.)
>>
>> Have you tried specifying the path to the directory where the plugins
>> are installed?
>>
>> I just build and installed cyrus-sasl-2.1.26 into a temporary location
>> and can do the following:
>>
>> Server:
>> $ ./sample-server -p ../../lib/sasl2
>> Generating client mechanism list...
>> Sending list of 8 mechanism(s)
>> S:
>> U0NSQU0tU0hBLTEgR1NTLVNQTkVHTyBHU1NBUEkgRElHRVNULU1ENSBPVFAgQ1JBTS1NRDUgUExBSU4gQU5PTllNT1VT
>> Waiting for client mechanism...
>> C: QU5PTllNT1VTAGFub255bW91c0BndW1w
>> got 'ANONYMOUS'
>> lt-sample-server: SASL Info: ANONYMOUS login: "anonymous@gump"
>> Negotiation complete
>> Username: anonymous
>> Realm: (NULL)
>> SSF: 0
>> sending encrypted message 'srv message 1'
>> S: c3J2IG1lc3NhZ2UgMQA=
>> Waiting for encrypted message...
>> C: Y2xpZW50IG1lc3NhZ2UgMQA=
>> got 'client message 1'
>> recieved decoded message 'client message 1'
>>
>>
>> Client:
>> $ ./sample-client -m ANONYMOUS
>> Waiting for mechanism list from server...
>> S:
>> U0NSQU0tU0hBLTEgR1NTLVNQTkVHTyBHU1NBUEkgRElHRVNULU1ENSBPVFAgQ1JBTS1NRDUgUExBSU4gQU5PTllNT1VT
>> recieved 69 byte message
>> Forcing use of mechanism ANONYMOUS
>> Choosing best mechanism from: ANONYMOUS
>> Using mechanism ANONYMOUS
>> Preparing initial.
>> Sending initial response...
>> C: QU5PTllNT1VTAGFub255bW91c0BndW1w
>> Negotiation complete
>> Username: anonymous
>> SSF: 0
>> Waiting for encoded message...
>> S: c3J2IG1lc3NhZ2UgMQA=
>> recieved 14 byte message
>> recieved decoded message 'srv message 1'
>> sending encrypted message 'client message 1'
>> C: Y2xpZW50IG1lc3NhZ2UgMQA=
>>
>>
>>
>> When I do not specify the pathname for the server, I do get the
>> 'Starting SASL negotiation: no mechanism available (no mechanism
>> available)' error.
>>
>> -Jan
>>
>
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by İlim Uğur <il...@gmail.com>.
Hey,

I worked some more on this issue. Still no luck, but I think I can provide
a little more specific info on it.

I did what Jan suggested about the sample-client and sample-server, and was
able to authenticate via ANONYMOUS mechanism when I specified the path to
the plugins. (i.e. although I had installed plugins at /usr/lib/sasl2,
which is the default location)

Then, I utilized the callback structure Cyrus SASL provides, which helps us
feed the library data such as authname, realm, password, etc. One can
basically provide the callback code(e.g. SASL_CB_GETPATH) proc(i.e.
callback method) and a context data to have a callback mechanism. Then
Cyrus SASL uses that callback to gather information such as the plugin path
from one's application.

After appropriately migrating over all the callbacks provided in
sample-client of Cyrus SASL to my AuthenticatorClient class, I still was
unable to authenticate. Not only that, but since I started using callbacks
and provided them as input to sasl_client_init(), I started getting
SASL_BADPARAM errors as its return value.

I decided to dig deeper using GNU Debugger, and noticed something. In Cyrus
SASL source, definition of sasl_client_init() is included in lib/client.c .
I noticed I was getting the error while SASL tries to load plugins via
_sasl_load_plugins() function. In the beginning of the definition of that
function, in lib/dlopen.c, the parameters function takes are checked in an
if statement. What happens is, as long as I do not specify
SASL_CB_VERIFYFILE in my list of callbacks, WITH a callback function (i.e.
as opposed to providing NULL as a its proc) the last check(i.e.
!verifyfile_cb->proc) in this long if statement returns false value, ending
in that function, and sasl_client_init() returning SASL_BADPARAM.

Now, I do not know the required signature of thr proc method of
SASL_CB_VERIFYFILE callback, but I sill could try to code such a method.
Yet, what boggles my mind is, sample-client does not have a
SASL_CB_VERIFYFILE callback, either. Yet, a default callback provided for
SASL_CB_VERIFYFILE by _sasl_find_verifyfile_callback() to
_sasl_load_plugins()  seems to work for sample-client, while it does not
work for my code, which has been almost the same.

It probably is really hard to get this without having a look at the code,
but I wanted to be as specific as possible. I will be working on providing
a SASL_CB_VERIFYFILE callback, but not a bit sure if that attempt will
result in success.

Any ideas/suggestions?

- İlim




2013/7/29 Jan Schaumann <js...@netmeister.org>

> ?lim U?ur <il...@gmail.com> wrote:
>
> > ./sample-server -m ANONYMOUS -i
> local=127.0.0.1;5555,remote=127.0.0.1;5555
> > -s http
> > ./sample-client -m ANONYMOUS -i
> local=127.0.0.1;5555,remote=127.0.0.1;5555
> > -s http
>
> You have a few semicolons in there, which is likely not what you want.
> (The shell will stop parsing your command at the semicolon and attempt
> to execute the remainder after the process terminates.)
>
> Have you tried specifying the path to the directory where the plugins
> are installed?
>
> I just build and installed cyrus-sasl-2.1.26 into a temporary location
> and can do the following:
>
> Server:
> $ ./sample-server -p ../../lib/sasl2
> Generating client mechanism list...
> Sending list of 8 mechanism(s)
> S:
> U0NSQU0tU0hBLTEgR1NTLVNQTkVHTyBHU1NBUEkgRElHRVNULU1ENSBPVFAgQ1JBTS1NRDUgUExBSU4gQU5PTllNT1VT
> Waiting for client mechanism...
> C: QU5PTllNT1VTAGFub255bW91c0BndW1w
> got 'ANONYMOUS'
> lt-sample-server: SASL Info: ANONYMOUS login: "anonymous@gump"
> Negotiation complete
> Username: anonymous
> Realm: (NULL)
> SSF: 0
> sending encrypted message 'srv message 1'
> S: c3J2IG1lc3NhZ2UgMQA=
> Waiting for encrypted message...
> C: Y2xpZW50IG1lc3NhZ2UgMQA=
> got 'client message 1'
> recieved decoded message 'client message 1'
>
>
> Client:
> $ ./sample-client -m ANONYMOUS
> Waiting for mechanism list from server...
> S:
> U0NSQU0tU0hBLTEgR1NTLVNQTkVHTyBHU1NBUEkgRElHRVNULU1ENSBPVFAgQ1JBTS1NRDUgUExBSU4gQU5PTllNT1VT
> recieved 69 byte message
> Forcing use of mechanism ANONYMOUS
> Choosing best mechanism from: ANONYMOUS
> Using mechanism ANONYMOUS
> Preparing initial.
> Sending initial response...
> C: QU5PTllNT1VTAGFub255bW91c0BndW1w
> Negotiation complete
> Username: anonymous
> SSF: 0
> Waiting for encoded message...
> S: c3J2IG1lc3NhZ2UgMQA=
> recieved 14 byte message
> recieved decoded message 'srv message 1'
> sending encrypted message 'client message 1'
> C: Y2xpZW50IG1lc3NhZ2UgMQA=
>
>
>
> When I do not specify the pathname for the server, I do get the
> 'Starting SASL negotiation: no mechanism available (no mechanism
> available)' error.
>
> -Jan
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by Jan Schaumann <js...@netmeister.org>.
?lim U?ur <il...@gmail.com> wrote:
 
> ./sample-server -m ANONYMOUS -i local=127.0.0.1;5555,remote=127.0.0.1;5555
> -s http
> ./sample-client -m ANONYMOUS -i local=127.0.0.1;5555,remote=127.0.0.1;5555
> -s http

You have a few semicolons in there, which is likely not what you want.
(The shell will stop parsing your command at the semicolon and attempt
to execute the remainder after the process terminates.)

Have you tried specifying the path to the directory where the plugins
are installed?

I just build and installed cyrus-sasl-2.1.26 into a temporary location
and can do the following:

Server:
$ ./sample-server -p ../../lib/sasl2
Generating client mechanism list...
Sending list of 8 mechanism(s)
S: U0NSQU0tU0hBLTEgR1NTLVNQTkVHTyBHU1NBUEkgRElHRVNULU1ENSBPVFAgQ1JBTS1NRDUgUExBSU4gQU5PTllNT1VT
Waiting for client mechanism...
C: QU5PTllNT1VTAGFub255bW91c0BndW1w
got 'ANONYMOUS'
lt-sample-server: SASL Info: ANONYMOUS login: "anonymous@gump"
Negotiation complete
Username: anonymous
Realm: (NULL)
SSF: 0
sending encrypted message 'srv message 1'
S: c3J2IG1lc3NhZ2UgMQA=
Waiting for encrypted message...
C: Y2xpZW50IG1lc3NhZ2UgMQA=
got 'client message 1'
recieved decoded message 'client message 1'


Client:
$ ./sample-client -m ANONYMOUS
Waiting for mechanism list from server...
S: U0NSQU0tU0hBLTEgR1NTLVNQTkVHTyBHU1NBUEkgRElHRVNULU1ENSBPVFAgQ1JBTS1NRDUgUExBSU4gQU5PTllNT1VT
recieved 69 byte message
Forcing use of mechanism ANONYMOUS
Choosing best mechanism from: ANONYMOUS
Using mechanism ANONYMOUS
Preparing initial.
Sending initial response...
C: QU5PTllNT1VTAGFub255bW91c0BndW1w
Negotiation complete
Username: anonymous
SSF: 0
Waiting for encoded message...
S: c3J2IG1lc3NhZ2UgMQA=
recieved 14 byte message
recieved decoded message 'srv message 1'
sending encrypted message 'client message 1'
C: Y2xpZW50IG1lc3NhZ2UgMQA=



When I do not specify the pathname for the server, I do get the
'Starting SASL negotiation: no mechanism available (no mechanism
available)' error.

-Jan

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by İlim Uğur <il...@gmail.com>.
Ok. Here's how I reproduced the issue I'm having on sample-server and
sample-client distributed with Cyrus SASL source, under /sample. I
installed Cyrus SASL with the commands below.

cd <sasl_dir>
bootstrap
./configure
sudo make
sudo install

I created the sample-client and sample server by these;

cd sample
make clean
make
make sample-server
make sample-client

Then, all I did was running the two in different terminals using the
commands below.

./sample-server -m ANONYMOUS -i local=127.0.0.1;5555,remote=127.0.0.1;5555
-s http
./sample-client -m ANONYMOUS -i local=127.0.0.1;5555,remote=127.0.0.1;5555
-s http

Copy the line sample-server prints(i.e. the one starting with "S: " and
paste it to sample-client. It will give a SASL_NOMECH (with integral value
-4) error.

Same goes with my code on https://github.com/ilimugur/sasltrial . Even
though I send a hard-coded list consisting only of ANONYMOUS,
sasl_client_start returns SASL_NOMECH.

- İlim




2013/7/28 Jan Schaumann <js...@netmeister.org>

> Vinod Kone <vi...@gmail.com> wrote:
>
> >---------- Forwarded message ----------
> >From: ?lim U?ur <il...@gmail.com>
> >Date: 2013/7/28
> >Subject: SASL Empty Mechlist Issue(Ubuntu Desktop)
> >To: cyrus-sasl@lists.andrew.cmu.edu
>
> > I am currently trying to implement a sample client-server code that does
> > ANONYMOUS authentication on my ubuntu(not a server) localhost. However,
> > sasl_listmech() returns an empty list on the server side, and even if I
> > send a hard-coded list(i.e. "ANONYMOUS") sasl_client_start() returns
> > SASL_NOMECH. Any ideas on how I can fix this?
>
> I suspect that this has to do with the SASL installation on the host.
> See
> http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/2012-November/002557.html
> for a similar issue.  I'll try to recreate the problem, but maybe try to
> run pluginviewer to ensure that the correct SASL plugins can be found.
>
> -Jan
>

Re: Fwd: SASL Empty Mechlist Issue(Ubuntu Desktop)

Posted by Jan Schaumann <js...@netmeister.org>.
Vinod Kone <vi...@gmail.com> wrote:

>---------- Forwarded message ----------
>From: ?lim U?ur <il...@gmail.com>
>Date: 2013/7/28
>Subject: SASL Empty Mechlist Issue(Ubuntu Desktop)
>To: cyrus-sasl@lists.andrew.cmu.edu
 
> I am currently trying to implement a sample client-server code that does
> ANONYMOUS authentication on my ubuntu(not a server) localhost. However,
> sasl_listmech() returns an empty list on the server side, and even if I
> send a hard-coded list(i.e. "ANONYMOUS") sasl_client_start() returns
> SASL_NOMECH. Any ideas on how I can fix this?

I suspect that this has to do with the SASL installation on the host.
See
http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/2012-November/002557.html
for a similar issue.  I'll try to recreate the problem, but maybe try to
run pluginviewer to ensure that the correct SASL plugins can be found.

-Jan