Showing posts with the label filter

How to prevent DOS attacks in AEM ?

Prevent Denial of Service (DoS) Attacks : AEM  A denial of service (DoS) attack is an attempt to make a computer resource unavailable to its intended users. You can get more information on DDoS prevention in Apache At the dispatcher level, there are two methods of configuring to prevent DoS attacks: Use the mod_rewrite module (for example,  Apache 2.4 ) to perform URL validations (if the URL pattern rules are not too complex). Prevent the dispatcher from caching URLs with spurious extensions by using  filters .  For example, change the caching rules to limit caching to the expected mime types, such as .html .jpeg .gif .swf .js .doc .pdf .ppt .... as per your project requirement. An example configuration file is given below,  for  this includes restrictions for mime types.      When configuring Dispatcher you should restrict external access as much as possible. The      following example provides example for the minimal access for external visitors, you can refer the default file.  /fi

curl command AEM package filter addition creation

How to create AEM package via CURL  Most of our dev ops and AEM developers face issue while automating the AEM package creation via Curl.  I will explain the command and process for it.  in AEM package creation is a 3 steps process.  1- AEM package creation  2 - Filter addition  3- Package build Let's see all these 3 steps in detail -  AEM package creation  it is simple step -  curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/testpackage?cmd=create \ -d packageName=testpackage \ -d groupName=my_packages Filter Addition  This is a complex step where you need to be careful while adding the parameters.  General command , in this " /content/my-site" is my package filter. You can also define the rule like exclude in exclude section.  curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/update.jsp \ -F path=/etc/packages/my_packages/ -F packageName=testpackage \ -F groupName=my_packages \ -F filter=&q