Commit Graph

3645 Commits

Author SHA1 Message Date
Chris Kilding
bd8aa341f2 Also throw exception if client tries to RotateSecret on a soft-deleted secret 2019-04-18 16:47:15 +01:00
Chris Kilding
749f4f63e6 Allow soft deletion of secrets 2019-04-18 15:44:48 +01:00
Chris K
fc8cf2d872 Feature: AWS Secrets Manager delete-secret 2019-04-18 10:30:18 +01:00
Mike Grima
97408552a3
Merge pull request #2033 from r1b/feat/cognitoidp-add-update-identity-provider
[cognitoidp] feat: add update_identity_provider
2019-04-17 12:21:45 -07:00
Mike Grima
65525cb611
Merge pull request #2114 from cm-iwata/fix_lambda_publish_version
Fix lambda publish_version returns wrong status code
2019-04-17 11:14:03 -07:00
Mike Grima
5d955985b9
Merge pull request #2106 from andytumelty/iam-update-user
Add support for iam update_user
2019-04-17 11:13:14 -07:00
Mike Grima
51ef03b03b
Merge pull request #2133 from earlrob/add_keyid_to_kms_encrypt_and_decrypt
add KeyId value to kms.responses.encrypt and kms.responses.decrypt
2019-04-17 11:07:00 -07:00
Mike Grima
d8dbc6a49c
Merge pull request #2134 from ogckw/master
Fix #2129 EC2 tag should raise ClientError when resource is empty
2019-04-17 11:05:28 -07:00
Mike Grima
53f101774f
Merge pull request #2137 from devoto13/fix-missing-version-id
Fixed copy-object from unversioned bucket to versioned bucket
2019-04-17 11:04:15 -07:00
Mike Grima
c7dc09345a
Merge pull request #2143 from chriskilding/feature/secretsmanager-listsecrets
Feature: aws secretsmanager list-secrets
2019-04-17 11:03:19 -07:00
Mike Grima
7305630062
Merge pull request #2147 from olleolleolle/patch-1
README: Use SVG badges for readability
2019-04-17 10:57:13 -07:00
Mike Grima
41eb29cc6c
Merge pull request #2152 from danpalmer/patch-1
Security: CVE-2019-10906
2019-04-17 10:56:58 -07:00
Mike Grima
549f6d5d34
Merge pull request #2158 from santoshankr/master
[iam] create_policy_version: Fix version id calculation
2019-04-17 10:55:04 -07:00
Santosh Ananthakrishnan
4f1a1a9d1e [iam] create_policy_version: Fix version id calculation
When creating a new IAM policy version with create_policy_version,
we cannot use the length of the versions list to calculate VersionId.
Keep track of the next version id to use as a non-decreasing counter.

