{"id":5703,"date":"2019-01-16T15:56:39","date_gmt":"2019-01-16T10:26:39","guid":{"rendered":"\/?p=5703"},"modified":"2019-08-22T16:51:51","modified_gmt":"2019-08-22T11:21:51","slug":"permission-sensitive-caching-psc","status":"publish","type":"post","link":"https:\/\/www.argildx.us\/technology\/permission-sensitive-caching-psc\/","title":{"rendered":"Permission Sensitive Caching (PSC)"},"content":{"rendered":"

In AEM, we have both secured pages as well as public pages. Dispatcher provides the capability to cache all the pages but dispatcher doesn\u2019t know about secured or un-secured pages, so it serves all the pages to an Anonymous user. To get rid of this problem, dispatcher needs to know whether a page is to be served to a particular user. In AEM, Permission Sensitive Caching(PSC) provides this functionality which enables you to cache secured pages. Dispatcher checks user\u2019s access permissions for a page before displaying the cached page.<\/p>\n

So, when any request comes to the dispatcher, it hits an AEM servlet to check the user permission.<\/p>\n

 <\/p>\n

Let\u2019s elaborate PSC integration with AEM 6.4 and Dispatcher 2.4.<\/p>\n

Step 1: <\/strong>Dispatcher configurations need to be updated as explained below:<\/h6>\n

a. Add this code in publish-farm :<\/p>\n

\/auth_checker\r\n  {\r\n  # request is sent to this URL with '?uri=<page>' appended\r\n  \/url \"\/content.pagePermission.getPermission\"    \r\n  # only the requested pages matching the filter section below are checked, all other pages get delivered unchecked\r\n  \/filter\r\n    {\r\n    \/0000\r\n      {\r\n      \/glob \"*\"\r\n      \/type \"deny\"\r\n      }\r\n    \/0001\r\n      {\r\n      \/glob \"\/content\/we-retail\/secure-pages\/*.html\"\r\n      \/type \"allow\"\r\n      }\r\n    }\r\n  # any header line returned from the auth_checker's HEAD request matching the section below will be returned as well\r\n  \/headers\r\n    {\r\n    \/0000\r\n      {\r\n      \/glob \"*\"\r\n      \/type \"deny\"\r\n      }\r\n    \/0001\r\n      {\r\n      \/glob \"Set-Cookie:*\"\r\n      \/type \"allow\"\r\n      }\r\n    }\r\n  }\r\n<\/pre>\n

Brief description about dispatcher configuration:<\/p>\n