Latest Public Notebooks
Get enlightened on Docker!
Save some bucks on the CLOUD with these tricks! Sweet
Articles related to Kubernetes and its ecosystem tools and utilities!
I share mostly AWS Cli tools and OpenSource Projects to make your day2day task easier & make you truly efficient! Support my work by sharing my stuff for wider reach! For more cool stuff, follow me on LinkedIn!
Postgres SSL settings
HighlightsRequiring an SSL connection to a PostgreSQL DB instance You can require that connections to your PostgreSQL DB instance use SSL by using the rds.force_ssl parameter. By default, the rds.force_ssl parameter is set to 0 (off). You can set the rds.force_ssl parameter to 1 (on) to require SSL for connections to your DB instance. Updating the rds.force_ssl parameter also sets the PostgreSQL ssl parameter to 1 (on) and modifies your DB instance's pg_hba.conf file to support the new SSL configuration. You can set the rds.force_ssl parameter value by updating the parameter group for your DB instance. If the parameter group for your DB instance isn't the default one, and the ssl parameter is already set to 1 when you set rds.force_ssl to 1, you don't need to reboot your DB instance. Otherwise, you must reboot your DB instance for the change to take effect. For more information on parameter groups, see Working with DB parameter groups.
Postgres related notes
Terraforming RDS — Part 3
If you were administering your own PostgreSQL instance, you would set these values in various ways:
- In the server configuration file, postgresql.conf
- On the command line when starting the server
- In the database directly, using SQL to set values
Using AWS RDS, you don’t have access to the configuration file or the server startup command so AWS provides the “parameter group” resource to configure your RDS instance on startup.
Highlightsdynamic and static parameters Notice the “Apply type” column in the screenshot above. If the value in this column is “dynamic” then the value can be set or updated while the server is running. If it is “static” then the server must be restarted for the parameter to take effect. Since a parameter group is a separate resource from the RDS instance, you can update a static parameter value in the parameter group without restarting the server; AWS will store the change to be applied later.
So which TLS version is a good one?
HighlightsNote that all OpenSSL versions that support TLS 1.1 also support TLS 1.2, so setting the minimum version to TLS 1.2 instead of TLS 1.1 would have no practical drawback for users of OpenSSL, as far as I can tell. There are PostgreSQL clients that don’t use OpenSSL, such as the JDBC driver, but it seems unlikely that the version of the Java stack you use would not support at least TLS 1.2 at this point. It is probably too early to require TLS 1.3. The protocol itself and the required OpenSSL release are only about a year old, and so you probably won’t find them in most operating installations that are currently in use.
Infrastructure security in Amazon RDS
HighlightsAs a managed service, Amazon RDS is protected by the AWS global network security procedures that are described in the Amazon Web Services: Overview of security processes whitepaper. You use AWS published API calls to access Amazon RDS through the network. Clients must support Transport Layer Security (TLS) 1.0. We recommend TLS 1.2 or later. Clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes. Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the AWS Security Token Service (AWS STS) to generate temporary security credentials to sign requests.