We need to enable SASL auth on memcached running instances. I wanted to know what are the changes required to enable auth using spymemcache client. I assume it will as simple as passing some connection factory instance with credentials. Also once SASL is enable on memcached server, will it enforce to always connect using SASL auth. The reason I ask is, I don't want other clients to break which are not SASL enabled. Wanted to know if someone has solved similar problem that can give a head start. Thanks!
Asked
Active
Viewed 603 times
1 Answers
1
There is a code sample in the tests from a test I wrote some years ago when fixing a bug. That should help you on spymemcached.
If I recall correctly, once configuring/turning on SASL on the memcached server, it will in fact always use SASL auth so any that are not auth'ing would not be able to access. I'd have to check against current code though.

Matt Ingenthron
- 1,894
- 14
- 14
-
Thanks @Matt, this look promising. I was having hard time installing memcached with SASL support on my mac. Do you have any pointers on this? Does mac by default support SASL or do I need to install some packages to enable that? I followed some links online on how to enable but could not make it happen. Any pointers will help! – User5817351 Feb 21 '17 at 19:05
-
At least referring to the client, no packages should be needed. It uses the SASL built into the JVM. – Matt Ingenthron Feb 22 '17 at 21:37
-
Okay so in that case what username and password should be passed in while creating memcache client? "* Example arguments for running this test: username password 127.0.0.1:11211 * 10000 " – User5817351 Feb 24 '17 at 01:19
-
The username and password that you've configured on the memcached server side. I believe there is some detail on the wiki on how to set that up. – Matt Ingenthron Feb 24 '17 at 22:29