Hi @trc41594544!
There are two prerequisites for it:
- You need to add the according dispatcher configuration (the /auth_checker section mentioned in the documentation you linked and posted by @asutosh_jena_) and
- you need to have your authorization checker servlet up and running on your AEM instance.
If you are now requesting any page that matches the defined filter rules of the auth_checker section from the dispatcher, the following will happen:
- The dispatcher will send a HEAD request to the auth servlet on the publisher with a parameter containing the requested pages path.
- If the response from the auth servlet on the publisher to that HEAD request is HTTP 200 OK, the dispatcher will continue processing and either deliver the requested page from cache or request it from the publisher.
- If the response from the auth servlet on the publisher to that HEAD request is HTTP 403 Forbidden, the dispatcher will return this HTTP error status to the client (and probably deliver an according error document, if configured).
As outlined, permission sensitive caching needs both, an AEM instance and a dispatcher, to work properly.
You can test 1 (the dispatcher configuration) by requesting a page that should be protected and reviewing the dispatcher.log on the dispatcher (ideally set to debug log level) and the request.log/access.log on your AEM instance. You should see two requests from the dispatcher to the AEM instance: one HEAD requests to the auth servlet and - if you are allowed to see the page - one request to the actual page.
You can test 2 (your auth servlet) by "manually" sending a HEAD request with the page url as a parameter to the auth servlet on your AEM instance and review the response (HTTP status), e. g. using Postman or curl.
Hope that helps!