Security (Authentication) in oData services - android

My Database is located at SQLAzure and i am trying to use oData to get records. I have used oData4j java library as i am developing android application. Everything is working fine.
I am able retrieve data from SQLAzure using oData4j library but the problem is ...
If someone gets my SVC file URL, so they can easily get my database and play with it. so i want to put authentication so that only authorized person can retrieve data and work with it.
How can i achieve this. I have not created oData PRoducer or SVC file. All this thing is done by SQLAzure.
thnks

There's a series of blog posts about OData services and authentication: http://blogs.msdn.com/b/astoriateam/archive/tags/authentication/

Did you look at the ACS access keys? I haven't personally used them, but this is meant to provide a form of federated identity so that you can manage who can consume the oData service. ACS is a service provided by the Azure platform.
Since you can map each ACS to a specific database user, you have complete freedom to ensure only authorized people can access you data.

Take a look at the following post. This has pointers to odata and authentication related blog posts from Astoria Team:
http://kashyapas.com/2011/05/odata-and-authetication/
That should give you pointers

The sample application for Windows Azure Toolkit for Android might help.
How to: Use the Sample Android Application in the Windows Azure Toolkit for Android
https://github.com/WindowsAzure-Toolkits/wa-toolkit-android

Related

Is spring boot required with Firebase for Android?

I'm really sorry if this is not the right place to ask such question, please refer me where I can ask if this is not.
I'm developing an Android application and using Firebase as backend to store data. I'm new to both Firebase and Springboot. I've been told to learn to create some basic APIs in SpringBoot but I have been question why I would need to.
From what I got to know, Firebase already provides an API for querying data that I might need to transfer. What is the use of SpringBoot? I've read it provides "easy-deployable" application and handles Unit and Integration Testing.
If I use SpringBoot on top of Firebase, isn't it redundant? Are there additional advantages that I'm missing?
SpringBoot is completely independent of Firebase.
Firebase is basically a service which is provided by Google so that the developer doesn't need to do server-side coding.
SpringBoot is a framework which is generally used for the development of the server-side application.
By using firebase you need to pay google for data storage and API usage stuff. If we compare using firebase & spring-boot application in terms of costing taking same amount of data storage, the amount you need to pay for firebase is a lot more. Though this amount is justified, as you don't need to write even a single line of code for server-end and all the server connections, data storage and security is maintained by firebase.
You can learn more about firebase on it's official website - https://firebase.google.com/
If you are starting, I would recommend you to learn and use SpringBoot rather than firebase. But if your application demands a real-time database, you must go for firebase to take care of that feature.
Here is an article for your reference Reasons Not To Use Firebase
Spring Boot is not required to use Firebase SDKs on Android. The Firebase SDKs operate completely independently of any backend you control.
If you want to provide Spring Boot backend for your Android app, that's completely up to you. Or whatever backend you want. The Firebase client SDKs don't care.

Connecting Android Application to MySQL Database hosted on AWS

Good day everyone,
I have developed an android application and I would like to store my business information on MySQL database. I have decided to use amazon services for this project however I'm very confused how to allow my application to establish a proper/secure connection with MySQL database in order to pull and push the information into it. I have read many articles/stack overflow posts and realized I have to deploy a REST api in order to provide a layer between the application and the actual database. However with AWS being very confusing, in my opinion, i'm super lost.
Could any of you gentle folks provided with the step-by-step guide what services to use, how to connect them together and deploy them in order to be able to use it in my android application. Or maybe an article describing the steps? I don't really need a detailed explanation just a nudge in the right direction and I will try to figure out the rest.
Thank you greatly.
First of all, connecting to MySQL directly from an Android application is not secure, since you need the MySQL database access credentials for the app to communicate with the database.
This is why people recommend using a REST API Layer in between the MySQL database which you can implement using API Gateway and Lambda. This can be secured using a strong authentication mechanism for the API and using SSL for encrypting the messages at Transit.
However, this is not the case if you plan to connect to AWS DynamoDB from Android App. You can enforce Fine-Grained Access Permission to DynamoDB tables and roles using IAM policies.
Few Tutorials that might help,
Serverless REST API in Minutes with Serverless Framework.
Querying RDS MySQL with NodeJS Lambda Function.
Using Mobile Hub (To Simplify Things).
User Authentication with Cognito UserPools.

Is it possible to use Amazon EC2 for Android syncing to cloud backend

I would like to provide syncing to cloud feature to an Android app.
I had read the tutorial at http://developer.android.com/training/cloudsync/index.html & http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html
The examples being shown is using Google App Engine as backend storage.
I was wondering, is it possible not to tie to Google App Engine platform? For instance, using Amazon EC2?
Yes it is possible but you have to do more work on hosting a web service in EC2. Then your Android app will connect to it like this Android example. To write data instead of reading, use HTTP POST or PUT instead of GET. You would also have to implement your own user authentication.
Sure you can. Here's the Amazon AWS SDK for Android:
http://aws.amazon.com/sdkforandroid/
Yes, you will lose a little of the ease and integration of GAE, but you will gain something in flexibility. The GAE features (e.g. user authentication) tie you into Google's Android, making it harder to support Amazon or BB Android. And GAE limits you to their transactional HTTP model of communication.

How to access app engine datastore by android app?

I have created app engine app (using Python)(devappdemo.appspot.com).
Now i want to create an android app for the same which should access the same datastore.
I googled it and i found that it can be done with CloudEndPoints but dont know from where to start how it can be done. Please suggest any tutorials or step by step instructions to do it.
Google Cloud Endpoints would be the easiest way at the moment to get started with it. Here is the overview and tutorial.
Cloud Endpoints will help you generate the Endpoint API (REST API) and it also helps to generate the Android client code, that you can easily integrate into your Android application.
If you already have exposed your Python application over Web Services, you could directly use that from your Android application.

Android application with syncadapter using REST client server communication and google oauth

I am planning to develope an android app, that syncs its data with a server over a syncadapter using a REST architecture. The question is, is it possible to use the google account to authenticate the user at the server? If it is possible, how? Do you have any code snippets for me?
-
Chris
Checkout this example by google:
http://developer.android.com/resources/samples/SampleSyncAdapter/index.html
And take a look at these docs
https://developers.google.com/accounts/docs/OAuth2

Categories

Resources