Is it possible to auto rotate S3 secret key?
Is it possible to auto rotate S3 secret key?
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.
Re: Is it possible to auto rotate S3 secret key?
Hello,
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.
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.
Re: Is it possible to auto rotate S3 secret key?
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.
Thank you for the quick reply.
An example script would be very helpful.
Thanks again.
Re: Is it possible to auto rotate S3 secret key?
Here it is. You can put it in each profile via Job->PascalScript, or globally for all profiles via the Program Settings dialog, tab sheet Advanced.
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;