KRACOEUS-6294, KCINFR-992

This PR does a small amount of prep work for the document level authorization changes.  Mainly move the authorization code to common.  It belongs in common due to the fact that is uses heavily common components.