{"id":2401,"date":"2016-10-01T17:53:27","date_gmt":"2016-10-01T17:53:26","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2401"},"modified":"2025-06-13T19:58:50","modified_gmt":"2025-06-14T02:58:50","slug":"access-denied-or-access-lost-some-tips-on-sync-gateway","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/","title":{"rendered":"Access Denied, or Access Lost?  Some Tips on Sync Gateway"},"content":{"rendered":"<p>The plan for this blog post started out with wanting to clarify a particular detail about how Couchbase Mobile\u2019s\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/get-started\/sync-gateway-overview\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Sync Gateway<\/a>\u00a0component handles removing a client\u2019s access to a document. I\u2019m going to write a bit about Sync Gateway\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/develop\/guides\/sync-gateway\/channels\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">channels<\/a>\u00a0to provide a foundation. If you\u2019re already familiar with Sync Gateway and channels, you might skim the first part.<\/p>\n<h2 id=\"understanding-sync-gateway-channels\">Understanding Sync Gateway Channels<\/h2>\n<p><a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/get-started\/sync-gateway-overview\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Sync Gateway<\/a>, the \u201cglue\u201d portion of the\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/mobile?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Couchbase Mobile<\/a>\u00a0stack, has the ability to assign documents to something we call channels. Channels act as an organization and security mechanism.<\/p>\n<p>This graphic may help you picture how channels work. It shows conceptually the idea of Sync Gateway feeding documents to channels during a replication.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" style=\"max-width: 700px !important\" src=\"\/wp-content\/original-assets\/2016\/september\/access-denied-or-access-lost-some-tips-on-sync-gateway\/channels_pipe.png\" alt=\"Symbolic: channels as pipes\" align=\"middle\" \/><\/p>\n<p>You control assigning documents to channels through the Sync Gateway\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/develop\/guides\/sync-gateway\/sync-function-api-guide\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">sync function<\/a>. Each blue pipe in the diagram represents a channel. The green arrows illustrate the idea that the sync function can assign any individual document to any number of channels.<\/p>\n<p>This allows you to group related documents, making it easy to organize information flow. For example, you might create a channel for each user of an app. You can change around your data model and documents all you want. Just tag each document with the user id.<\/p>\n<p>Channels are so useful, that we made the default sync function create them automatically. It assigns a document to a set of channels based on the presence of a\u00a0<code>channels<\/code>\u00a0property in the document. Or, to put it another way, if you don\u2019t supply a sync function, Sync Gateway uses the following equivalent:<\/p>\n<pre class=\"lang:js decode:true\">function (doc) {\r\n   channel(doc.channels);\r\n}<\/pre>\n<p>(Sync functions are written in JavaScript.\u00a0<code>channel<\/code>\u00a0is a function defined by Sync Gateway.)<\/p>\n<p>To use channels, a client simply asks for the ones it wants when setting up a replication. What about security, though? It wouldn\u2019t do to have any client access whatever channel it wanted.<\/p>\n<p>Sync Gateway will only send documents to authorized clients. This happens on a per channel basis. You can authorize a client based on an authenticated user id, or a role the user is assigned to.<\/p>\n<p>This diagram gives a visual idea of how channel assignment (done by Sync Gateway), channel access requests (done by a client while running a replication), and authorization combine to determine what documents a client can pull.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" style=\"max-width: 250px !important\" src=\"\/wp-content\/original-assets\/2016\/september\/access-denied-or-access-lost-some-tips-on-sync-gateway\/channels_venn.png\" alt=\"Venn diagram showing accessible documents as intersection of Sync Gateway assigned documents, authorized access, and client requested channels\" align=\"middle\" \/><\/p>\n<p>The blue circle represents channels the sync function assigns a document to. The yellow circle represents the channels a client requests. Finally, the red circle represents the channels a user or role has authorization to access. The green section represents the documents the client will receive.<\/p>\n<h2 id=\"one-no-wait-two-tricky-bits\">One, no wait, Two Tricky Bits<\/h2>\n<p>The description above may all seem very straight forward. There\u2019s quite a bit more to understand about Sync Gateway and how it can be configured. I want to finish out by talking about two cases that tend to trip people up.<\/p>\n<h4 id=\"read-vs-write-access\">Read vs. Write Access<\/h4>\n<p>Notice the relationship between a client and Sync Gateway here isn\u2019t symmetric. Sync Gateway takes care of feeding documents out based on channels. Clients don\u2019t. This has the seemingly odd result that a client can push (write) a document that it can\u2019t pull (read)! (We say push and pull to indicate a replication is happening, and the direction of data flow.)<\/p>\n<p>Say we\u2019re using the default sync function, and we authorize pulling based on user id. User Alice creates a document and puts \u201cBob\u201d in the\u00a0<code>channels<\/code>\u00a0property. Once Alice pushes the document to Sync Gateway, she can no longer pull it. Sync Gateway assigns the new revision to Bob\u2019s channel. Alice can\u2019t pull the document, but Bob can.<\/p>\n<h4 id=\"lost-access\">Lost Access<\/h4>\n<p>Here\u2019s another edge case. What happens if a client loses access to a document? As we just saw, the client might even have caused this.<\/p>\n<p>Couchbase Mobile uses what\u2019s known as multi-version concurrency control to handle all the nuances offline use and sophisticated synchronization produce. Losing access isn\u2019t the same as the document getting deleted. Further, the client may already have an older version.<\/p>\n<p>Couchbase handles this by creating a special revision of the document. It\u2019s a tombstone revision, meaning it has no contents. Unlike a tombstone marking a deleted document, though, this kind marks the document as having been removed. (This shows up in the document meta-data.)<\/p>\n<p>For most purposes, Couchbase Lite will behave as if the document doesn\u2019t exist. It won\u2019t show in queries, for example. There are still ways to retrieve it, though. You can check if a document has been removed by calling its\u00a0<code>.isGone()<\/code>\u00a0method. (Note the tombstone only gets created when a client like Couchbase Lite pulls the tombstone during a replication.)<\/p>\n<h2 id=\"wrapping-up\">Wrapping Up<\/h2>\n<p>Sync Gateway is a versatile piece of software in its own right. It\u2019s a critical component of Couchbase Mobile, key to solving some of the tough problems that come with a data platform that fully supports offline use.<\/p>\n<p>I hope I\u2019ve given a flavor of one aspect of Sync Gateway (channels), along with a couple of important tips. To get the most out of Sync Gateway, take some time to explore the\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/develop\/guides\/sync-gateway\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">documentation<\/a>.<\/p>\n<h2 id=\"postscript\">Postscript<\/h2>\n<p>Check out more resources on our\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/community?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">developer portal<\/a>\u00a0and follow us on Twitter\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/twitter.com\/CouchbaseDev\">@CouchbaseDev<\/a>.<\/p>\n<p>You can post questions on our\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/www.couchbase.com\/forums\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">forums<\/a>. And we actively participate on\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/stackoverflow.com\/questions\/tagged\/couchbase\">Stack Overflow<\/a>.<\/p>\n<p>You can follow me personally at\u00a0<a style=\"color: #265778;text-decoration: none\" href=\"https:\/\/twitter.com\/HodGreeley\">@HodGreeley<\/a><\/p>\n<div class=\"prev-next-post pure-g\" style=\"letter-spacing: -0.31em;font-family: FreeSans, Arimo,\">\n<div class=\"pure-u-10-24\" style=\"letter-spacing: normal;vertical-align: top;width: 333.328px;font-family: sans-serif;color: #000000;font-size: medium;text-align: start\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The plan for this blog post started out with wanting to clarify a particular detail about how Couchbase Mobile\u2019s\u00a0Sync Gateway\u00a0component handles removing a client\u2019s access to a document. I\u2019m going to write a bit about Sync Gateway\u00a0channels\u00a0to provide a foundation. [&hellip;]<\/p>\n","protected":false},"author":73,"featured_media":2757,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1810,2366],"tags":[1741],"ppma_author":[9042],"class_list":["post-2401","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-mobile","category-sync-gateway","tag-channels"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.2 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Access Denied, or Access Lost? Some Tips on Sync Gateway<\/title>\n<meta name=\"description\" content=\"Learn how Couchbase Mobile\u2019s Sync Gateway component handles removing a client\u2019s access to a document and the Sync Gateway channels to provide a foundation.\" \/>\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\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Access Denied, or Access Lost? Some Tips on Sync Gateway\" \/>\n<meta property=\"og:description\" content=\"Learn how Couchbase Mobile\u2019s Sync Gateway component handles removing a client\u2019s access to a document and the Sync Gateway channels to provide a foundation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-01T17:53:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T02:58:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png\" \/>\n\t<meta property=\"og:image:width\" content=\"958\" \/>\n\t<meta property=\"og:image:height\" content=\"868\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Hod Greeley, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@HodGreeley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hod Greeley, Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\"},\"author\":{\"name\":\"Hod Greeley, Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/9b62593c8a13531e53d52fcd5aabbca4\"},\"headline\":\"Access Denied, or Access Lost? Some Tips on Sync Gateway\",\"datePublished\":\"2016-10-01T17:53:26+00:00\",\"dateModified\":\"2025-06-14T02:58:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\"},\"wordCount\":899,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png\",\"keywords\":[\"Channels\"],\"articleSection\":[\"Couchbase Mobile\",\"Sync Gateway\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\",\"name\":\"Access Denied, or Access Lost? Some Tips on Sync Gateway\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png\",\"datePublished\":\"2016-10-01T17:53:26+00:00\",\"dateModified\":\"2025-06-14T02:58:50+00:00\",\"description\":\"Learn how Couchbase Mobile\u2019s Sync Gateway component handles removing a client\u2019s access to a document and the Sync Gateway channels to provide a foundation.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png\",\"width\":958,\"height\":868,\"caption\":\"Channel Access Venn Diagram\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Access Denied, or Access Lost? Some Tips on Sync Gateway\"}]},{\"@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\/9b62593c8a13531e53d52fcd5aabbca4\",\"name\":\"Hod Greeley, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/21eb69cb5d4a401fb23b149e4f4e9e87\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g\",\"caption\":\"Hod Greeley, Developer Advocate, Couchbase\"},\"description\":\"Hod Greeley is a Developer Advocate for Couchbase, living in Silicon Valley. He has over two decades of experience as a software engineer and engineering manager. He has worked in a variety of software fields, including computational physics and chemistry, computer and network security, finance, and mobile. Prior to joining Couchbase in 2016, Hod led developer relations for mobile at Samsung. Hod holds a Ph.D. in chemical physics from Columbia University.\",\"sameAs\":[\"https:\/\/hod.greeley.org\/blog\",\"https:\/\/x.com\/HodGreeley\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/hod-greeley\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Access Denied, or Access Lost? Some Tips on Sync Gateway","description":"Learn how Couchbase Mobile\u2019s Sync Gateway component handles removing a client\u2019s access to a document and the Sync Gateway channels to provide a foundation.","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\/access-denied-or-access-lost-some-tips-on-sync-gateway\/","og_locale":"en_US","og_type":"article","og_title":"Access Denied, or Access Lost? Some Tips on Sync Gateway","og_description":"Learn how Couchbase Mobile\u2019s Sync Gateway component handles removing a client\u2019s access to a document and the Sync Gateway channels to provide a foundation.","og_url":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-10-01T17:53:26+00:00","article_modified_time":"2025-06-14T02:58:50+00:00","og_image":[{"width":958,"height":868,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png","type":"image\/png"}],"author":"Hod Greeley, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@HodGreeley","twitter_misc":{"Written by":"Hod Greeley, Developer Advocate, Couchbase","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/"},"author":{"name":"Hod Greeley, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/9b62593c8a13531e53d52fcd5aabbca4"},"headline":"Access Denied, or Access Lost? Some Tips on Sync Gateway","datePublished":"2016-10-01T17:53:26+00:00","dateModified":"2025-06-14T02:58:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/"},"wordCount":899,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png","keywords":["Channels"],"articleSection":["Couchbase Mobile","Sync Gateway"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/","url":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/","name":"Access Denied, or Access Lost? Some Tips on Sync Gateway","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png","datePublished":"2016-10-01T17:53:26+00:00","dateModified":"2025-06-14T02:58:50+00:00","description":"Learn how Couchbase Mobile\u2019s Sync Gateway component handles removing a client\u2019s access to a document and the Sync Gateway channels to provide a foundation.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2016\/10\/channels_venn.png","width":958,"height":868,"caption":"Channel Access Venn Diagram"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/access-denied-or-access-lost-some-tips-on-sync-gateway\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Access Denied, or Access Lost? Some Tips on Sync Gateway"}]},{"@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\/9b62593c8a13531e53d52fcd5aabbca4","name":"Hod Greeley, Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/21eb69cb5d4a401fb23b149e4f4e9e87","url":"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g","caption":"Hod Greeley, Developer Advocate, Couchbase"},"description":"Hod Greeley is a Developer Advocate for Couchbase, living in Silicon Valley. He has over two decades of experience as a software engineer and engineering manager. He has worked in a variety of software fields, including computational physics and chemistry, computer and network security, finance, and mobile. Prior to joining Couchbase in 2016, Hod led developer relations for mobile at Samsung. Hod holds a Ph.D. in chemical physics from Columbia University.","sameAs":["https:\/\/hod.greeley.org\/blog","https:\/\/x.com\/HodGreeley"],"url":"https:\/\/www.couchbase.com\/blog\/author\/hod-greeley\/"}]}},"authors":[{"term_id":9042,"user_id":73,"is_guest":0,"slug":"hod-greeley","display_name":"Hod Greeley, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g","author_category":"","last_name":"Greeley","first_name":"Hod","job_title":"","user_url":"https:\/\/hod.greeley.org\/blog","description":"Hod Greeley is a Developer Advocate for Couchbase, living in Silicon Valley. He has over two decades of experience as a software engineer and engineering manager. He has worked in a variety of software fields, including computational physics and chemistry, computer and network security, finance, and mobile. Prior to joining Couchbase in 2016, Hod led developer relations for mobile at Samsung. Hod holds a Ph.D. in chemical physics from Columbia University."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2401","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\/73"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2401"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2401\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/2757"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2401"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}