Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup AWS VPN for database access #28

Closed
8 tasks done
patheard opened this issue Apr 14, 2022 · 26 comments
Closed
8 tasks done

Setup AWS VPN for database access #28

patheard opened this issue Apr 14, 2022 · 26 comments

Comments

@patheard
Copy link
Member

patheard commented Apr 14, 2022

Description

As a developer,
I want a secure way to access the Notify database instance locally,
so that I can troubleshoot issues Notify data without worrying about unauthorized access to the data.

Acceptance Criteria** (Definition of done)

QA Steps

  • Connect to the Staging and Production VPN using your credentials.
  • Test that you can access the database while connected to the VPN.
  • Test that you can access Redis while connected to the VPN.
  • Check that the jumpbox pods are no longer deployed to Kubernetes.

Additional context

We currently have hasura to audit the manually executed SQL statements in production by developers but it's limited in some ways:

  • Admin shared account: there is no way to exactly identify who executed what, i.e. we only have the what.
  • There are times when we need to bypass hasura as the tool is limited. For example, to download the notifications table in its entirety (or dump the whole database to debug locally) is difficult with Hasura.

Hence this card would increase the overall security on how we access the database.

@jimleroyer
Copy link
Member

Hey team! Please add your planning poker estimate with ZenHub @patheard @sastels

@sastels
Copy link

sastels commented Apr 14, 2022

we might still want the jumpbox for non-db related things? @jimleroyer what else have we used it for?

@patheard
Copy link
Member Author

I've also used it for Redis access, but that could be setup with the VPN as well.

@jimleroyer
Copy link
Member

VPN is installed from within the network, but restrict the access? We need to allow extra usage, unlike the jumpbox? Just wondering. (if we can still access Redis, that would certainly be helpful!)

@patheard
Copy link
Member Author

Yup, the way you set up the VPN is to grant it access to specific security groups, so in the case of Redis, we'd just need to allow the VPN traffic access to the EKS cluster security group:
https://github.com/cds-snc/notification-terraform/blob/main/aws/elasticache/elasticache.tf#L24-L26

@yaelberger-commits
Copy link
Collaborator

Please add your planning poker estimate with ZenHub @jzbahrai

@jimleroyer jimleroyer transferred this issue from cds-snc/notification-planning Mar 21, 2023
@jimleroyer jimleroyer assigned patheard and unassigned jimleroyer Dec 4, 2023
@ben851 ben851 self-assigned this Jan 9, 2024
@ben851
Copy link
Contributor

ben851 commented Jan 9, 2024

I was testing this yesterday when I discovered costing issues in Dev. I will resume testing today to ensure nothing is broken when this moves to staging.

@ben851
Copy link
Contributor

ben851 commented Jan 10, 2024

PR was approved, but I didn't merge at EOD. I will merge today.

@ben851
Copy link
Contributor

ben851 commented Jan 10, 2024

Note that the VPN adds $200/month in costing to each AWS account.

@ben851
Copy link
Contributor

ben851 commented Jan 10, 2024

Merged to staging. Need to test.

@ben851
Copy link
Contributor

ben851 commented Jan 11, 2024

Running into some DNS issues in dev. Debugging

@ben851
Copy link
Contributor

ben851 commented Jan 30, 2024

Will take a look at the DNS issues today.

I've been working on the internal DNS (unrelated) and have put a PR here
cds-snc/notification-terraform#1133

@ben851
Copy link
Contributor

ben851 commented Jan 31, 2024

Did some more internal DNS refining yesterday. Switched nginx to an existing load balancer to better align with our releases.

@jimleroyer
Copy link
Member

Ben is planning to roll out the Helm changes into staging this week. The migration only includes the Hasura utility and its dependencies, hence this is a relatively safe and incremental migration.

@jimleroyer
Copy link
Member

Ben needs a review on this PR:
cds-snc/notification-manifests#2340

@ben851
Copy link
Contributor

ben851 commented Feb 12, 2024

Created two PRs for blazer. Will get reviewed today

@ben851
Copy link
Contributor

ben851 commented Feb 12, 2024

Refactored DNS to comply with Google OAuth requirements
Blazer working in dev! Waiting on PR for staging

@ben851
Copy link
Contributor

ben851 commented Feb 13, 2024

Blazer working in staging. Will put in a PR to move this to prod.

@ben851
Copy link
Contributor

ben851 commented Feb 13, 2024

Workflows added in prod, will test with next release.

@jimleroyer
Copy link
Member

There is a PR for jump box but it wasn't approved yet. We will bring documentation, a script in the attic, to bring up an jump box instance on demand if we ever need to.

@ben851
Copy link
Contributor

ben851 commented Mar 28, 2024

Added documentation and debug pod script to notification-attic
https://github.com/cds-snc/notification-attic/pull/62

@jimleroyer
Copy link
Member

We just need to remove the jump box to get this card in qa.

@ben851
Copy link
Contributor

ben851 commented Apr 3, 2024

@ben851
Copy link
Contributor

ben851 commented Apr 4, 2024

Merged, jump box manually removed in staging and prod

@ben851
Copy link
Contributor

ben851 commented Apr 9, 2024

@P0NDER0SA to QA

@P0NDER0SA
Copy link

QA nearly complete. All steps worked except for the fact that there is still a hasura pod.

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

No branches or pull requests

6 participants