Fixes #2157
2019-04-16 20:15:57 +00:00
Dan Palmer
e28bcf20ea
Bump Jinja2 to >=2.10.1, addresses CVE-2019-10906
Given how moto is intended to be used, and how it uses Jinja2, [CVE-2019-10906](https://nvd.nist.gov/vuln/detail/CVE-2019-10906) is unlikely to affect many users, but we should use a secure version anyway just in case moto is being used in unforeseen ways.
2019-04-15 10:48:55 +01:00
Olle Jonsson
eff4cdfbee
README: Use SVG badges for readability 2019-04-07 13:34:26 +02:00
Chris K
7fcedcb783 Fix: Ensure the returned next_token is None (avoid client going round in a loop) 2019-04-05 15:59:38 +01:00
Chris K
2d6be24ffc Fix lint error 2019-04-05 13:54:11 +01:00
Chris K
89e4ab93ee Implement ListSecrets 2019-04-05 13:33:28 +01:00
Chris K
120874e408 Feature: AWS Secrets Manager list-secrets 2019-04-05 11:00:02 +01:00
Yaroslav Admin
b85d21b8fe Fixed copy-object from unversioned bucket to versioned bucket
The response of the copy-object operation was missing VersionId property
when source bucket is not versioned.
2019-04-02 15:30:01 +02:00
Steve Pulec
66dafc6679
Merge pull request #2130 from spulec/bugfix/network-interface-and-private-ip
Add private IP to every NetworkInterface
2019-04-01 15:17:36 -05:00
Steve Pulec
490d1f5330
Merge pull request #2128 from nadlerjessie/feature/ecs-outputs
Add get_cfn_attribute support for ECS Cluster and Service
2019-04-01 15:13:20 -05:00
hsuhans
6b7282f93c Fix #2129 EC2 tag should raise ClientError when resource is empty
Raise MissingParameterError exception in models/validate_resource_ids of ec2.

Add ec2 create tag with empty resource test case.
Add ec2 delete tag with empty resource test case.

Related: #2129

Reference
boto3 create_tags
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.create_tags

boto3 delete_tags
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.delete_tags

Amazon EC2 API Reference Actions CreateTags
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html

Amazon EC2 API Reference Actions DeleteTags
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteTags.html
2019-03-30 23:26:50 +08:00
Earl Robinson
dbdc8925e3 add KeyId value to kms.responses.encrypt and kms.responses.decrypt 2019-03-29 21:07:32 -04:00
Tomoya Iwata
52ad71879d modified test code for python2.7 2019-03-29 15:52:47 +09:00
Tomoya Iwata
7e28fa7bfe Merge branch 'master' into fix_lambda_publish_version 2019-03-29 09:52:47 +09:00
Mike Grima
62da0839ae
Merge pull request #2078 from kyledecot/kd-describe-clusters
Returns an empty list when the cluster does not exist
2019-03-28 16:23:17 -07:00
Nick Venenga
d181897ec9
Add proper failure response to describe_clusters 2019-03-28 14:50:48 -04:00
Kyle Decot
79e47fd98f
Returns an empty list when the cluster does not exist 2019-03-28 14:50:48 -04:00
Mike Grima
78d7d67751
Merge pull request #2127 from mikegrima/testfixes
Fixing broken tests #2126
2019-03-28 11:42:09 -07:00
Mike Grima
921b5a3227 Fixing broken tests #2126
- KMS
- S3
- CloudFormation (Thanks kgutwin!)
2019-03-28 10:09:03 -07:00
Hugo Lopes Tavares
7c62f4a75c Add test to CloudFormation and PrimaryPrivateIpAddress GetAtt
This test would raise an error before d4e39146b7
2019-03-27 16:28:18 -04:00
Hugo Lopes Tavares
d4e39146b7 Make sure every NetworkInterface has a private IP
AWS always assigns a primary IP address to Network Interfaces.
Using a test account (modified the IP):

    >>> import boto
    >>> vpc = boto.connect_vpc()
    >>> eni = vpc.create_network_interface(subnet_id)
    >>> eni.private_ip_addresses
    [PrivateIPAddress(10.1.2.3, primary=True)]
2019-03-27 16:27:10 -04:00
Jessie Nadler
497965fadc Return InstanceProfile arn instead of NotImplementedError for get_cfn_attribute 2019-03-26 14:36:31 -04:00
Jessie Nadler
8644b2ff1d Add get_cfn_attribute support for ECS Cluster and Service 2019-03-25 19:14:05 -04:00
Tomoya Iwata
11ff548d14 fix #2113
moto must return Http status code 201 when lambda publish_version has succeeded
2019-03-17 17:54:34 +09:00
Robert Jensen
9ed80f14e8 fix coverage, update IMPLEMENTATION_COVERAGE 2019-03-12 17:52:34 -04:00
Robert Jensen
c7d3e1f8b6 Merge remote-tracking branch 'upstream/master' into feat/cognitoidp-add-update-identity-provider 2019-03-12 17:37:07 -04:00
Andy Tumelty
d53626ad9a Add support for iam update_user
This covers both the NewPath and NewUserName parameters for update_user, but
without regex validation for these values.
2019-03-12 17:23:32 +00:00
Mike Grima
64152f4cda
Merge pull request #2073 from woohooyayaya/master
fix creation date in create key response to unix timestamp type
2019-03-11 15:58:19 -07:00
Mike Grima
6ecb840c61
Merge pull request #2100 from gilbsgilbs/non-versioned-bucket-consitency
[S3] Support null version ids for buckets with versioning disabled
2019-03-11 14:13:26 -07:00
Mike Grima
53b94606de
Merge pull request #2103 from mikegrima/config
Fixed validation bugs in put_configuration_recorder
2019-03-11 13:58:54 -07:00
Mike Grima
87a54b9d81
Merge pull request #2077 from markchalloner/mark-route53-upsert-type
Check record type when upserting.
2019-03-11 13:50:37 -07:00
Mike Grima
fe42309534
Merge pull request #2096 from tay-bird/fix-describe-volumes-response-with-no-tags
Fix describe volumes response with no tags
2019-03-11 13:44:15 -07:00
Mike Grima
6d67418c41 Fixed validation bugs in put_configuration_recorder 2019-03-11 13:25:36 -07:00
Gilbert Gilb's
dedb53371e [S3] Support null version ids for buckets with versioning disabled 2019-03-09 10:21:49 +01:00
Tay Frost
7b236c4ded bugfix ebs volume tag behaviour
This commit modifies the response format of the ec2 calls
`create_volume` and `describe_volumes`. Previously, these calls would
always include a `Tags` key in the response, even when a volume has no tags.
Now, the `Tags` key will not be included in the response if the volume
has no tags.

When an EBS volume has no tags, calls to the aws ec2 endpoints `create_volume`
and `describe_volumes` do not include the `Tags` key in the
`response.Volumes[]` object.

However, moto does include the `Tags` key in this case. This discrepancy
in behaviour can result in code passing a moto test but failing in
production.

Sample snippets that trigger this condition:

```
def create_volume_and_then_get_tags_from_response():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    keys = volume_response['Keys']
```

```
def create_volume_and_then_get_tags_from_describe_volumes():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    volume_describe_response = client.describe_volumes()
    keys = volume_describe_response['Volumes'][0]['Keys']
```

Both sample snippets will succeed in a moto test, but fail with a
`KeyError` when using the aws api.
2019-03-07 17:31:45 -05:00
Tay Frost
15b3ede3cc Add test for case where ebs volume has no tags.
This commit adds a test for a case where an EBS volume has no tags. When
an EBS volume has no tags, calls to the aws ec2 endpoints `create_volume`
and `describe_volumes` do not include the `Tags` key in the
`response.Volumes[]` object.

However, moto does include the `Tags` key in this case. This discrepancy
in behaviour can result in code passing a moto test but failing in
production.

Sample snippets that trigger this condition:

```
def create_volume_and_then_get_tags_from_response():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    keys = volume_response['Keys']
```

```
def create_volume_and_then_get_tags_from_describe_volumes():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    volume_describe_response = client.describe_volumes()
    keys = volume_describe_response['Volumes'][0]['Keys']
```

Both sample snippets will succeed in a moto test, but fail with a
`KeyError` when using the aws api.
2019-03-07 17:25:18 -05:00
Mike Grima
5a20755565
Merge pull request #2095 from mikegrima/configfix
Add Config mock to init
2019-03-07 13:19:34 -08:00