Basic principal override support. Cleanup of this code continues on abr-gecko-dev/principal-hacking