Modern cloud-based services offer free or low-costs content sharing with significant advantages for the users but also new issues in privacy and security. To protect sensitive contents (i.e. copyrighted, top secret, personal data, etc.) from the unauthorized access, sophisticated access management systems or/and decryption schemes have been proposed, generally based on trusted applications at client side. These applications, work also as access controllers, verifying specific permissions and restrictions accessing user's resources. We propose secure bundles (S-bundles), which encapsulate a behavioral model (provided as bytecode) to define versatile standalone access controllers and encoding/decoding/signature schemes. S-bundles contain also ciphered contents, data access policies and associated metadata. Unlike current solutions, our approach decouples the access policies from the applications installed in the user's platform. S-bundles are multi-platform, by means of trusted bytecode executors. They offer data protection in case of storage in untrusted or honest-but-curious cloud providers.