{"id":1773,"date":"2014-12-16T18:33:52","date_gmt":"2014-12-16T18:33:51","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1773"},"modified":"2020-10-15T19:00:05","modified_gmt":"2020-10-16T02:00:05","slug":"sasl-memcached-now-available","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/","title":{"rendered":"SASL Memcached Now Available!"},"content":{"rendered":"<p>After the initial <a href=\"https:\/\/blogs.sun.com\/trond\/entry\/sasl_support_in_memcached\">announcement<\/a> by Dustin Sallings that the memcached server now has SASL support, (which is a feature in the newly released 1.4.3, announced <a title=\"memcached.org redesign\" href=\"https:\/\/memcached.org\/\">just today<\/a>) this past week has also resulted in a flurry of other developments, particularly in the client realm<\/p>\n<p>A couple weeks ago Dustin added support in spymemcached (Java) and as of this week, Trond Norbye <a href=\"https:\/\/blogs.sun.com\/trond\/\">added support to libmemcached<\/a>, now making it possible to take advantage of the memcached server&#8217;s support for your applications that use memcached! So now you probably want to know: &#8220;How can I use these new features?&#8221; This post will attempt to <span style=\"font-weight: 400;\">answer this question<\/span>, as well as explain the mechanics of memcached and SASL authentication for your applications.<\/p>\n<h4>What is SASL?<\/h4>\n<p>SASL stands for Simple Authentication and Security Layer, which provides you a means of adding authentication support to connection-based protocols, such as the memcached client binary protocol in this case. It works via a function (API) call that is added to the client that provides a functionality for identifying and authenticating a given user. It also provides the means to implement protection throughout the entire connection. Once a user is identified and authenticated, the system provides a security layer between the client protocol and connection.<\/p>\n<h4>How is SASL Implemented for Memcached?<\/h4>\n<p>Until the binary protocol was added as well as the SASL implementation, memcached had no authentication layer whatsoever. Any client could connect to memcached and perform any operation at will. It was up to the memcached user (usually a web developer) to make sure that their network was locked down and that their application was designed securely. Then the binary protocol was added to memcached which made for a more efficient and compact client-server connection.<\/p>\n<p>With SASL support, functions were added to the server that made it so a client connection was forced to authenticate before the complete connection could continue. This of course required a client that sent the authentication information. At first, only spymemcached client (java) was supported, but as already mentioned in the introduction, libmemcached is now also supported.<\/p>\n<p>Basically, SASL uses storage for user credentials&#8211; it can be LDAP or a SQL database. In this example, the user credentials are stored in a database file on the server that memcached will be running. In order for a user to be able to connect to, memcached server won&#8217;t allow the user to connect unless they provide their credentials, and those credentials must match the stored user credentials. More information on the specifics of the implementation for memcached can be found <a href=\"https:\/\/code.google.com\/p\/memcached\/wiki\/SASLAuthProtocol\">here<\/a>.<\/p>\n<h4>How Do I Install SASL With Memcached?<\/h4>\n<p>Well, the first thing you need to do is get the latest memcached server. One place you&#8217;ll find this is the memcached GitHub <a href=\"https:\/\/github.com\/memcached\/memcached\">repository<\/a> or <a href=\"https:\/\/github.com\/memcached\">memcached.org<\/a>, explained in the next step. You also will need a few prerequisites on your server such as development libraries and as well as utilities such as saslpasswd. On Ubuntu, for instance, the packages are installed as:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">sudo apt-get -f install libsasl2-2 sasl2-bin libsasl2-2 libsasl2-dev libsasl2-modules<\/div>\n<\/div>\n<p>Not to forget, the usual requirements for memcached: libevent Just search accordingly for your packages according to the operating system you are using.<\/p>\n<h4>How Do I Set Up SASL Memcached?<\/h4>\n<p>Now you will need to obtain SASL memcached. The code is now officially released from <a href=\"https:\/\/memcached.org\">memcached.org<\/a> <span style=\"font-family: Courier;\">wget https:\/\/memcached.googlecode.com\/files\/memcached-1.4.3.tar.gz<\/span> <span style=\"font-family: Courier;\">tar xvzf memcached-1.4.3.tar.gz<\/span> Or as always it is available via <a href=\"https:\/\/github.com\/memcached\">Github<\/a><\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">git clone git:\/\/github.com\/memcached\/memcached.git<\/div>\n<\/div>\n<p>Now compile and install:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">cd memcached-1.4.3<br \/>\n.\/configure &#8211;enable-sasl<br \/>\nmake test<br \/>\nsudo make install<\/div>\n<\/div>\n<p>Next, you will set up the database and memcached application configuration file. There are two ways to do this: system-wide or for a specific user.<\/p>\n<h4>System-Wide Database File:<\/h4>\n<p>For a system-wide set-up, you will need to set up a memcached.conf file to point to the database file which contains the user and password information in <code>\/usr\/lib\/sasl2\/memcached.conf<\/code>, named per application. An example of this is:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">mech_list: plainlog_level: 5<\/div>\n<\/div>\n<p>Note: on Ubuntu, this database file is already in existence. If you have to have one created, make sure whatever directory you specify for the location of the sasl database exists prior to running the next command) To add a user to the database file:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">sudo saslpasswd2 -c -a memcached<\/div>\n<\/div>\n<p>As you can see, <code>-a<\/code> specifies the application, &#8216;memcached&#8217;, which needs to match the name you gave the conf file in the previous step &#8216;memcached.conf&#8217;. When you run this saslpasswd2 command, you will be prompted for a password and password verification as shown below:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">patg@ishvara:~\/code-dev\/memcached-dustin$ sudo saslpasswd2 -c -a memcached capttofu Password:Again (for verification):<\/div>\n<\/div>\n<p>You can verify that the user you created now exists. To do so, run:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">sudo sasldblistusers2<\/div>\n<\/div>\n<p>-or-<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">sudo sasldblistusers2 -f \/etc\/sasldb2<\/div>\n<\/div>\n<p>You&#8217;ll see an output such as:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">patg@ishvara:~\/code-dev\/memcached-dustin$ sudo sasldblistusers2test1@ishvara: userPassword<\/div>\n<\/div>\n<h4>User-Specific Database File:<\/h4>\n<p>The first thing you need to ensure is that you set a very important environment variable, <code>SASL_CONF_PATH<\/code> whenever you run memcached. In this example, this path will be set to <code>\/home\/patg\/sasl<\/code>.<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">export SASL_CONF_PATH=\/home\/patg\/sasl<\/div>\n<\/div>\n<p>Make sure to create whatever directory path you specify! Next, you will set up the memcached.conf file (named per application). In this example, the contents are:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">mech_list: plainlog_level: 5sasldb_path: \/home\/patg\/sasl\/sasldb2<\/div>\n<\/div>\n<p>Next you will have to create the database file that you just specified in the previous step in your memcached.conf file.<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">sudo saslpasswd2 -c -a memcached -f \/home\/patg\/sasl\/sasldb2 capttofu<\/div>\n<\/div>\n<p>Notice that the -a flag specifies the name of the application <em>memcached<\/em>, which must match to the name of the config file you specified in the previous example above, <span style=\"font-family: Courier;\">memcached.conf<\/span>. Also notice that this differs from the system-wide example because you have to specify the database file in this example with the -f flag. When you run saslpasswd2, you will be prompted to enter the password and password verification, as shown in the example below:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">patg@ishvara:~$ saslpasswd2 -c -a memcached -f \/home\/patg\/sasl\/sasldb2 capttofuPassword:Again (for verification):<\/div>\n<\/div>\n<p>Now to run sasldblistusers2 to verify that you in fact added the user. As with saslpasswd2, you will have to specify the database file:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">patg@ishvara:~$ sasldblistusers2 -f \/home\/patg\/sasl\/sasldb2capttofu@ishvara: userPassword<\/div>\n<\/div>\n<h4>Running SASL-Enabled Memcached<\/h4>\n<p>Using either a system-wide database file or user-level database file, you will need to start memcached with the appropriate flags. When memcached runs with SASL enabled, the binary protocol is used, text protocol turned off. In this example, a user-level\u00a0 database file is used. As the user &#8216;patg&#8217;, the following was done:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">export SASL_CONF_PATH=\/home\/patg\/sasl\/usr\/local\/bin\/memcached -S -vvv<\/div>\n<\/div>\n<p>Now to use memcached, you will need an enabled client, which as announced in this post, spymemcached (Java) and libmemcached support now. For simplicity (at least for me!) I hacked up one of the tests that come with memcached, binary-sasl.t, and renamed it patg.t (Reminds me I need to add support to Cache::Memcached!) I also had to export an environment variable that the test suite code uses to state that you use an existing running memcached server:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">export T_MEMD_USE_DAEMON=localhost:11211<\/div>\n<\/div>\n<p>Then I ran my test:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">patg@ishvara:~\/code-dev\/memcached-dustin$ perl t\/patg.t1..20returning handleok 1 &#8211; started the serverok 2 &#8211; Proper version: 0ok 3 &#8211; list_mechs CRAM-MD5 PLAINok 4 &#8211; this fails to authenticateok 5 &#8211; error code matchesok 6 &#8211; this fails to authenticateok 7 &#8211; error code matchesok 8 &#8211; this fails to authenticateok 9 &#8211; error code matchesok 10 &#8211; this fails to authenticateok 11 &#8211; error code matchesok 12 &#8211; bad mechok 13 &#8211; bad authok 14 &#8211; authenticatedok 15ok 16 &#8211; somevalue = somevalueok 17ok 18ok 19 &#8211; somevalue = somevalueok 20<\/div>\n<\/div>\n<p>Of interest and worth pointing out, notice the list_mechs test. This test lists what your authentication mechanisms your server is configured for. What is of interest to me here is that I see my running server authenticating, since I started the test with -vvv. A failed authentication:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">&lt;30 0x00 0x00 0x00 0x00authenticated() in cmd 0x21 is true30: going from conn_parse_cmd to conn_nreadmech: &#8220;PLAIN&#8221; with 23 bytes of datasasl result code: -13Unknown sasl response: -13&gt;30 Writing an error: Auth failure.<\/div>\n<\/div>\n<p>A successful authentication:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">authenticated() in cmd 0x21 is true30: going from conn_parse_cmd to conn_nreadmech: &#8220;PLAIN&#8221; with 16 bytes of datasasl result code: 0<\/div>\n<\/div>\n<p>A successful GET using authentication:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">authenticated() in cmd 0x00 is true30: going from conn_parse_cmd to conn_nread&lt;30 GET x&gt; FOUND KEY xL 0 9somevalueofu&gt;30 Writing bin response:<\/div>\n<\/div>\n<p>The server is working! Now to try out SASL memcached using libmemcached.<\/p>\n<h4>Installing Libmemcached<\/h4>\n<p>The first thing to install libmemcached with Trond&#8217;s new functionality is to clone his tree from Launchpad. You will need the bazaar revision control system for this. For Ubuntu, it is:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">apt-get install bzr<\/div>\n<\/div>\n<p>Next, clone the tree:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">bzr clone lp:~trond-norbye\/libmemcached\/sasl_rfe_462250cd sasl_rfe_462250\/sh config\/bootstrap.\/configure # note, you do not have to use &#8211;enable-sasl because SASL will be compiled by defaultmakemake testsudo make install<\/div>\n<\/div>\n<p>This installs libmemcached. Now, how do you use it? Well, you will have to write programs to utilize it. For my enjoyment, I wrote a simple C program that uses the information Trond provided on his post. I called it <a href=\"https:\/\/patg.net\/sasl_test.c\">sasl_test.c<\/a> which you can find on Northscale&#8217;s downloads. The crux of what it contains is shown below. I have a main function that contains these important lines:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">\n<p>\/* initialize the client connection to use SASL *\/ if (sasl_client_init(NULL) != SASL_OK) { fprintf(stderr, &#8220;Failed to initialize sasl library!n&#8221;); return 1; }<\/p>\n<p>memcached_st *memc = memcached_create(NULL); \/* set the sasl callbacks for sasl auth *\/ memcached_set_sasl_callbacks(memc, sasl_callbacks); memcached_server_st *servers = memcached_servers_parse(servers_list); memcached_server_push(memc, servers); memcached_server_list_free(servers);<\/p>\n<p>\/* you have to use binary protocol to use SASL *\/ memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);<\/p>\n<p>\/* set a value *\/ rc= memcached_set(memc, key, keylen, value, vallen, 0, 0); if (rc == MEMCACHED_SUCCESS) printf(&#8220;setting key %s value %sn&#8221;, key, value); assert(rc == MEMCACHED_SUCCESS);<\/p>\n<p>\/* get a value *\/ retval= memcached_get(memc, key, keylen, &amp;retlen, (uint32_t)0, &amp;rc); if (rc == MEMCACHED_SUCCESS) printf(&#8220;fetched key %s value %sn&#8221;, key, retval); assert(rc == MEMCACHED_SUCCESS);<\/p>\n<p>\/* free the connection *\/ memcached_free(memc); sasl_done();<\/p>\n<\/div>\n<\/div>\n<p>Then, per Trond&#8217;s instructions (lifted from his page), added callbacks, which I declare in another file I have <a href=\"https:\/\/patg.net\/sasl_test.h\">sasl_test.h<\/a><\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">\n<p>static int get_username(void *context, int id, const char **result, unsigned int *len);static int get_password(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret);<\/p>\n<p>static sasl_callback_t sasl_callbacks[] = {{ SASL_CB_USER, &amp;get_username, NULL}, { SASL_CB_AUTHNAME, &amp;get_username, NULL}, { SASL_CB_PASS, &amp;get_password, NULL}, { SASL_CB_LIST_END, NULL, NULL}};<\/p>\n<\/div>\n<\/div>\n<p>Then I defined these in callbacks <a href=\"https:\/\/patg.net\/sasl_test.c\">sasl_test.c<\/a> (notice the password is set according to what was added to the sasl db file):<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">\n<p>static char *username = &#8220;capttofu&#8221;;static char *passwd = &#8220;s3kr1t&#8221;;<\/p>\n<p>static int get_username(void *context, int id, const char **result, unsigned int *len){ if (!result || (id != SASL_CB_USER &amp;&amp; id != SASL_CB_AUTHNAME)) { return SASL_BADPARAM; }<\/p>\n<p>*result= username; if (len) { *len= (username == NULL) ? 0 : (unsigned int)strlen(username); }<\/p>\n<p>return SASL_OK;}<\/p>\n<p>static int get_password(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret){ static sasl_secret_t* x;<\/p>\n<p>if (!conn || ! psecret || id != SASL_CB_PASS) { return SASL_BADPARAM; }<\/p>\n<p>if (passwd == NULL) { *psecret = NULL; return SASL_OK; } size_t len = strlen(passwd); x = realloc(x, sizeof(sasl_secret_t) + len); if (!x) { return SASL_NOMEM; }<\/p>\n<p>x-&gt;len = len; strcpy((void *)x-&gt;data, passwd);<\/p>\n<p>*psecret = x; return SASL_OK;}<\/p>\n<\/div>\n<\/div>\n<p>I compile this with the following command:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">gcc -g -O0 -I\/usr\/local\/include\/libmemcached -lmemcached -lmemcachedutil -o sasl_test sasl_test.c<\/div>\n<\/div>\n<p>Then I can run the test!<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">.\/sasl_test localhost:11211 testkey testvalue<\/div>\n<\/div>\n<p>If I observe my SASL-enabled memcached server, I see that authentication works. Connection:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">&lt;30 new binary client connection.30: going from conn_new_cmd to conn_waiting30: going from conn_waiting to conn_read30: going from conn_read to conn_parse_cmd<\/div>\n<\/div>\n<p>Authentication:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">&lt;30 Read binary protocol data:&lt;30 0x80 0x20 0x00 0x00&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00authenticated() in cmd 0x20 is true<\/div>\n<\/div>\n<p>Set, authenticated:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">30: going from conn_read to conn_parse_cmd&lt;30 Read binary protocol data:&lt;30 0x80 0x01 0x00 0x07&lt;30 0x08 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x18&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00authenticated() in cmd 0x01 is true30: going from conn_parse_cmd to conn_nread&lt;30 SET testkey Value len is 9&gt; FOUND KEY testkey0 0 10test valueofu<\/div>\n<\/div>\n<p>Get, authenticated:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">30: going from conn_read to conn_parse_cmd&lt;30 Read binary protocol data:&lt;30 0x80 0x0c 0x00 0x07&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x07&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00&lt;30 0x00 0x00 0x00 0x00authenticated() in cmd 0x0c is true30: going from conn_parse_cmd to conn_nread&lt;30 GET testkey&gt; FOUND KEY testkey0 0 9testvaluettofu&gt;30 Writing bin response:<\/div>\n<\/div>\n<p>And it works! Now I can modify other libmemcached-based programs accordingly. Of course, you could also use spymemcached.<\/p>\n<h4>Summary<\/h4>\n<p>With this post, you should come away having a better understanding of what SASL is, and how you can use it with memcached. You should be fully able to now obtain, compile and install both the memcached server as well as the client, libmemcached with SASL enabled, as well as be able to start writing memcached applications that use libmemcached. Have fun!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the initial announcement by Dustin Sallings that the memcached server now has SASL support, (which is a feature in the newly released 1.4.3, announced just today) this past week has also resulted in a flurry of other developments, particularly [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[8984],"class_list":["post-1773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.7.1 (Yoast SEO v25.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SASL Memcached Now Available! - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Learn the advantages of SASL support in memcached, as well as the detailed mechanics of memcached and SASL authentication for your applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SASL Memcached Now Available!\" \/>\n<meta property=\"og:description\" content=\"Learn the advantages of SASL support in memcached, as well as the detailed mechanics of memcached and SASL authentication for your applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-16T18:33:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-16T02:00:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Patrick Galbraith\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Patrick Galbraith\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\"},\"author\":{\"name\":\"Patrick Galbraith\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/f5f72f2c97ee554b0f43ddd3726ec82c\"},\"headline\":\"SASL Memcached Now Available!\",\"datePublished\":\"2014-12-16T18:33:51+00:00\",\"dateModified\":\"2020-10-16T02:00:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\"},\"wordCount\":2307,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\",\"name\":\"SASL Memcached Now Available! - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2014-12-16T18:33:51+00:00\",\"dateModified\":\"2020-10-16T02:00:05+00:00\",\"description\":\"Learn the advantages of SASL support in memcached, as well as the detailed mechanics of memcached and SASL authentication for your applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SASL Memcached Now Available!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/f5f72f2c97ee554b0f43ddd3726ec82c\",\"name\":\"Patrick Galbraith\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/6f163bf0bc012232ca7875624e23b1b2\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/12ac594c0da897f5fb7bb17d4b6ab93fb913370e6ea82eb8f812c62562d6552f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/12ac594c0da897f5fb7bb17d4b6ab93fb913370e6ea82eb8f812c62562d6552f?s=96&d=mm&r=g\",\"caption\":\"Patrick Galbraith\"},\"description\":\"Patrick Galbraith is a Software Engineer at Couchbase. His work is doing R&amp;D, prototyping and development of Linux and Windows product build systems.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/patrick-galbraith\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SASL Memcached Now Available! - The Couchbase Blog","description":"Learn the advantages of SASL support in memcached, as well as the detailed mechanics of memcached and SASL authentication for your applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/","og_locale":"en_US","og_type":"article","og_title":"SASL Memcached Now Available!","og_description":"Learn the advantages of SASL support in memcached, as well as the detailed mechanics of memcached and SASL authentication for your applications.","og_url":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/","og_site_name":"The Couchbase Blog","article_published_time":"2014-12-16T18:33:51+00:00","article_modified_time":"2020-10-16T02:00:05+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Patrick Galbraith","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Patrick Galbraith","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/"},"author":{"name":"Patrick Galbraith","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/f5f72f2c97ee554b0f43ddd3726ec82c"},"headline":"SASL Memcached Now Available!","datePublished":"2014-12-16T18:33:51+00:00","dateModified":"2020-10-16T02:00:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/"},"wordCount":2307,"commentCount":1,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/","url":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/","name":"SASL Memcached Now Available! - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2014-12-16T18:33:51+00:00","dateModified":"2020-10-16T02:00:05+00:00","description":"Learn the advantages of SASL support in memcached, as well as the detailed mechanics of memcached and SASL authentication for your applications.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/sasl-memcached-now-available\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SASL Memcached Now Available!"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/f5f72f2c97ee554b0f43ddd3726ec82c","name":"Patrick Galbraith","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/6f163bf0bc012232ca7875624e23b1b2","url":"https:\/\/secure.gravatar.com\/avatar\/12ac594c0da897f5fb7bb17d4b6ab93fb913370e6ea82eb8f812c62562d6552f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/12ac594c0da897f5fb7bb17d4b6ab93fb913370e6ea82eb8f812c62562d6552f?s=96&d=mm&r=g","caption":"Patrick Galbraith"},"description":"Patrick Galbraith is a Software Engineer at Couchbase. His work is doing R&amp;D, prototyping and development of Linux and Windows product build systems.","url":"https:\/\/www.couchbase.com\/blog\/author\/patrick-galbraith\/"}]}},"authors":[{"term_id":8984,"user_id":40,"is_guest":0,"slug":"patrick-galbraith","display_name":"Patrick Galbraith","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/12ac594c0da897f5fb7bb17d4b6ab93fb913370e6ea82eb8f812c62562d6552f?s=96&d=mm&r=g","author_category":"","last_name":"Galbraith","first_name":"Patrick","job_title":"","user_url":"","description":"Patrick Galbraith is a Software Engineer at Couchbase. His work is doing R&amp;D, prototyping and development of Linux and Windows product build systems."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1773"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1773\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1773"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}