keystone/keystone/tests
Colleen Murphy 35f09e2b7c Check timestamp of signed EC2 token request
EC2 token requests contain a signature that signs the entire request,
including the access timestamp. While the signature is checked, the
timestamp is not, and so these signed requests remain valid
indefinitely, leaving the token API vulnerable to replay attacks. This
change introduces a configurable TTL for signed token requests and
ensures that the timestamp is actually validated against it.

The check will work for either an AWS Signature v1/v2 'Timestamp'
parameter[1] or the AWS Signature v4 'X-Aws-Date' header or
parameter[2].

Although this technically adds a new feature and the default value of
the feature changes behavior, this change is required to protect
credential holders and therefore must be backported to all supported
branches.

[1] https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html
[2] https://docs.aws.amazon.com/general/latest/gr/sigv4-date-handling.html

Conflicts due to six removal in e2d83ae9:
	keystone/api/_shared/EC2_S3_Resource.py
	keystone/tests/unit/test_contrib_ec2_core.py

Conflicts due to flask reorg:
	keystone/api/_shared/EC2_S3_Resource.py

Change-Id: Idb10267338b4204b435df233c636046a1ce5711f
Closes-bug: #1872737
(cherry picked from commit ab89ea7490)
(cherry picked from commit 8d5becbe4b)
(cherry picked from commit e3f65d6fbc)
(cherry picked from commit 1ef3828516)
2020-05-04 15:47:41 -07:00
..
common Add application credential auth plugin 2018-01-27 12:00:19 +01:00
functional Update keystone functional tests 2018-04-18 21:04:59 +00:00
hacking Remove duplicated hacking rule 2017-06-28 07:48:03 +00:00
unit Check timestamp of signed EC2 token request 2020-05-04 15:47:41 -07:00
__init__.py Move existing tests to unit 2015-02-13 15:54:29 -06:00