irods / contrib

A pooled collection of community-contributed code that works alongside iRODS
BSD 3-Clause "New" or "Revised" License
13 stars 19 forks source link

Encryption micro-service #10

Closed rwmoore closed 8 years ago

rwmoore commented 8 years ago

Given an encryption key and a choice of encryption algorithm, a micro-service is needed to apply the encryption algorithm to a specified file, and update the file size.

jasoncoposky commented 8 years ago

@rwmoore Is it safe to assume the file will always fit in memory?

rwmoore commented 8 years ago

What is the current size limit for a buffer? For now, I am willing to assume the file fits in the buffer. If necessary I can do partial I/O, fill the buffer multiple times, and encrypt each buffer separately. I would then write to a new file.

jasoncoposky commented 8 years ago

my understanding is that this microservice will encrypt a file at rest on a UNIX file system given a fully qualified physical path, a pass phrase and an algorithm. the way you phrased your last reply it sounds like you expect the microservice to return an encrypted buffer given a buffer?

we also can not update the size until all replicas are encrypted, which implies that the update to the size of the data object need be called from the rule after all replicas are encrypted.

rwmoore commented 8 years ago

The goal is to encrypt a single file at a time. The file is on a Unix file system in an iRODS vault.

It sounds like your approach is:

This is fine.

Reagan

jasoncoposky commented 8 years ago

The microservice will encrypt the file and write it to a new physical path which will be provided to the calling rule as an out-variable, allowing the rule to decide how to proceed.