ocicrypt icon indicating copy to clipboard operation
ocicrypt copied to clipboard

run ocicrypt keyprovider outside of container (or at least as the running user) on encrypt/decrypt

Open Dsolnik opened this issue 2 years ago • 1 comments

Hello!

When using ocicrypt, I believe at least, the key provider is executed inside of the container as root so $USER is root. Is there a way to disable this and run as the user making the request?

Thanks

Dsolnik avatar Mar 16 '23 22:03 Dsolnik

To reproduce this, make https://github.com/lumjjb/simple-ocicrypt-keyprovider print out the current user:

   currentUser, err := user.Current()
   if err != nil {
      log.Fatalf(err.Error())
   }
   username := currentUser.Username

   fmt.Printf("Username is: %s\n", username)

Dsolnik avatar Mar 17 '23 19:03 Dsolnik