Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to assign AWS credentials to SYSTEM user?

I have a Powershell script that uploads audit logs to an S3 repository. The script works fine when I run it while logged in but I need to define a scheduled task and the task needs to be run as SYSTEM user. Can someone recommend a way that I can provide the SYSTEM user with the AWS credentials so that they are not stored on the machine in clear text?

like image 405
rnolen Avatar asked Sep 16 '15 16:09

rnolen


2 Answers

I just found what I think is the answer: if I run the script thru the task scheduler once with the 'Set-AWSCredentials' command it creates the encrypted key info in C:\Windows\System32\config\systemprofile\AppData\Local\AWSToolkit\RegisteredAccounts.json. Then I was able to remove the 'Set-AWSCredentials' command and the script seems to run successfully.

like image 154
rnolen Avatar answered Oct 27 '22 11:10

rnolen


I don't believe this is possible. Your authentication info will have to be stored in the clear on the client machine one way or another, and windows doesn't provide any convenient methods for protecting that information.

You might find it more convenient to manage access if you use ssh + encryption certificates as credentials (i believe there's an ssh client for powershell, though i haven't tried using it for aws work)

like image 28
blueberryfields Avatar answered Oct 27 '22 11:10

blueberryfields