salt
salt copied to clipboard
Bug - S3FS fileserver backend is not working with AWS KMS
) User-Writes:
The S3FS fileserver backend is not working with AWS KMS. See below for state test run with error. Basically, you need to use sigv4 when S3 is encrypted with KMS keys.
1 ID: al-agent-rpm
2 Function: file.managed
3 Name: /tmp/al-agent-LATEST-1.x86_64.rpm
4 Result: None
5 Comment: The file /tmp/al-agent-LATEST-1.x86_64.rpm is set to be change d
6 Started: xxxxxxxxx
7 Duration: 1525.004 ms
8 Changes:
9 ----------
10 diff:
11 ---
12 +++
13 @@ -1,2 +1,2 @@
14 <?xml version="1.0" encoding="UTF-8"?>
15 -<Error><Code>InvalidArgument</Code><Message>Requests spec ifying Server Side Encryption with AWS KMS managed keys require AWS Signatur e Version 4.</Message><ArgumentName>Authorization</ArgumentName><ArgumentVal ue>null</ArgumentValue><RequestId>xxxxxxxxx</RequestId><HostId>xxxxxxxxx xxxxxxxxx/xxxxxxxxx/xxxxxxxxx</HostId></Error>+ <Error><Code>InvalidArgument</Code><Message>Requests specifying Server Side Encryption with AWS KMS managed keys require AWS Signature Version 4.</Messa ge><ArgumentName>Authorization</ArgumentName><ArgumentValue>null</ArgumentVa lue><RequestId>xxxxxxxxx</RequestId><HostId>xxxxxxxxx+ xxxxxxxxx++wLqng/xxxxxxxxx+xxxxxxxxx</HostId></Error>
ZD-356
#) User-Writes:
PR-25420 has not fully resolved this issue:
2015-07-26 10:05:10,782 [salt.utils.s3 ][DEBUG ][23713] S3 Request: https://xxxesalt.s3.amazonaws.com/?
2015-07-26 10:05:10,782 [salt.utils.s3 ][DEBUG ][23713] S3 Headers::
2015-07-26 10:05:10,783 [salt.utils.s3 ][DEBUG ][23713] Authorization: AWS4-HMAC-SHA256 Credential=oeuaoeu/20150726/us-east-1/s3/aws4_requ
est, SignedHeaders=host;x-amz-date, Signature=aoeuaoeuaeu
2015-07-26 10:05:10,784 [requests.packages.urllib3.connectionpool][INFO ][23713] Starting new HTTPS connection (1): xxxesalt.s3.amazonaws.com
2015-07-26 10:05:10,821 [requests.packages.urllib3.connectionpool][DEBUG ][23713] "GET / HTTP/1.1" 403 None
2015-07-26 10:05:10,822 [salt.utils.s3 ][DEBUG ][23713] S3 Response Status Code: 403
2015-07-26 10:05:10,823 [salt.loaded.int.fileserver.s3fs][WARNING ][23713] 'The AWS Access Key Id you provided does not exist in our records.' response for buck
et ‘xxxesalt'
2015-07-26 10:05:10,823 [salt.loaded.int.fileserver.s3fs][DEBUG ][23713] Writing buckets cache file
2015-07-26 10:05:10,824 [salt.master ][INFO ][23709] AES payload received with command _file_envs
2015-07-26 10:05:10,825 [salt.master ][INFO ][23712] AES payload received with command _file_list
2015-07-26 10:05:10,836 [salt.loaded.int.fileserver.s3fs][DEBUG ][23712] Reading buckets cache file
We know the credentials are correct, because we can copy a file down from the exact same S3 bucket using the CLI on the Salt Master:
F1:saltmaster:saltmaster:~ # aws s3 cp s3://xxxesalt/base/alert-logic/al-agent-LATEST-1.x86_64.rpm .
download: s3://xxxesalt/base/alert-logic/al-agent-LATEST-1.x86_64.rpm to ./al-agent-LATEST-1.x86_64.rpm
@rickh563 Can you let the cust know about the above PR?
@meggiebot -- Done.