0

im currentl working on a project where i have a django app on Server A with its own Database "default" and this app comunicates in some instances with another databse "not-default" on Server B.

In the latest version of this Service the app retrieves "non-critical" Data from the "non-default" database via the .using("non-default") Queryset method. But now i face the challenge to also retrieve or update critical User data from this database.

So I#m now unsure how safe a Query to this "non-default" database is when performing it with the .using() method.

Now the Question:

Is the process of sending a Query via .using() Querymethod safe?

And how is it protected ?

Chgad
  • 820
  • 2
  • 7
  • 18
  • what do you mean by "how safe a Query to this "non-default" database", why you want to safe a query you should protect/encrypt data , try saving data in binary fields or some other encrypt way – Vaibhav Nov 23 '17 at 12:59
  • protect database password in setting file properly , store password in os.environment variable instead of hard-coded value – Vaibhav Nov 23 '17 at 13:02
  • @Vaibhav I want to know, in general, how the Query is (as u stated) encrypted on default by django. – Chgad Nov 23 '17 at 13:03
  • I edited my Question to claryfy what is unlcear. – Chgad Nov 23 '17 at 13:06
  • security is for connection / connector between database-server and Host-server, read this for more on connections https://docs.djangoproject.com/en/1.11/ref/databases/#connection-management – Vaibhav Nov 23 '17 at 13:11
  • Are you trying to encrypt the connection between the web server and database? If you're using PostgreSQL then this answer might be useful https://stackoverflow.com/questions/28228241/how-to-connect-to-a-remote-postgresql-database-with-python – AndrewS Nov 23 '17 at 13:34
  • @Andrew I'm firstly interessted in how the connection (as Vaibhav mentioned) is secured on default. – Chgad Nov 23 '17 at 13:37

0 Answers0