Enabling adaptive and secure extranets