Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

TB3dock
Level 7
Level 7

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
Arun_Patidar
Correct answer by
Community Advisor
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)' }

 

 

View solution in original post

4 Replies
asutosh_jena
Community Advisor
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.

Arun_Patidar
Correct answer by
Community Advisor
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)' }

 

 

View solution in original post

TB3dock
Level 7
Level 7
This should be the accepted answer. It is untenable that someone other than the OP can make answers as accepted.
Shashi_Mulugu
Community Advisor
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.