How to secure a multitenant application architecture