Expose Heroku Postgres database to an external app - heroku

I have an Heroku Postgres database that I want to share with certain external systems.
The docs says (link):
Heroku Postgres databases are designed to be used with a Heroku app.
However, except for private and shield tier databases, they are
accessible from anywhere and may be used from any application using
standard Postgres clients. For private databases, outside access can
be enabled using trusted IP ranges.
Current external systems can't use Postgres JDBC driver for some security constraints. How can I give them access to Postgres database it in a secure way?

All Heroku Postgres databases are public, with the exception of their private and shield tier databases which have additional network restrictions.
As long as you use a Postgres appropriate driver and require ssl on connections there is nothing preventing your external client from connecting to a Heroku Postgres instance.
One additional thing to consider is that fact that your Heroku Postgres instance may be moved to a new host during maintenance operations. You can stay abreast of any changes by polling the platform api.

Related

Need to connect to mongodb database present in a server

I am working in an organization and I am supposed to connect to a mongodb database in one of the servers. As of now I have robomongo installed in my local machine and with that I can open the database and do operations like make collections and stuff.
I don't have mongodb installed in my local machine
But now I am trying to do it through spring , so do I need to install mongodb in my local machine??
Note: the database has credentials like username and password
No, you don't need to install MongoDB locally. The programming framework (in your case, Spring) will include a suitable driver which is capable of connecting to the MongoDB server.

How can I allow an external application to connect directly to my Ruby on Rails-integrated PostgreSQL database?

I have one database, and several applications that need to use it (one Ruby on Rails app, with which the database is integrated by default, and a bunch of Minecraft servers running Java plugins). Right now, I am using my web application's REST api to access the database.
So: plugin -> api -> db -> api -> plugin
I am looking for a way for my plugins to access the database directly, without having to first go through the web application.
plugin -> db -> plugin
How can I allow an external application to access my database? How can I ensure that only certain applications are allowed to access the db? (Also: SHOULD I be doing this at all?)
Take a look into how ActiveRecord connects to the database, and you'll see that it simply uses the same way to connect to Postgres (a login connection string, or set of credentials, etc.), and that same method can be used by any other application.
Basically this means that if another application knows:
The URL or IP address where your DB is hosted
The username
The password
The port
... and there are no restrictions in place such as firewall rules that prevent access, then the application should be able to talk to the DB directly. ActiveRecord is basically just a software layer on top of the DB, but it doesn't "own" or "control" the database. Your Rails app is technically a client of the DB server.

Creating an android studio project to run queries on a google cloud sql server using jdbc driver

I have an cloud sql instance up and running and have made a link using a jdbc driver to the instance ip using android studio project. I can successfully run queries from an ip address that I insert manually into the google cloud sql settings and not any other network. This makes my app accessible only from certain ip addresses. Is there a way i can authenticate my google cloud sql to all ip addresses. I do not wish to use the google app engine if possible as I believe it will only complicate my application. My app works well enough is there an easy way to access my sql from any network having supplied my username and password in the code itself?
You can use the console to authorize 0.0.0.0, which will allow connections from any IP address. However, this is not necessarily a good solution. If you embed your database's username and password in your Android app, it can be found by someone else taking apart the apk. If they do that, they will then have complete access to your database. It is more complicated, but you should put some kind of server in front of your database, and have the user authenticate with that server/application, and only have that server communicate directly with your database.

Microsoft SQL Server on a VPS for hosting multiple client databases - Is this the right way to go?

Good morning,
I have found that many of my customers have MS Access already installed on their PCs. Although Access is very limited as a data store, I have found that it is great for deploying low-cost front-ends for entry level customers.
I want to start renting a VPS, so I can host customer databases using Microsoft SQL Server 2008, which they can access using a locally stored Access front-end. I do have a few questions though:
In order to access the remotely hosted databases, and use the security features, would the VPS need to be set up as a domain controller, using AD DS? If I am hosting multiple customer databases, this is not an option.
What I envisage is being able to set up a simple MS Access front end, to access a MS SQL Server database on my VPS. For security, I would want the database to use the Windows account on the client machine to authenticate, and also to provide basic data change tracking.
Is this possible? Or, will I need to set up a server for each client and have it configured as a domain controller, etc?
You can have many databases on the same server, so for each client you d not need to setup a separate domain controller. Only the connection strings will be different.
You can use SSL for establishing connection with the remote server to make the process more secure. You can also make a few web services to play with the data (CRUD operations), this would also make things more manageable.
take care :)

access heroku DB via odbc on mac osx?

we need to build a heroku app which stores data in a DB table.
we have proprietary software that needs to connect via ODBC to the DB.
what driver do we need?
It depends if you are using a Shared or Dedicated database as to whether this is possible.
via the Heroku Dev Center

Resources