Secure middleware for distributed computing