navapbc / template-infra

A template to set up foundational infrastructure for your application in AWS
Apache License 2.0
9 stars 2 forks source link

Extend ECS Exec support for a secure production jump host #595

Open rocketnova opened 2 months ago

rocketnova commented 2 months ago

594 adds the AWS plumbing for enabling ECS Exec. It also supports enabling ECS Exec for application containers. This is useful for debugging in lower environments, but very risky in production (it may also be risky in lower environments if people put real PII or real money in lower environments).

A more secure approach would be to set up a separate ECS container specifically for connecting to other resources, such as an application database.

See:

rocketnova commented 2 months ago

@tevert @coilysiren It sounds like what would be most useful would be something more isolated than the current implementation in #594. I think this would require these new resources/config (separate from the application):

What IAM resources would we need for this? Especially for per-user audit trail?

rocketnova commented 2 months ago

Also, are there any other resources, besides the database, that are currently included with the platform infrastructure template that you would want to use the jump host to access?

coilysiren commented 2 months ago

Also, are there any other resources, besides the database, that are currently included with the platform infrastructure template that you would want to use the jump host to access?

No, but, I would be using ecs exec to try and debug networking issues with other aspects of our project. For example, we have a peering connection to another team's production database, and this functionality would have been useful to help debug that.