This is kind of a basic question. I am writing an Android app which gets the data from a database using a web service. I pass some parameters to the web service and it returns me the data in JSON/XML format. My question is should I pass database username and password as parameter to open a database connection or should I keep these credentials inside the web service? If I keep these credentials inside the service, anyone who knows the location of my web service and the parameters I am passing can access my database and get the data. If I request the caller to pass these credentials as parameters, is it safe to send this information over the internet while calling the web service from the mobile application.
I found this example about securing you data while calling a web service which explains very well that even if you are using https then still this is not safe to send the plain text.
Thanks