Alex Vanderbist has a recent post to his site showing how to fix an issue with Imagick and the "not authorized" exception that can happen when processing PDF files.
Over the last few days we've had a couple of issues with Imagick and processing PDFs on our servers. As it turns out, these issues are caused by automatic security updates. Let's look into the issue and its solution.
The post starts with an example of the errors they've been seeing with the "not authorized" message in their Bugsnag logs. As they traced the problem they saw it was happening on older codebases too, not just new ones. Finally they tracked down the culprit: a recent security update to Imagick that added extra policies for PDFs that need to be configured for it to work as before. They provide an example of what should be added to your policy.xml
file and how to bulk-patch your systems via Ansible.