mercredi 25 février 2015

Provide SSL certificate to PostgreSQL in a Rails app

I have a Rails app using an Amazon RDS PostgreSQL instance.


I'd like pg to use SSL to connect to this DB.


Following http://ift.tt/1Bxw8jW[...], I saved rds-combined-ca-bundle.pem at /config/ca/rds.pem and my database.yml looks like this:



production:
adapter: postgresql
database: <%= ENV['DB_NAME'] %>
username: <%= ENV['DB_USERNAME'] %>
password: <%= ENV['DB_PASSWORD'] %>
host: <%= ENV['DB_ADDRESS'] %>
port: <%= ENV['DB_PORT'] %>
sslmode: 'verify-full'
sslrootcert: 'config/ca/rds.pem'


But I have no idea if it's really using SSL: I can change sslrootcert path to anything, and my app is still up. What am I missing?





Aucun commentaire:

Enregistrer un commentaire