![Image](https://www.syncovery.com/wp-content/uploads/2021/04/s3providers.jpg)
My company has a policy for secret key rotations every month.
Is it possible to configure Syncovery to fetch the secret key from a file?
Thanks in advance!
Dean.
Hi.tobias wrote: ↑Thu Nov 10, 2022 9:02 amHello,
yes, it can be read from a text file using a PascalScript, please see
https://www.syncovery.com/pascalscript/
I hope I can write an example tomorrow.
Code: Select all
const cTextFilePath='C:\code19\X.txt';
function OnGetProfilePathBeforeListing(const isRightSide:Boolean;
var Path,UserName,Password:UnicodeString;
var AuthKey,AuthKeyPassword:AnsiString;
var Port:Integer):Boolean;
var F:Opaque;
NewPass:UnicodeString;
begin
if Copy(Path,1,5)='S3://' then begin
F:=OpenTextFile(cTextFilePath);
if F<>0 then begin
NewPass:=ReadLine(F);
CloseFile(F);
if (NewPass<>'') and (NewPass<>Password) then begin
Password:=NewPass;
if isRightSide then
SetProfileProperty('RightPassword',NewPass)
else
SetProfileProperty('LeftPassword',NewPass);
SaveProfileSettings;
end;
end;
end;
Result:=true;
end;