Handling confidential data on the untrusted cloud : an agent-based approach