Hello everyone,
I am implementing my own implementation of a memcachedClient within which I want to add authentication. I just started with PLAIN auth but failed. In short, the LIST_MECH command always returns an empty result, if I go ahead and issue and PLAIN AUTH command, it says, mech: ``PLAIN'' with 34 bytes of data SASL (severity 2): Couldn't find mech PLAIN Below is my configuration: - I am on memcache 1.5.12 - My memcached.conf % cat memcached.conf mech_list: plain log_level: 5 sasldb_path: /tmp/memcached-sasl-db - My /tmp/memcached-sasl-db % cat memcached-sasl-db myname:mypass - My exports: export MEMCACHED_SASL_PWDB=/tmp/memcached-sasl-db export SASL_CONF_PATH=`pwd`/memcached.conf I've tried exporting SASL_CONF_PATH with both specific conf file and only to the folder. I've also built with --enable-sasl-pwdb ------------------------------ Upon launching: I suppose it is picking up the correct conf file ./memcached -m 32 -S -B binary -vvvv Reading configuration from: </MemcachedBuildDirection/build/bin/memcached.conf> Initialized SASL. The LIST_MECH is showing: <29 Read binary protocol data: <29 0x80 0x20 0x00 0x00 <29 0x00 0x00 0x00 0x00 <29 0x00 0x00 0x00 0x00 <29 0x00 0x00 0x00 0x01 <29 0x00 0x00 0x00 0x00 <29 0x00 0x00 0x00 0x00 authenticated() in cmd 0x20 is true >29 Writing bin response: >29 0x81 0x20 0x00 0x00 >29 0x00 0x00 0x00 0x00 >29 0x00 0x00 0x00 0x00 >29 0x00 0x00 0x00 0x01 >29 0x00 0x00 0x00 0x00 >29 0x00 0x00 0x00 0x00 It shows that the response has a total length of zero. Thus I am reading an empty list from the output. And the AUTH command: <29 Read binary protocol data: <29 0x80 0x21 0x00 0x05 <29 0x00 0x00 0x00 0x00 <29 0x00 0x00 0x00 0x27 <29 0x00 0x00 0x00 0x01 <29 0x00 0x00 0x00 0x00 <29 0x00 0x00 0x00 0x00 authenticated() in cmd 0x21 is true 29: going from conn_parse_cmd to conn_nread mech: ``PLAIN'' with 34 bytes of data SASL (severity 2): Couldn't find mech PLAIN sasl result code: -4 Unknown sasl response: -4 >29 Writing an error: Auth failure. >29 Writing bin response: >29 0x81 0x21 0x00 0x00 >29 0x00 0x00 0x00 0x20 >29 0x00 0x00 0x00 0x0d >29 0x00 0x00 0x00 0x01 >29 0x00 0x00 0x00 0x00 >29 0x00 0x00 0x00 0x00 I expected there will be a list of supported auth mechs being returned by LIST_MECH. Can anyone point me at some direction that could make it work? Cheers, Jiuming -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
