Closed daydr3am3r closed 3 years ago
Thanks for creating this issue @daydr3am3r - I am fixing this with a patch release in both this repository (for the KF 9 Universal Orchestrator) and will get a patch out for the original Windows Orchestrator repo (versions < 2 of this project) now found @ https://github.com/Keyfactor/pem-pkcs12-remote-windowsorchestrator
It looks like there’s a logic bug in the PEM SSH orchestrator:
I noticed that on https://github.com/Keyfactor/pem-pkcs12-remote-orchestrator/blob/main/PEMStoreSSH/RemoteHandlers/SSHHandler.cs line 192, sudo is hard coded to be disabled when the orchestrator tries to create the certificate files.
However, this means that the user performing the sudo commands might not be able to create the file as it doesn’t have access to that path:
An idea (not necessarily the best one) if we want to maintain the original owner is to store the acting user in a variable and modify the permissions after file creation, or create the file using another function or command which allows specifying the user.