I'm considering using CloudKit to power my messaging app. With CloudKit, you can set permissions, for reading, writing and modification/deletion of data:
World - Any user, whether authenticated or not. Authenticated - A user who is logged in with iCloud Creator - A user who created a certain entry will have creator permissions over it
The permissions don't break down enough that I'd be able to specify 'Any user who has a relationship to a message', ie the sender and recipient.
Within my app, I'll only ever make the calls to retrieve data relevant to that particular user, so messages to which they're the sender or recipient. My concern is that with every message stored in this public database, I'm wondering whether a user jailbreaking the app, or doing something else malicious, might be able to insert calls to retrieve additional data, such as the data regarding other users.
If this is possible, is there another way that I could secure the data intended for between two users?