Backport infra changes for audit module.