Skip to content

Add CoreConfig & Root/Intermediate Secrets #29

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Conversation

ingalls
Copy link
Member

@ingalls ingalls commented Apr 22, 2025

Context

Intent here (and I'm not stuck on this approach cc/ @chriselsen) is to provide a more durable location to store irreplaceable files (Root CA/Intermediate) in the same way the TAK Admin Cert is currently implemented thanks to @chriselsen

Secondarily this can also serve as a way to inject externally modified or provided config/certs into the core EFS/ECS tasks

@ingalls ingalls requested a deployment to staging April 22, 2025 01:13 Abandoned
@ingalls ingalls temporarily deployed to cotak-staging April 22, 2025 01:13 Inactive
@chriselsen
Copy link
Contributor

You could do the following:

  • Before line 26 download the CA + server cert from secrets manager to a temp location.
  • Compare for each of the downloaded files if they match to what is in the EFS filesystem
    • If a file matches or nothing was downloaded, nothing needs to be done.
    • If a file doesn't match, overwrite the EFS file with the downloaded file.
  • After line 39 upload the cert files into secrets manager. (Same way as lines 37 - 39).

@ingalls ingalls temporarily deployed to cotak-staging April 24, 2025 22:19 Inactive
@chriselsen
Copy link
Contributor

@ingalls FYI: I locked the write permissions to Secrets Manager down to a single key "/tak-admin-cert" from within the container.
You'll need to amend this list for the other keys.

@ingalls ingalls self-assigned this Apr 25, 2025
@ingalls ingalls added the enhancement New feature or request label Apr 25, 2025
@ingalls ingalls requested a deployment to cotak-staging April 27, 2025 14:15 Pending
@ingalls

This comment was marked as resolved.

@ingalls ingalls requested a deployment to cotak-staging May 1, 2025 15:40 Abandoned
@ingalls ingalls requested a deployment to cotak-staging May 1, 2025 16:32 Pending
@ingalls
Copy link
Member Author

ingalls commented May 1, 2025

May 01, 2025 at 16:03 (UTC-6:00)
	
ca.pem file already exists! Please delete it before trying again
	
api
May 01, 2025 at 16:03 (UTC-6:00)
	
ok - Root CA - Generating New Certificate
	
api
May 01, 2025 at 16:03 (UTC-6:00)
	
ok - Root CA - Checking for AWS Secrets Manager Secret
	
api
May 01, 2025 at 16:03 (UTC-6:00)
	
ok - Certbot - Restoring cronjob
	
api
May 01, 2025 at 16:03 (UTC-6:00)
	
ok - NodeJS - Version: v22.15.0
	
api
May 01, 2025 at 16:03 (UTC-6:00)
	
ok - TAK Server - New ECS Task starting...```

@ingalls ingalls requested a deployment to prod May 3, 2025 14:28 Abandoned
@ingalls ingalls temporarily deployed to cotak-staging May 3, 2025 14:36 Inactive
@ingalls ingalls requested a deployment to prod May 3, 2025 14:49 Abandoned
@ingalls
Copy link
Member Author

ingalls commented May 3, 2025

@chriselsen I removed CoreConfig from the secrets manager as the following 2 things will bite us:

Federation & COT Injectors can be modified via API but the backend store is the CoreConfig and not the database. As such if there is heavy use of either we will blow past our 100 version limit in the AWS SecretStore service.

This PR is getting long in the tooth so for now I've dropped CoreConfig and will re-evaluate where it should live. The S3 bucket for ECS config is an option? Or Maybe AWS System Manager Parameter Store?

@ingalls ingalls requested a deployment to cotak-staging May 3, 2025 15:08 Pending
@ingalls ingalls deployed to cotak-staging May 3, 2025 15:37 Active
@ingalls ingalls requested a deployment to cotak-staging June 3, 2025 20:40 Abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants