execute GSC with encrypted data - error failed to decrypt metadata #1575
-
I am currently setting up two docker containers, following the examples of ra-tls-secret-prov:
I am mounting a volume which contains several encrypted files, that were previously encrypted with: Logs of the server secret provisioning:
Logs of the gsc sgx image: Anyway the important pieces of the logs are here below (I believe)
Already tried deleting the LOCK file because it can be deleted, its a leftover of the previous execution of the app outside sgx, Manifest for the GSC image:
Already tried clearing all the docker image caches with prune and rebuilding everything from scratch, Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Several notes Encrypted vs trusted vs allowed files are mutually exclusiveYou must not specify the same file/directory in more than one of In your manifest example, you have Similarly, you have e.g. Does your client really get the encryption key?I see that you specify Well, looking at your client log, it feels like yes, the client gets the correct encryption key. But please double-check. Encrypted files must not be intermingled with regular plaintext files
That's correct. You cannot have a plaintext file on your host Linux, and access it via Encrypted Files in Gramine. Gramine will detect that the file exists but is NOT encrypted, and will fail. TLDR: Encrypted files must either not exist (and the application creates them) or they must be truly encrypted. Encrypted files must have a correct filename
Encrypted Files crypto protocol in Gramine has a special feature: the file must have the same name as it was encrypted with This may be the root cause of your "failed to decrypt" error. |
Beta Was this translation helpful? Give feedback.
Yes. As long as the directory at which you mount your volume is specified as
fs.mounts = [ {type = "encrypted", ...} ]
, then Gramine transparently encrypts/decrypts all files under this directory, including newly created ones.Yes, Gramine allows to use different …