Yes.  PostgreSQL allows for an SSL connection between the client and the
server.  This can be done with psycopg2, for example:

import psycopg2 as database
db = database.connect (host="db.host.com",
     sslmode="require",
     database="dbname",
     user="dbuser",
     password="dbpass")


On Sun, Aug 23, 2009 at 10:04 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:

>
> Then I do not understand what you mean by "secure connection". Is
> there a secure connection function provided by postgresql and psycopg2
> that web2py is not using and should be using?
>
> Massimo
>
> On Aug 23, 8:14 am, Don <sam...@gmail.com> wrote:
> > I do not have SSH access to the DB server.  Can I use psycopg2
> > directly to create the connection?
> >
> > On Aug 23, 8:59 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> >
> > > Yes but not this way.
> > > You have to open an ssh tunner outside web2py and then instruct web2py
> > > to connect to the database using the port used by the tunnel.
> >
> > > Massimo
> >
> > > On Aug 23, 7:47 am, Don <sam...@gmail.com> wrote:
> >
> > > > Is it possible to define a secure database connection?
> >
> > > > Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10,
> > > > secure=True)
> >
> > > > My production DB and web servers are running on a different machines.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to