Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

trying to add a simple rule to default_filters.any, but failing with enforce-checksum-of-immutable-files error.

Avatar

Level 9

We are trying to get a servlet visible in the publisher, and understand we have to add a rule to the dispatcher.

Build works fine against the local cloud SDK, but when the source is pushed to cloud, build fails with:

 

There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/filters/default_filters.any

 

We are trying to make our servlets on /bin/xxx visible, and this is the way to do it:

/005 { /type "allow" /url "/bin/*"    }  # allow bin path access

We tried adding this line to myapp.dispatcher.cloud/src/conf.dispatcher.d/filters/filters.any, but this had no effect.

Next we tried commenting out the line which already existed in default_filters.any, but this results in the above build error.

 

Any ideas how to make a servlet path visible on publish instance?

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Please update filters.any file.

defualt_filter changes will not be reflected if you directly made changes there.

e.g. of filters.any

 

$include "./default_filters.any"

#### Custom rules
/0100 { /type "allow" /path "/content/myproj/*"  /extension '(html|jsp|json|pdf)' }

 

 



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @TB3dock 

 

Here is the sample path:

asutosh_jena_0-1620797577313.png

 

ams_publish_filter.any will be used for the publish instance.

 

You can identify which file is mapped for publish by going to 999_ams_publish_farm.any and check for the filter section which will show which file is loading for the filter rules.

 

/filter {
$include "../filters/ams_publish_filters.any"
}

 

 

# deny everything and allow specific entries
# Start with everything blocked as a safeguard and open things customers need and what's safe OOTB
/0001 { /type "deny" /url "*" }

# Open consoles if this isn't a production environment by uncommenting the next few lines
# /002 { /type "allow" /url "/crx/*" } # allow content repository
# /003 { /type "allow" /url "/system/*" } # allow OSGi console

# allow non-public content directories if this isn't a production environment by uncommenting the next few lines
# /004 { /type "allow" /url "/apps/*" } # allow apps access
/005 { /type "allow" /url "/bin/*" } # allow bin path access

 Also try changing the rule numbers such as if 005 is not taking put something like 007 or 111 and try it out.

Avatar

Correct answer by
Community Advisor

Hi,

Please update filters.any file.

defualt_filter changes will not be reflected if you directly made changes there.

e.g. of filters.any

 

$include "./default_filters.any"

#### Custom rules
/0100 { /type "allow" /path "/content/myproj/*"  /extension '(html|jsp|json|pdf)' }

 

 



Arun Patidar

Avatar

Level 9
This should be the accepted answer. It is untenable that someone other than the OP can make answers as accepted.

Avatar

Community Advisor

@TB3dock As per the documentation, you should not touch any OOTB files came by default from archetype or AMS.

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/content-delive...

 

You should create your custom farm in available farms directory, and include custom filters file and then put your logic in that, make that custom farm in enabled farms as softlink.