trendscenter / coinstac

Collaborative Informatics and Neuroimaging Suite Toolkit for Anonymous Computation
MIT License
47 stars 19 forks source link

S3 Bucket and AWS credentials for vault file upload to s3 #1358

Open dylanmartin opened 2 years ago

dylanmartin commented 2 years ago

Task Description

The coinstac api server needs to be able to pipe file uploads to S3. For this we'll need:

segomath commented 2 years ago

@dylanmartin I need some additional information. s3-bucket

praeducer commented 2 years ago

@segomath I'd like to own this task if you can provide me any policies I need to follow. Dylan and I are on a call now.

praeducer commented 2 years ago

I'd like to think of an alternate architecture then the one proposed. As Dylan works on this, I'll think through some more modern patterns we can start following. With the little I know so far, these services and patterns come to mind:

Dylan agrees this sounds like a better direction. In general, we need to get away from managing all of these servers and building software like modern cloud solutions don't exist. The kind of services above will save an enormous amount of developer time and be easier/more fun to use.

segomath commented 2 years ago

@praeducer Sure. We don't have TReNDS level IAM policies defined yet. As I mentioned in the chat, COINS team is mainly using AWS resources as of now. So most of the policies are customized for COINS team. You may want to define new policies for COINSTAC and add the users accordingly. You can refer COINS related resources for naming convention etc.

praeducer commented 2 years ago

ty!

praeducer commented 2 years ago

As we continue to containerize our services, we may also want to consider some pattern like this https://aws.amazon.com/blogs/containers/introducing-aws-step-functions-integration-with-amazon-eks/

praeducer commented 2 years ago

Currently writing a bucket policy for the COINSTAC API service (a Node package). It will allow this custom application service, which runs on a virtual machine, to talk to S3, a cloud-native web service.

It will be allowed to:

praeducer commented 2 years ago

Need to verify SSL encryption end-to-end.

praeducer commented 2 years ago

@segomath Do you know what regulations we need to follow in the cloud for COINSTAC? Trying to decide what data to encrypt and when to encrypt it.

praeducer commented 2 years ago

Server-side encryption is on for the S3 bucket vis S3-managed keys.

praeducer commented 2 years ago

Strongly consider using the key management service or the secrets manager instead of env variables on the VM.

praeducer commented 2 years ago

When complete, we want to do some kind of security audit. There is likely some kind of penetration testing we can do.

praeducer commented 2 years ago

Need to secure the results data from users too.

segomath commented 2 years ago

@segomath Do you know what regulations we need to follow in the cloud for COINSTAC? Trying to decide what data to encrypt and when to encrypt it.

@praeducer In case of S3, It is recommended to encrypt "Data at rest" if the data has PHI. It would be good to check the HIPAA compliance requirements while deciding on any design/changes.