May 5, 2020
Estimated Post Reading Time ~

How to secure the AEM application?

Overview
There is a set security practice followed by every development team in Adobe experience manager ( i.e AEM) CMS technology. And, most of these are pretty straightforward suggested by the Adobe as best practices however there are many other security issues that have equal importance.

So, Let’s begin to know how to secure your application by putting the right rules in your AEM environment.

All other recommendations from the open web application security project(i.e OWASP) should be applied. The below recommendations are very specific to AEM technology & AEM infrastructure.

There are many problems that are unknown to the AEM Solution provider & putting the whole thing at risk. I would like to state one of the examples here to showcase the security problems in AEM.

Use below Google Query to find out if your author instance is indexed by Google or not. I have used a very basic query on google. Try it, you would surprise to see how many author instances which are open to exploits. You might be wondering how to login to those authors. That is fairly easy once you know who has authored the pages.
Google Query: inurl:aemauthor

AEM Author Security:
First & foremost, Make sure your AEM author instance isn’t searchable by the search engine & It is not accessible outside of Intranet without VPN. Follow some author security guidelines below:
  • Keep robots.txt for all your domains including the authoring environment. make sure Google does not index the author domain.
  • Enable HTTPS in AEM Author.
  • Changing the Admin password in every AEM instance (i.e server).
  • Create groups for assigning access & follow the least privilege principle. Basically, Instead of denying on many hierarchies just allow what individual group needs.
  • Create a separate replication user to use in the replication agent configuration. Admin should not be used for replicating anywhere.
  • Limit the number of users in admin groups.
  • Web dev, CRX explorer & CRXDE in prod author should be disabled or should be limited to certain users.
AEM Publish Security
Same as AEM author, publish instances should not be accessible to an outside of the intranet & connections to web servers, author, etc should be internal connections. The most important thing to handle in publish security is to handle requests inputs & use proper request sessions. Serving requests with admin sessions or privileged users is a big problem.
Assume some data you have to read & anonymous user does not have permission to that then avoid using the admin session. Have a dedicated user for that to read/write the content for certain requests. Follow other guidelines respect with AEM Publish security:
  • Anonymous permissions should be checked & make sure not every directory accessible to the anonymous user. Even in etc design, There should be proper permission setup in cloud services, etc.
  • Apache Sling Referrer Filter must be configured to handle unwanted publish requests.
  • The cross-site forgery framework should be enabled to filter requests.
  • All default tools (Crx explorer, Crxde, WebDev), etc should be disabled.
  • No one should be able to access publish server directly. Also should not be able to install packages directly.
Dispatcher security
When anyone thinks of AEM security, most of us just think of rules & filters in the dispatcher.any configuration file. But, there are many more use cases where things are not pretty if you have not taken care of security:
  1. Do not have a dispatcher flush agent configured from AEM author. And if it is enabled then have https call for flushing cache. Otherwise, the author flush agent exposes your web server IP & credentials.
  2. Limit the request headers information. Request headers are passed in every request to AEM publish based on dispatcher configuration.
  3. Do not allow cross-origin requests. Set the SAME origin header at the webserver level.
  4. Proper input validation should be done in POST Requests & dispatcher filter should allow only certain POST requests.
  5. Caching of selectors & URL extensions should be defined. Not every selector or extension should be cacheable. DOS or DDOS attacks are very easy to do in AEM application.
  6. Website URL’s should not expose internal directories.
Final thought
We have to secure the infrastructure & security of important environments. Once you have security author, publish & proper dispatcher configuration, you would have a better chance to protect your application. Application security is another aspect that follows the below links for Adobe recommendation.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.