resourceResolverFactory.getAdministrativeResourceResolver(null) WhiteList Bundle for Administrative Login
When working for organizations with the goal of migrating from AEM 6X to 6.5 or to AEM Cloud as a Service. It’s very common that the AEM backend code still utilizes the deprecated resourceResolverFactory.getAdministrativeResourceResolver(null) @depricated API. This method has been deprecated as of 2.4 (bundle version 2.5.0) because of inherent security issues. Services requiring specific […]
How to get Authorization: Basic Auth Header from AEM Author
Getting the Authorization (Basic access authentication) Basic Auth Header from AEM Author is simple. If you have curl installed on your machine, simply run the command below, and you should be able to get the Authorization header from a successful AEM login. What we are doing here is logging into the AEM author with curl […]
Sugar Coat Registered AEM Servlet Scripts and Paths Endpoint
In AEM we tend to write Sling Servlet OSGI Services to expose JSON data using the various service reference properties such as “sling.servlet.paths”, “sling.servlet.resourceTypes”, “sling.servlet.selectors”, and “sling.servlet.extensions”. Example 1: DirectoriesServlet.Java doGet Servlet Implementation (html extension): This is an example how a servlet in AEM to retrieve the directories JSON data. 1234567891011121314151617// example for /content/mysite.directories.html @SlingServlet( […]
What is the AEM Apache Sling Referrer Filter OSGI configuration?
AEM “referrer not allowed” Out of the box, AEM denies all server names or hosts to make HTTP request to the respective running AEM publish/author instance. During a HTTP request made to the AEM publish/author, AEM checks the Referrer header configuration. If the referrer configured to allow the host(s), then AEM will full-fill the request, […]
How to make a simple HTTP POST request to AEM with a HTTP Rest Client, Postman
This method should be used for DEVELOPMENT PURPOSES ONLY! During development in the AEM author instance, you would like to test your servlet using an HTTP Rest Client such as Postman. When making a POST request on the Rest Client, you will experience 2 errors. An authentication error, and a 403 forbidden error. What’s Happening? […]

