Is it possible to create my own users database for a google app engine app, so that it's not required for someone to have a google/openId account when he registers ?
Yes, but you will need to write all utility methods for providing proper authentication for your users. Rather than do this, I would recommending looking into the authentication services that Firebase can provide (Google acquired Firebase in 2014). At the moment, it seems Firebase will become integrated into many Google Cloud Services.
Related
I'm looking for some advice about how to execute a authentication implementation on my web application with some specific requirements.
The web application consists of a angular frontend and a spring-boot backend. All of this is hosted on Google Appengine and I’m using Google Cloud Datastore for the database.
I want to implement some kind of authentication system now where the user uses email and password to log in. The users should only be able to create accounts if I have allowed that email to register. What would be the best way to implement a system that achieves this?
I’ve been looking at Firebase for the authentication part and that looks good but how do I integrate this with spring boot to limit access to the site depending on if the user is logged in or not?
Another question is about the create user requirement. Would a good solution to this be to store emails that are allowed to register in my database, and then check every time someone wants to register if their email is in there before using Firebase to create that user?
I'm not very experienced with authentication implementations so any advice is appreciated.
I think that Spring Security + Stormpath its a good choice. Here is one nice tutorial: https://scotch.io/tutorials/build-a-spring-boot-app-with-user-authentication
And about the registration permission for enabled emails you should really store on DB to have control over it, I dont see any problem with that.
I am planning to develop an Android app that will make HTTP request to a REST API (server app) that is hosted on Google App Engine. The data retrieve would be common and visible to all users of the app, so authentication at a user level doesn't not seem necessary. My concern is this, is it necessary for the server app to authenticate that the request is indeed from the intended Android app? If so, is this done internally by the libraries or do I need to implement it myself? Some reading materials on this topic would be very much helpful.
Going through the Google documentations have indicated that the use of a Service Account would seem appropriate, but it bothers me that I would then need to package the credentials along with the Android app, which some how seems to defeat the purpose of authenticating the request, since it's is relatively easy to retrieve the credentials from an apk.
Any guidance in terms of design would be greatly appreciated.
It seems that API Keys is the answer. API Keys can be selected to be limited to a certain Android App during creation.
Reference: https://cloud.google.com/endpoints/docs/frameworks/java/restricting-api-access-with-api-keys-frameworks
I want to connect to the Google Cloud SQL from my android app.
Is there a way to do this without the App Engine and Endpoints?
If this does not exist, please tell me the most painless way to solve this problem. I'm just in the future does not intend to use the App Engine, and therefore do not understand why waste time on it.
I have actually used Google Cloud SQL with App Engine + Endpoints (Java) so I can weigh in here a little.
You can create a helper class in App Engine and easily connect to Google Cloud SQL. Then, you can create endpoint methods that take in some parameters and inside the method access Cloud SQL and perform some operations securely.
This is highly advisable against interacting with your Cloud SQL database in the Android client app because that is a big security risk. If someone decompiles your app somehow, they now have full access to your database credentials.
If you have not a very large app you can use the above approach. But honestly, I would just the time to learn GAE Datastore and use that instead or Firebase. SQL can run into issues if your app gets big but maybe you aren't trying to build the next huge app so it will suffice. It all depends on you.
Hope that helps.
I know appengine datastore and what is cloud datastore, using cloud datastore is always an confusion for me, following are my questions:
does cloud datastore requires Compute Engine ?
(in google docs i saw like enable compute engine)
how to access cloud datastore from appengine application (this is very needed)
how to enable multiple application to access this common datastore ?
Note: I know how to activate it, but I didn't get clear answers for my questions above.
Your questions:
1) No, cloud datastore can also be user by other platforms
2) App engine has native support to use the (cloud) datastore. The cloud datastore is based on the App Engine datastore to make it available for others.
3) You can share the cloud datastore, but see this issue
Atlast, i can able to access from cloud datastore from appengine application, following are my answer,
Ans For Ques 1:
Cloud Datstore doesn't require compute engine instance.
Ans for Ques 2:
To access cloud datastore, you need either service account credentials or u must have access token for authenticated user with Scopes set to Datastore, and user email.
Use Google api Client library,or simply use ProtoBuf library provided in documentation.
Ans for Ques 3:
simply use create credentials from application u want to access and use it in other applications
https://developers.google.com/datastore/docs/getstarted/overview
Thanks!
I would like to try to use OpenSocial (or any other API) for my small project. What I want to create is a small console application that would gather some data from several sites (e.g., Facebook, LinkedIn, Xing, MySpace...) and calculate some things. What I've noticed in all tutorials is that OpenSocial is used for mobile applications, apps inside social networks etc., but I haven't seen it anywhere to be used for a console application. Is that possible? Can I create a simple Java console application which would gather and process data from social networks? Do you know some tutorial that could help me out with it? The biggest problem that I have is the authentication, since (if I understood well) all APIs request to forward the user to the original (e.g., LinkedIn) site to login so to grant permission to use the data for the application. But can I somehow login with my credentials using a console application?
Thanks,
Ivan
Yes, you can access the various data APIs from a stand alone Java application. The standard/protocol you're looking for is OAuth, not OpenSocial.
You will have to give your users some way to grant access to their social network account. (web based applications would redirect them to the social network site, which would in turn redirect them back to the application). OAuth has an out-of-band (OOB) mode especially for non-web based consumers.
I've used Scribe in the past to access the LinkedIn API.