Hack Realm share database - mobile

I was wondering, if I create a share user entity on a Realm object server. If a user access to the database from his mobile. Could he see all the user data? I'm worry about sensible information on a shared database.

What do you mean by a shared database? All Realms are associated with a user, so yes, anybody with access to that users login information could see the data.
However, normally you would architect the app in such a way that shared data are kept in a shared Realm with the shared ID shipping with the app and then have a login that would generate a true user specific Realm.
Note in this context, it is very important to keep in mind there is a difference between an app user and a Realm Mobile Platform user. It is not uncommon for an app user to know about multiple Realm Mobile Platform user IDs.

Related

How do I authenticate users of a web-app to access GCP data relevant only to them?

I have spent 3 days researching this problem and cannot find a solution or similar use case that shows how to solve the problem, so any pointers would be greatly appreciated.
I am creating a web-app that uses Google Cloud Storage and Bigquery. A user registers on the web app and then can upload data to Cloud Storage and Big Query. Two users could be from the same company and therefore should be able to view the same data - i.e. Jack and Jill work for company A and if Jack uploads a massive dataset via this app, Jill should also be able to view it later.
Another scenario will be I have two completely separate clients with users using this web-app. If users from Company A upload data, users from Company B should not be able to view Company A's data, and vice versa. But users from the same company should be able to view the data within their company.
Currently, I have an app that works for a single company. This has a React front-end that uses Firebase for authentication. Once the user is logged in, they can use the app which sends off API calls to a Flask back-end that does some error checking and authentication checking and then fires off an API call to GCP. This uses a service account and the key is loaded as an environment variable in the environment in which the Flask app is running.
However, if Company B want to use the app now, both Company A and Company B will be able to see each other's data and visualize it through the app. In addition, they will be sharing a project (I would like to change this to allocate billing more easily to have each client have their own project).
I ultimately want to get this app onto Kubernetes and ensure that each company is independent of each other, however, do not want to have to have separate URL's for every company using the app. Also, I want to abstract GCP away from the client. I would prefer to authenticate a user based on their login credentials and then they will be given access to their GCP project (via my front-end) accordingly.
I thought about perhaps having separate service keys for each client and then storing the service key info in Firebase, while using the respective keys for API calls but not sure this is best practice. It is however the only strategy I can think of.
If anyone could provide some help or guidance it would be very much appreciated. This is my first GCP project and have not been able to find any answers on GCP, SO, Google Groups, Slack or Medium.
Thanks,
TJ
First if all, welcome on GCP! It's an awesome platform, very powerful and flexible. But not magic.
Indeed, the use case that you describe is specific to your business logic. GCP provides told for securing access for user and VM(through service account) but not for customer. Here you have to implement your own custom and authorisation logic, with a database (I don't recommend bigquery for website, the latency is too high) to list three users, the companies where they work, the blobs of each company...
Nothing is magic and your use case specific.
If you want to discuss more about which component to use and to start, no problem. Let a comment.

Swift Realm Database Storage + URL AND the Register/ Login functionality

I understand Realm is a Database Storage like CoreData. But I'm quite lost. After going through the documentation, I can't locate the tutorial for creating a login/register access to build for users. For instance, on Firebase, it gives you the tutorials for that, then provides you URL and other bits. Would I have to connect Realm with a cloud storage (like CloudKit) if I didn't want the database to exist on my computer?
I would plead for some sample codes to help me understand as I really want to use Realm.
I'm intent on building a social networking / messaging app.
Realm is a mobile database which persists data locally.
Would I have to connect Realm with a cloud storage […] if i didn't want the database to exist on my computer?"
So what you're asking for concretely is not exactly possible: the database will exist on the computer / mobile device all the time.
Beyond that you're responsible yourself for synchronizing your persistency layer with a backend service of your own choice. Realm doesn't offer yet any builtin mechanism for that.
On the addons page of our website, you will find in the section Connectors some components, which might help you with using a backend service.

IBM Bluemix Mobile Data Services, Loading data into the cloud

I want to create an android application, I want my application data to be persistent. There is a file that I want to save every time to the Bluemix server.
I want to confirm the following, for a situation in which a user "A" from my application saves the data to the IBM Bluemix Server, and if there are more than 2000 users saving the same user-related file in the server:
Will there be any differences between all the different user files?
Will there be any collisions?
Will I be able to differentiate the
files of other users?
Will I be able to save and retrieve the saved
file of only that particular user?
Thank you.
Using the Mobile Client Access (MCA) service you will be able to do exactly what you ask.
MCA can provide you with a unique identifier for each authenticated Facebook, Google+, or custom style user, enabling you to manage your data appropriately. I recommend the Cloudant NoSQL DB service for fast and easy database management.
See the MCA docs and Android sample for further information.

Corona Mobile App Storage Solutions

I am currently developing a mobile app using the Corona SDK and Lua. I need to store information about each user and load the information for the current user when they load the app. What is the best method to store this information for each user, and how would I get this data on app load. I was thinking about using sqlLite and having a single row for each user. However when the user re loads the app I would have no way of accessing the data for the current user because when the app loads I would need something to index the database. Is there any way I can get some information from the mobile device on app load to index the database? Any ideas or suggestions?
I'm not clear on where the database is stored.
If it's remote on a server just use the device ID
system.getInfo( "deviceID")
If it's local and you have multiple local users then use a login.
You could use a registration process for either instance and store
The registration keys for automatic access when launching the app.
take a look at amazon's services.
like S3,simpleDB, dynamoDB..
Some implementations are already available in Code Exchange
http://developer.anscamobile.com/code/amazon-simpledb-api
http://developer.anscamobile.com/code/amazon-s3-rest-api-implementation-corona

Facebook app custom data database

Does facebook provide a way to store custom data for an app? I think of a user related store just like the users folder in operating systems. Performance should not be an issue as I can hold the data in memcache over a session but leave the persistent data at facebook so I don't have to store userdata on my servers.
There's no storage available on Facebook's server for your app to use. See http://www.facebook.com/help/?faq=100552270038780

Resources