Skip to content

[harvester] Use dedicated security group for accessing Postgres#1709

Merged
jacobwinch merged 2 commits intomainfrom
jw-harvester-sg
Mar 4, 2026
Merged

[harvester] Use dedicated security group for accessing Postgres#1709
jacobwinch merged 2 commits intomainfrom
jw-harvester-sg

Conversation

@jacobwinch
Copy link
Contributor

@jacobwinch jacobwinch commented Feb 26, 2026

What does this change?

The Notifications VPC has a “default group”. Prior to this PR, harvester used this group to gain access to the RDS database (via the RDS proxy). This approach to networking does not follow the principle of least privilege, as any network interface in the VPC can implicitly reach the CODE and PROD databases.

In #1636 a new security group was created, with the intention of services joining it only if they need database access. This will ultimately allow us to remove the “default group”, thus improving our security posture by moving towards the principle of least privilege.

This PR updates harvester to use the new security group / approach1.

How has this change been tested?

  1. Deployed main to CODE
  2. Sent a test breaking news notification following these instructions (UUID - 2ae14eea-2123-49e0-8614-168898ca6c09)
  3. Deployed this branch to CODE
  4. Sent the same breaking news notification with a different UUID (b878e245-4787-4573-894c-3e6a33131391)
  5. Used this dashboard to confirm that the number of deliveries is the same for both notification tests

How can we measure success?

This is a step towards removing the "default group", which improves our security posture and allows us to standardise on a single approach following the changes made in #1636.

Have we considered potential risks?

If harvester cannot query the DB then this will prevent us from sending notifications (such as breaking news notifications) to users. I think the testing described above confirms that harvester can still query the DB as expected.

Footnotes

  1. Note that all of the above applies regardless of whether the application connects to the RDS instance directly or whether it goes via the RDS proxy, because the RDS instance and the RDS proxy share the same security group (created here).

@jacobwinch jacobwinch added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Feb 26, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

@jacobwinch jacobwinch marked this pull request as ready for review February 26, 2026 15:59
@jacobwinch jacobwinch requested a review from a team as a code owner February 26, 2026 15:59
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

@jacobwinch jacobwinch enabled auto-merge (squash) March 4, 2026 11:51
@jacobwinch jacobwinch merged commit 45a982d into main Mar 4, 2026
10 checks passed
@jacobwinch jacobwinch deleted the jw-harvester-sg branch March 4, 2026 11:54
@jacobwinch
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants