Forked from glarrain/connect-heroku-app-to-postgres-rds-with-ssl.md
Created
October 25, 2017 09:59
-
-
Save martintsch/26601e90246a02ee0a7c62ab609712d6 to your computer and use it in GitHub Desktop.
Revisions
-
glarrain revised this gist
Jun 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads 'postgres://user:password@host/db_name?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem' ``` **do not forget to surround with quotes** References: -
glarrain revised this gist
Jun 9, 2016 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,12 +6,14 @@ wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads 2 - Add `config/rds-combined-ca-bundle.pem` to the repository and redeploy to Heroku. 3 - Update the `DATABASE_URL` env var: ``` 'postgres://user:password@host/db_name?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem' ``` *do not forget to surround with quotes* References: - http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html -
glarrain revised this gist
Jun 9, 2016 . 1 changed file with 11 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,16 @@ 1 - Download the RDS certificates (root plus region-specific intermediate ones) bundle: ```sh wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem ``` 2 - Add `config/rds-combined-ca-bundle.pem` to the repository and redeploy to Heroku. 3 - Append the following to the `DATABASE_URL` env var: ``` ?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem ``` References: -
glarrain revised this gist
Jun 9, 2016 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,6 @@ 3 - Update the `DATABASE_URL` env var by appending `?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem` References: - http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html - https://www.postgresql.org/docs/9.5/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION -
glarrain renamed this gist
Jun 9, 2016 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ 1 - Download the certificate with: `wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem` 2 - Add the certificate file to the repository and redeploy to Heroku. 3 - Update the `DATABASE_URL` env var by appending `?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem` References: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL -
jonyt revised this gist
Mar 9, 2015 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,10 @@ Download the certificate with: `wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem` Then connect with: `postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem` References: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL https://github.com/jeremyevans/sequel/issues/897 http://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT http://dba.stackexchange.com/questions/77811/how-to-connect-to-an-amazon-postgresql-database-using-ssl -
jonyt created this gist
Mar 9, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ Download the certificate with: `wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem` Then connect with: `postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem`