Re: Regarding setting up SASL with memcached server and getting a memcached client to associate with server.
Sorry, ran out of time today. will try for earlier tomorrow On Mon, 9 Apr 2018, Om Kale wrote: > Hi Dormando,I was just curious to know whether you were able to reproduce the > above > mentioned issue? > > Thanks and Regards,Om Kale > > On Mon, Apr 9, 2018 at 12:53 PM, Om Kale wrote: > Yes, that will be very helpful Dormando. I agree, might be missing > something. > The points where I think I might be going wrong are as follows: > > 1. The exact location and contents of memcached.conf and the sasl db file - > memcached-sasl-pwdb (and the interaction between the two). > As per my understanding, SASL_CONF_PATH, tells the memcached server where to > read > the file from and then the line sasldb_path in the conf file tells the server > where to get the sasl db file for username:password authentication. I feel > this > linkage is not happening correctly in my case. > > 2. Is the sasl db file generated on its own when I run the server? If yes, do > we > need to add command line parameters while running the memcached server for > this to > happen. (FYI: I have configured --enable-sasl-pwdb while running configure) > > The main problem I am facing right now is memcached-sasl-pwdb is not getting > created and populated on its own. > Please do let me know the outcome once you try to reproduce it. I am cuurently > using MAC-OS high Sierra. > > Thanks and Regards,Om Kale > > > On Mon, Apr 9, 2018 at 12:28 PM, dormando wrote: > Hey, > > I'll try to reproduce this today. I have a feeling you're skipping > some > steps but it's definitely a confusing process... > > On Mon, 9 Apr 2018, Om Kale wrote: > > > Currently my set up is as follows: > > 1. My memcached.conf exists at > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ > > 2. The memcached server on starting reads from this file as shown in > the log: > > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v > > Reading configuration from: > > > Initialized SASL. > > 3. The contents of the memcached.conf are: > > mech_list: plain > > log_level: 5 > > sasldb_path: > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/memcached-sasl-pwdb > > 4. The memcached-sasl-pwdb is located > at /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ and has the > line: > > (I am adding this line manually as the command 'echo "testpass" | > saslpasswd2 -a memcached -c -p testuser' is not creating the file and > adding the > > content in it) > > ok:hello > > > > However, I still see same error on server side: > > mech: ``SRP'' with 15 bytes of data > > SASL (severity 2): no secret in database > > sasl result code: -4 > > Unknown sasl response: -4 > > > > Also on client side, I still see: > > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost > > Set failed: AUTHENTICATION FAILURE > > > > > > One more question is: > > Is there any additional info to be provided while starting the > memcached server itself? > > > > Thanks and Regards,Om Kale > > > > > > On Mon, Apr 9, 2018 at 10:35 AM, Om Kale wrote: > > Hey Dormando, > > I do not see the memcached-sasl-pwdb created and the password added in it. > > The steps are same as above. > > Also, is there a specific location where memcached.conf and the sasl db > file: memcached-sasl-pwdb, need to be put? > > I do not see the memcached-sasl-pwdb created automatically. Also the > memcached.conf is located at t/sasl/memcached.conf, do I need to make the > > modification in this file to point to sasl db or can I create my own > memcached.conf at another location? > > > > > > > > > > Thanks and Regards,Om Kale > > > > > > On Fri, Apr 6, 2018 at 5:53 PM, dormando wrote: > > Hey, > > > > Did the memcached-sasl-pwdb file get created and is there a line in > it? > > > > On Fri, 6 Apr 2018, Om Kale wrote: > > > > > Got it. I see the line you mentioned in the test code. > > > I executed the following steps but still see same issue. (I ran > ./configure after the echo command) > > > > > > > > > Here are the steps: > > > > > > OKALE-M-33H5:memcached-1.5.7 okale$ echo "hello" | saslpasswd2 -a > memcached -c -p ok > > > OKALE-M-33H5:memcached-1.5.7 okale$ ls -lrth | grep -i > 'memcached.conf' > > > -rw-r--r-- 1 okale staff 116B Apr 6 15:28 memcached.conf > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ cat memcached.conf > > > mech_list: plain > > > log_level: 5 > > > sasldb_path: > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/memcached-sasl-pwdb > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5
Re: Regarding setting up SASL with memcached server and getting a memcached client to associate with server.
Hi Dormando, I was just curious to know whether you were able to reproduce the above mentioned issue? Thanks and Regards, Om Kale On Mon, Apr 9, 2018 at 12:53 PM, Om Kale wrote: > Yes, that will be very helpful Dormando. I agree, might be missing > something. > The points where I think I might be going wrong are as follows: > > 1. The exact location and contents of memcached.conf and the sasl db file > - memcached-sasl-pwdb (and the interaction between the two). > As per my understanding, SASL_CONF_PATH, tells the memcached server where > to read the file from and then the line sasldb_path in the conf file tells > the server where to get the sasl db file for username:password > authentication. I feel this linkage is not happening correctly in my case. > > 2. Is the sasl db file generated on its own when I run the server? If yes, > do we need to add command line parameters while running the memcached > server for this to happen. (FYI: I have configured --enable-sasl-pwdb while > running configure) > > The main problem I am facing right now is memcached-sasl-pwdb is not > getting created and populated on its own. > Please do let me know the outcome once you try to reproduce it. I am > cuurently using MAC-OS high Sierra. > > Thanks and Regards, > Om Kale > > > On Mon, Apr 9, 2018 at 12:28 PM, dormando wrote: > >> Hey, >> >> I'll try to reproduce this today. I have a feeling you're skipping some >> steps but it's definitely a confusing process... >> >> On Mon, 9 Apr 2018, Om Kale wrote: >> >> > Currently my set up is as follows: >> > 1. My memcached.conf exists at /Users/okale/Library/Caches/Ho >> mebrew/memcached-1.5.7/ >> > 2. The memcached server on starting reads from this file as shown in >> the log: >> > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v >> > Reading configuration from: > omebrew/memcached-1.5.7/memcached.conf> >> > Initialized SASL. >> > 3. The contents of the memcached.conf are: >> > mech_list: plain >> > log_level: 5 >> > sasldb_path: /Users/okale/Library/Caches/Ho >> mebrew/memcached-1.5.7/memcached-sasl-pwdb >> > 4. The memcached-sasl-pwdb is located at >> > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ >> and has the line: >> > (I am adding this line manually as the command 'echo "testpass" | >> saslpasswd2 -a memcached -c -p testuser' is not creating the file and >> adding the >> > content in it) >> > ok:hello >> > >> > However, I still see same error on server side: >> > mech: ``SRP'' with 15 bytes of data >> > SASL (severity 2): no secret in database >> > sasl result code: -4 >> > Unknown sasl response: -4 >> > >> > Also on client side, I still see: >> > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost >> > Set failed: AUTHENTICATION FAILURE >> > >> > >> > One more question is: >> > Is there any additional info to be provided while starting the >> memcached server itself? >> > >> > Thanks and Regards,Om Kale >> > >> > >> > On Mon, Apr 9, 2018 at 10:35 AM, Om Kale wrote: >> > Hey Dormando, >> > I do not see the memcached-sasl-pwdb created and the password added in >> it. >> > The steps are same as above. >> > Also, is there a specific location where memcached.conf and the sasl db >> file: memcached-sasl-pwdb, need to be put? >> > I do not see the memcached-sasl-pwdb created automatically. Also the >> memcached.conf is located at t/sasl/memcached.conf, do I need to make the >> > modification in this file to point to sasl db or can I create my own >> memcached.conf at another location? >> > >> > >> > >> > >> > Thanks and Regards,Om Kale >> > >> > >> > On Fri, Apr 6, 2018 at 5:53 PM, dormando wrote: >> > Hey, >> > >> > Did the memcached-sasl-pwdb file get created and is there a line >> in it? >> > >> > On Fri, 6 Apr 2018, Om Kale wrote: >> > >> > > Got it. I see the line you mentioned in the test code. >> > > I executed the following steps but still see same issue. (I ran >> ./configure after the echo command) >> > > >> > > >> > > Here are the steps: >> > > >> > > OKALE-M-33H5:memcached-1.5.7 okale$ echo "hello" | saslpasswd2 >> -a memcached -c -p ok >> > > OKALE-M-33H5:memcached-1.5.7 okale$ ls -lrth | grep -i >> 'memcached.conf' >> > > -rw-r--r-- 1 okale staff 116B Apr 6 15:28 memcached.conf >> > > OKALE-M-33H5:memcached-1.5.7 okale$ >> > > OKALE-M-33H5:memcached-1.5.7 okale$ >> > > OKALE-M-33H5:memcached-1.5.7 okale$ >> > > OKALE-M-33H5:memcached-1.5.7 okale$ cat memcached.conf >> > > mech_list: plain >> > > log_level: 5 >> > > sasldb_path: /Users/okale/Library/Caches/Ho >> mebrew/memcached-1.5.7/memcached-sasl-pwdb >> > > OKALE-M-33H5:memcached-1.5.7 okale$ >> > > OKALE-M-33H5:memcached-1.5.7 okale$ >> > > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v >> > > Reading configuration from: > omebrew/memcached-1.5.7/memcached.conf> >> > > Initialized SASL. >> > > mech: ``SRP'' with 15 b
Re: Regarding setting up SASL with memcached server and getting a memcached client to associate with server.
Yes, that will be very helpful Dormando. I agree, might be missing something. The points where I think I might be going wrong are as follows: 1. The exact location and contents of memcached.conf and the sasl db file - memcached-sasl-pwdb (and the interaction between the two). As per my understanding, SASL_CONF_PATH, tells the memcached server where to read the file from and then the line sasldb_path in the conf file tells the server where to get the sasl db file for username:password authentication. I feel this linkage is not happening correctly in my case. 2. Is the sasl db file generated on its own when I run the server? If yes, do we need to add command line parameters while running the memcached server for this to happen. (FYI: I have configured --enable-sasl-pwdb while running configure) The main problem I am facing right now is memcached-sasl-pwdb is not getting created and populated on its own. Please do let me know the outcome once you try to reproduce it. I am cuurently using MAC-OS high Sierra. Thanks and Regards, Om Kale On Mon, Apr 9, 2018 at 12:28 PM, dormando wrote: > Hey, > > I'll try to reproduce this today. I have a feeling you're skipping some > steps but it's definitely a confusing process... > > On Mon, 9 Apr 2018, Om Kale wrote: > > > Currently my set up is as follows: > > 1. My memcached.conf exists at /Users/okale/Library/Caches/ > Homebrew/memcached-1.5.7/ > > 2. The memcached server on starting reads from this file as shown in the > log: > > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v > > Reading configuration from: Homebrew/memcached-1.5.7/memcached.conf> > > Initialized SASL. > > 3. The contents of the memcached.conf are: > > mech_list: plain > > log_level: 5 > > sasldb_path: /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ > memcached-sasl-pwdb > > 4. The memcached-sasl-pwdb is located at /Users/okale/Library/ > Caches/Homebrew/memcached-1.5.7/ and has the line: > > (I am adding this line manually as the command 'echo "testpass" | > saslpasswd2 -a memcached -c -p testuser' is not creating the file and > adding the > > content in it) > > ok:hello > > > > However, I still see same error on server side: > > mech: ``SRP'' with 15 bytes of data > > SASL (severity 2): no secret in database > > sasl result code: -4 > > Unknown sasl response: -4 > > > > Also on client side, I still see: > > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost > > Set failed: AUTHENTICATION FAILURE > > > > > > One more question is: > > Is there any additional info to be provided while starting the memcached > server itself? > > > > Thanks and Regards,Om Kale > > > > > > On Mon, Apr 9, 2018 at 10:35 AM, Om Kale wrote: > > Hey Dormando, > > I do not see the memcached-sasl-pwdb created and the password added in > it. > > The steps are same as above. > > Also, is there a specific location where memcached.conf and the sasl db > file: memcached-sasl-pwdb, need to be put? > > I do not see the memcached-sasl-pwdb created automatically. Also the > memcached.conf is located at t/sasl/memcached.conf, do I need to make the > > modification in this file to point to sasl db or can I create my own > memcached.conf at another location? > > > > > > > > > > Thanks and Regards,Om Kale > > > > > > On Fri, Apr 6, 2018 at 5:53 PM, dormando wrote: > > Hey, > > > > Did the memcached-sasl-pwdb file get created and is there a line > in it? > > > > On Fri, 6 Apr 2018, Om Kale wrote: > > > > > Got it. I see the line you mentioned in the test code. > > > I executed the following steps but still see same issue. (I ran > ./configure after the echo command) > > > > > > > > > Here are the steps: > > > > > > OKALE-M-33H5:memcached-1.5.7 okale$ echo "hello" | saslpasswd2 > -a memcached -c -p ok > > > OKALE-M-33H5:memcached-1.5.7 okale$ ls -lrth | grep -i > 'memcached.conf' > > > -rw-r--r-- 1 okale staff 116B Apr 6 15:28 memcached.conf > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ cat memcached.conf > > > mech_list: plain > > > log_level: 5 > > > sasldb_path: /Users/okale/Library/Caches/ > Homebrew/memcached-1.5.7/memcached-sasl-pwdb > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ > > > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v > > > Reading configuration from: Homebrew/memcached-1.5.7/memcached.conf> > > > Initialized SASL. > > > mech: ``SRP'' with 15 bytes of data > > > SASL (severity 2): no secret in database > > > sasl result code: -4 > > > Unknown sasl response: -4 > > > > > > > > > > > > Client side: > > > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost > > > Set failed: AUTHENTICATION FAILURE > > > OKAL
Re: Regarding setting up SASL with memcached server and getting a memcached client to associate with server.
Hey, I'll try to reproduce this today. I have a feeling you're skipping some steps but it's definitely a confusing process... On Mon, 9 Apr 2018, Om Kale wrote: > Currently my set up is as follows: > 1. My memcached.conf exists at > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ > 2. The memcached server on starting reads from this file as shown in the log: > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v > Reading configuration from: > > Initialized SASL. > 3. The contents of the memcached.conf are: > mech_list: plain > log_level: 5 > sasldb_path: > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/memcached-sasl-pwdb > 4. The memcached-sasl-pwdb is located at > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ and has the line: > (I am adding this line manually as the command 'echo "testpass" | saslpasswd2 > -a memcached -c -p testuser' is not creating the file and adding the > content in it) > ok:hello > > However, I still see same error on server side: > mech: ``SRP'' with 15 bytes of data > SASL (severity 2): no secret in database > sasl result code: -4 > Unknown sasl response: -4 > > Also on client side, I still see: > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost > Set failed: AUTHENTICATION FAILURE > > > One more question is: > Is there any additional info to be provided while starting the memcached > server itself? > > Thanks and Regards,Om Kale > > > On Mon, Apr 9, 2018 at 10:35 AM, Om Kale wrote: > Hey Dormando, > I do not see the memcached-sasl-pwdb created and the password added in it. > The steps are same as above. > Also, is there a specific location where memcached.conf and the sasl db file: > memcached-sasl-pwdb, need to be put? > I do not see the memcached-sasl-pwdb created automatically. Also the > memcached.conf is located at t/sasl/memcached.conf, do I need to make the > modification in this file to point to sasl db or can I create my own > memcached.conf at another location? > > > > > Thanks and Regards,Om Kale > > > On Fri, Apr 6, 2018 at 5:53 PM, dormando wrote: > Hey, > > Did the memcached-sasl-pwdb file get created and is there a line in it? > > On Fri, 6 Apr 2018, Om Kale wrote: > > > Got it. I see the line you mentioned in the test code. > > I executed the following steps but still see same issue. (I ran > ./configure after the echo command) > > > > > > Here are the steps: > > > > OKALE-M-33H5:memcached-1.5.7 okale$ echo "hello" | saslpasswd2 -a > memcached -c -p ok > > OKALE-M-33H5:memcached-1.5.7 okale$ ls -lrth | grep -i > 'memcached.conf' > > -rw-r--r-- 1 okale staff 116B Apr 6 15:28 memcached.conf > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ cat memcached.conf > > mech_list: plain > > log_level: 5 > > sasldb_path: > /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/memcached-sasl-pwdb > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v > > Reading configuration from: > > > Initialized SASL. > > mech: ``SRP'' with 15 bytes of data > > SASL (severity 2): no secret in database > > sasl result code: -4 > > Unknown sasl response: -4 > > > > > > > > Client side: > > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost > > Set failed: AUTHENTICATION FAILURE > > OKALE-M-33H5:mycode okale$ > > > > > > > > Is there a specific location where memcached.conf and the sasl db > file: memcached-sasl-pwdb, need to be put? > > > > > > > > > > Thanks and Regards,Om Kale > > > > > > On Fri, Apr 6, 2018 at 3:54 PM, dormando wrote: > > Read the 30 lines around where I said, not just that line. > > > > though I guess it's just: > > > > system("echo testpass | $saslpasswd_path -a memcached -c -p > >testuser"); > > > > so that means: > > > > echo "testpass" | saslpasswd2 -a memcached -c -p testuser > > if you run that from the same directory as your memcached.conf (or > >use -f > > to point to it?), it should create the file properly. > > > > I'm saying to use the tool instead of just putting the > >username/password > > into the file, and also using the sasldb_path: argument in > >memcached.conf > > to point to the sasldb, instead of the environment variable. > > > > On Fri, 6 Apr 2018, Om Kale wrote: > > > > > Hey Dormando, > > > Ok. When I look at the 't/binary-sasl.t' and search for the section > >you mentioned, > > > I see this: > > > > > > # Build the auth DB for testing. > > > > > > my $sasldb = '/tmp/test-memcached.sasldb'; > > > > > > unl
Re: Regarding setting up SASL with memcached server and getting a memcached client to associate with server.
Currently my set up is as follows: 1. My memcached.conf exists at /Users/okale/Library/Caches/ Homebrew/memcached-1.5.7/ 2. The memcached server on starting reads from this file as shown in the log: OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v Reading configuration from: Initialized SASL. 3. The contents of the memcached.conf are: mech_list: plain log_level: 5 sasldb_path: /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ memcached-sasl-pwdb 4. The memcached-sasl-pwdb is located at /Users/okale/Library/Caches/ Homebrew/memcached-1.5.7/ and has the line: (I am adding this line manually as the command 'echo "testpass" | saslpasswd2 -a memcached -c -p testuser' is not creating the file and adding the content in it) ok:hello However, I still see same error on server side: mech: ``SRP'' with 15 bytes of data SASL (severity 2): no secret in database sasl result code: -4 Unknown sasl response: -4 Also on client side, I still see: OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost Set failed: AUTHENTICATION FAILURE One more question is: Is there any additional info to be provided while starting the memcached server itself? Thanks and Regards, Om Kale On Mon, Apr 9, 2018 at 10:35 AM, Om Kale wrote: > Hey Dormando, > I do not see the memcached-sasl-pwdb created and the password added in it. > The steps are same as above. > Also, is there a specific location where memcached.conf and the sasl db > file: memcached-sasl-pwdb, need to be put? > I do not see the memcached-sasl-pwdb created automatically. Also the > memcached.conf is located at t/sasl/memcached.conf, do I need to make the > modification in this file to point to sasl db or can I create my own > memcached.conf at another location? > > > > > Thanks and Regards, > Om Kale > > > On Fri, Apr 6, 2018 at 5:53 PM, dormando wrote: > >> Hey, >> >> Did the memcached-sasl-pwdb file get created and is there a line in it? >> >> On Fri, 6 Apr 2018, Om Kale wrote: >> >> > Got it. I see the line you mentioned in the test code. >> > I executed the following steps but still see same issue. (I ran >> ./configure after the echo command) >> > >> > >> > Here are the steps: >> > >> > OKALE-M-33H5:memcached-1.5.7 okale$ echo "hello" | saslpasswd2 -a >> memcached -c -p ok >> > OKALE-M-33H5:memcached-1.5.7 okale$ ls -lrth | grep -i 'memcached.conf' >> > -rw-r--r-- 1 okale staff 116B Apr 6 15:28 memcached.conf >> > OKALE-M-33H5:memcached-1.5.7 okale$ >> > OKALE-M-33H5:memcached-1.5.7 okale$ >> > OKALE-M-33H5:memcached-1.5.7 okale$ >> > OKALE-M-33H5:memcached-1.5.7 okale$ cat memcached.conf >> > mech_list: plain >> > log_level: 5 >> > sasldb_path: /Users/okale/Library/Caches/Ho >> mebrew/memcached-1.5.7/memcached-sasl-pwdb >> > OKALE-M-33H5:memcached-1.5.7 okale$ >> > OKALE-M-33H5:memcached-1.5.7 okale$ >> > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v >> > Reading configuration from: > omebrew/memcached-1.5.7/memcached.conf> >> > Initialized SASL. >> > mech: ``SRP'' with 15 bytes of data >> > SASL (severity 2): no secret in database >> > sasl result code: -4 >> > Unknown sasl response: -4 >> > >> > >> > >> > Client side: >> > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost >> > Set failed: AUTHENTICATION FAILURE >> > OKALE-M-33H5:mycode okale$ >> > >> > >> > >> > Is there a specific location where memcached.conf and the sasl db file: >> memcached-sasl-pwdb, need to be put? >> > >> > >> > >> > >> > Thanks and Regards,Om Kale >> > >> > >> > On Fri, Apr 6, 2018 at 3:54 PM, dormando wrote: >> > Read the 30 lines around where I said, not just that line. >> > >> > though I guess it's just: >> > >> > system("echo testpass | $saslpasswd_path -a memcached -c -p >> testuser"); >> > >> > so that means: >> > >> > echo "testpass" | saslpasswd2 -a memcached -c -p testuser >> > if you run that from the same directory as your memcached.conf >> (or use -f >> > to point to it?), it should create the file properly. >> > >> > I'm saying to use the tool instead of just putting the >> username/password >> > into the file, and also using the sasldb_path: argument in >> memcached.conf >> > to point to the sasldb, instead of the environment variable. >> > >> > On Fri, 6 Apr 2018, Om Kale wrote: >> > >> > > Hey Dormando, >> > > Ok. When I look at the 't/binary-sasl.t' and search for the >> section you mentioned, >> > > I see this: >> > > >> > > # Build the auth DB for testing. >> > > >> > > my $sasldb = '/tmp/test-memcached.sasldb'; >> > > >> > > unlink $sasldb; >> > > >> > > >> > > In the t/sasl/memcached.conf, I see the following: >> > > mech_list: plain cram-md5 >> > > log_level: 5 >> > > sasldb_path: /tmp/test-memcached.sasldb >> > > >> > > Now, let me know what I need to doa bit confused. >> > > Do I need to change any of the above or do I create >> test-memcached.sasldb
Re: Regarding setting up SASL with memcached server and getting a memcached client to associate with server.
Hey Dormando, I do not see the memcached-sasl-pwdb created and the password added in it. The steps are same as above. Also, is there a specific location where memcached.conf and the sasl db file: memcached-sasl-pwdb, need to be put? I do not see the memcached-sasl-pwdb created automatically. Also the memcached.conf is located at t/sasl/memcached.conf, do I need to make the modification in this file to point to sasl db or can I create my own memcached.conf at another location? Thanks and Regards, Om Kale On Fri, Apr 6, 2018 at 5:53 PM, dormando wrote: > Hey, > > Did the memcached-sasl-pwdb file get created and is there a line in it? > > On Fri, 6 Apr 2018, Om Kale wrote: > > > Got it. I see the line you mentioned in the test code. > > I executed the following steps but still see same issue. (I ran > ./configure after the echo command) > > > > > > Here are the steps: > > > > OKALE-M-33H5:memcached-1.5.7 okale$ echo "hello" | saslpasswd2 -a > memcached -c -p ok > > OKALE-M-33H5:memcached-1.5.7 okale$ ls -lrth | grep -i 'memcached.conf' > > -rw-r--r-- 1 okale staff 116B Apr 6 15:28 memcached.conf > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ cat memcached.conf > > mech_list: plain > > log_level: 5 > > sasldb_path: /Users/okale/Library/Caches/Homebrew/memcached-1.5.7/ > memcached-sasl-pwdb > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ > > OKALE-M-33H5:memcached-1.5.7 okale$ ./memcached -S -v > > Reading configuration from: Homebrew/memcached-1.5.7/memcached.conf> > > Initialized SASL. > > mech: ``SRP'' with 15 bytes of data > > SASL (severity 2): no secret in database > > sasl result code: -4 > > Unknown sasl response: -4 > > > > > > > > Client side: > > OKALE-M-33H5:mycode okale$ ./testsasl ok hello localhost > > Set failed: AUTHENTICATION FAILURE > > OKALE-M-33H5:mycode okale$ > > > > > > > > Is there a specific location where memcached.conf and the sasl db file: > memcached-sasl-pwdb, need to be put? > > > > > > > > > > Thanks and Regards,Om Kale > > > > > > On Fri, Apr 6, 2018 at 3:54 PM, dormando wrote: > > Read the 30 lines around where I said, not just that line. > > > > though I guess it's just: > > > > system("echo testpass | $saslpasswd_path -a memcached -c -p > testuser"); > > > > so that means: > > > > echo "testpass" | saslpasswd2 -a memcached -c -p testuser > > if you run that from the same directory as your memcached.conf (or > use -f > > to point to it?), it should create the file properly. > > > > I'm saying to use the tool instead of just putting the > username/password > > into the file, and also using the sasldb_path: argument in > memcached.conf > > to point to the sasldb, instead of the environment variable. > > > > On Fri, 6 Apr 2018, Om Kale wrote: > > > > > Hey Dormando, > > > Ok. When I look at the 't/binary-sasl.t' and search for the > section you mentioned, > > > I see this: > > > > > > # Build the auth DB for testing. > > > > > > my $sasldb = '/tmp/test-memcached.sasldb'; > > > > > > unlink $sasldb; > > > > > > > > > In the t/sasl/memcached.conf, I see the following: > > > mech_list: plain cram-md5 > > > log_level: 5 > > > sasldb_path: /tmp/test-memcached.sasldb > > > > > > Now, let me know what I need to doa bit confused. > > > Do I need to change any of the above or do I create > test-memcached.sasldb under tmp on my machine, add a username:password to > it and then > > run ./configure > > > followed by make? > > > > > > > > > > > > > > > Thanks and Regards,Om Kale > > > > > > > > > On Fri, Apr 6, 2018 at 2:48 PM, dormando > wrote: > > > Just for sanity's sake, if you look at: > t/sasl/memcached.conf in the > > > tarball, and look at t/binary-sasl.t (look for the section > starting with > > > "my $sasldb =", and build a passwd + configure the pwdb > that way, does it > > > work? > > > > > > to reiterate; the test config file explicitly declares the > path for the db > > > within memcached.conf, and then adds the passwords to it > via the > > > saslpasswd tool. > > > > > > Would help rule things out anyway. thanks! > > > > > > On Fri, 6 Apr 2018, Om Kale wrote: > > > > > > > Yup, it will be really helpful if you could try and > reproduce it. > > > > Yes...that's the thing I was wondering, 'no secret in > database' means its able to reach the database, but unable to read/load the > > > memcached-sasl-pwdb > > > > file. Additionally, I was wondering, if there is need to > write additional code for some shared