Commit Graph

184 Commits

Author SHA1 Message Date
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
nom3ad
f50d80ede6
fix: invalid escape sequence DeprecationWarning (#4430) 2021-10-18 09:21:18 +00:00
Bert Blommers
e9a4100324
Rewrite deprecated CloudFormation tests (#3842) 2021-10-04 13:47:40 +00:00
Bert Blommers
95a1301ead
IAM - duplicate boto tests (#3913) 2021-09-22 19:42:42 +00:00
Bert Blommers
1a42b33781
IAM - Delete Role/InstanceProfile via CloudFormation (#3591) 2021-08-28 11:00:05 +01:00
Bert Blommers
6b960e0d4f
CF support for IAM:ManagedPolicy (#3933) 2021-08-28 07:32:10 +01:00
Bert Blommers
7acdfe4feb
Introduce Pylint to check for duplicate test method names (#3684) 2021-08-21 16:33:15 +01:00
Bert Blommers
7693d77333
Remove Py2 support (#3915) 2021-07-26 07:40:39 +01:00
Cristopher Pinzón
e4057a34b9
Added "isTruncated" attribute for listUsersResponse (#4017)
* isTruncated attribute for listUsersResponse

* correction and test
2021-06-18 21:52:15 +01:00
Jonx1000
6ea6445f60
IAM - get_user() #3828 (#3829)
* IAM - get_user() #3828
- fixing issue where the get_user method does not return tags

* adding get_user with tags test
2021-04-03 10:38:18 +01:00
Jon Michaelchuck
a4009e7bd1
MaxSessionDuration should be included in the list_roles response (#3750) 2021-03-10 08:49:50 +00:00
Jon Michaelchuck
0625bbfa11
Fixes for IAM Role Description field in responses from list_roles and create_roles (#3724)
* Add IAM Role Description field to list_roles responses

The IAM ListRoles IAM API call will return the Description key/value
for each role if it exists.  If it does not exist the Description
key is not included.

* fix handling in create_role resp

* blackg

* Combine two tests using pytest.mark.parametrize

* consistency
2021-02-24 19:14:11 +00:00
Bert Blommers
67c1dbc164
Changelog 2.0.0 (#3721)
* Changelog for upcoming release (..-27/01)

* Changelog for upcoming release (..-21-02)

* Update Implementation Coverage

* Update AWS Managed Policies
2021-02-23 15:16:07 +00:00
Anton Grübel
fe9f1dfe14
Add tag & untag user (#3638)
* Add iam.tag_user

* Add iam.untag_user

* Fix Python2 error
2021-02-01 11:37:54 +00:00
Bert Blommers
8591eda9d6
Introduce Github Actions to replace TravisCI (#3610) 2021-01-26 12:37:03 +00:00
Brian Pandola
8f83f51897
Refactor tests marked xfail to use proper assertions (#3515) 2020-12-04 16:00:48 +00:00
Brian Pandola
d58d3e2c2e
Fix: yield tests ignored by pytest runner (#3500)
Closes #3499
2020-11-25 10:48:05 +00:00
Steve Pulec
6107561717
Merge pull request #3451 from bpandola/fix-3450
Fix: Return `Tags` in iam:CreateUserResponse
2020-11-15 11:25:10 -06:00
Bert Blommers
273ca63d59 Linting 2020-11-11 15:55:37 +00:00
Matěj Cepl
5697ff87a8 Back to Black 2020-11-10 14:12:38 +01:00
Matěj Cepl
ea489bce6c Finish porting from nose to pytest. 2020-11-10 08:25:05 +01:00
Matěj Cepl
77dc60ea97 Port test suite from nose to pytest.
This just eliminates all errors on the tests collection. Elimination of
failures is left to the next commit.
2020-11-10 08:23:44 +01:00
Brian Pandola
b8e08539e3 Fix: Return Tags in iam:CreateUserResponse
Fixes #3450
2020-11-09 14:59:06 -08:00
waynemetcalfe
0a938f7bb4
issue-3379 iam list_roles: implement PathPrefix, MaxItems and Marker (#3380)
* issue-3379 iam list_roles: implement PathPrefix, MaxItems and Marker

* issue-3379 fix cloudformation test
2020-10-12 12:13:20 +01:00
ljakimczuk
a668349a70
Add set_default_policy_version to the IAM backend (#3347)
* Adding set_default_policy_version

* Adding tests and reformatting

* Reformatting tests
2020-10-01 10:24:03 +01:00
Macwan Nevil
427a222aa0
feature added: support for api RolePermissionsBoundary (#3329)
* feature added: support for api PutUserPermissionsBoundary; DeleteRolePermissionsBoundary

* minor test fix

* lint fixed

* refractored test case

* Issue 3224 s3 copy glacier object (#3318)

* 3224 Enhancement - S3 Copy restored glacier objects

- adds setter for expiry date
- copy sets expiry date to none when source is glacier object
- throws error for copying glacier object only if not restored/still restoring

* 3224 Enhancement - S3 Copy restored glacier objects

- throws error for copying deep archive object only if not restored/still restoring

* Fix:s3 List Object response:delimiter  (#3254)

* Fix:s3 List Object delimiter in response

* fixed tests

* fixed failed tests

Co-authored-by: usmankb <usman@krazybee.com>

* feature added: support for api PutUserPermissionsBoundary; DeleteRolePermissionsBoundary

* minor test fix

* lint fixed

* refractored test case

* added test case for put role exception

Co-authored-by: ruthbovell <63656505+ruthbovell@users.noreply.github.com>
Co-authored-by: usmangani1 <sgosman_chem@yahoo.com>
Co-authored-by: usmankb <usman@krazybee.com>
2020-09-22 12:43:59 +01:00
Nick Stocchero
fd69c93a09 use botocore regions and refactor sorting 2020-09-21 17:42:44 -06:00
Nick Stocchero
8d5c70a924 different aggregation strategy 2020-09-21 17:42:44 -06:00
Nick Stocchero
d8cea0213d straighten out filter logic 2020-09-21 17:42:44 -06:00
Nick Stocchero
8dd90db83c add missing test for policies 2020-09-21 17:42:44 -06:00
Nick Stocchero
ff84b63484 address PR comments 2020-09-21 17:42:44 -06:00
Nick Stocchero
7bc5b5c08f Add IAM Role and Policy to Config 2020-09-21 17:42:44 -06:00
jweite
49d92861c0
Iam cloudformation update, singificant cloudformation refactoring (#3218)
* IAM User Cloudformation Enhancements: update, delete, getatt.

* AWS::IAM::Policy Support

* Added unit tests for AWS:IAM:Policy for roles and groups.  Fixed bug related to groups.

* AWS:IAM:AccessKey CloudFormation support.

* Refactor of CloudFormation parsing.py methods to simplify and standardize how they call to the models.  Adjusted some models accordingly.

* Further model CloudFormation support changes to align with revised CloudFormation logic.  Mostly avoidance of getting resoure name from properties.

* Support for Kinesis Stream RetentionPeriodHours param.

* Kinesis Stream Cloudformation Tag Support.

* Added omitted 'region' param to boto3.client() calls in new tests.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-08-27 10:11:47 +01:00
usmangani1
1db42fb865
FIX : IAM - Added support for pathPrefix in list_users_function (#3180)
* FIX:IAM-Added support for pathPrefix in list_users_function

* removed changes for roles

* Added test for non decorator

* changed filter function

Co-authored-by: usmankb <usman@krazybee.com>
2020-07-27 15:32:41 +01:00
ngander64
069c159492
Always return 'HardExpiry' for account password policy. (#3117)
Co-authored-by: Nick B Gander <NGANDER@amfam.com>
2020-07-11 09:38:33 +01:00
Tomoya Kabe
849f16ff2d
Correct group inline policy rendering (#3069)
* Correct group inline policy rendering in iam:GetAccountAuthorizationDetails response

* Include user inline policy if exists

* Add tests for IAM inline policies

* Remove unnecessary print stmts
2020-06-14 09:23:52 +01:00
jweite
4303123312
Implemented IAM delete_instance_profile (#3020)
* Implemented IAM delete_instance_profile

* PR adjustment: positively verifying instance profile deletion in test case.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-05-27 18:22:06 +01:00
jweite
b7a1b666a8
Corrected bug in IAM delete_role() due to overloading of name 'role' … (#3019)
* Corrected bug in IAM delete_role() due to overloading of name 'role' in function

* PR-requested fixes: added region to tests boto client create, reformatted with black

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-05-27 17:00:28 +01:00
zscholl
1f1404352e use conditional TEST_SERVER_MODE for backend tests 2020-04-30 09:42:22 -05:00
zscholl
0423be259a remove backend logic & py27 incompatible timezone 2020-04-30 09:10:42 -05:00
zscholl
51e7002cbb add tests 2020-04-30 09:10:42 -05:00
Owen Farrell
142e237b0b Made UserName parameter optional for IAM access key functions 2020-01-27 12:12:21 -05:00
Asher Foa
c2e444a210 Update tests. 2019-12-20 10:54:33 -08:00
Asher Foa
1415a93596 Implement List user tags 2019-12-19 19:45:56 -08:00
Fabio Dias
743dd46399 black linting 2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5 ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
Fabio Dias
b83a750630 Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id 2019-12-16 19:56:11 -05:00
Barry Allwood
7c1cc01eb9 chore: add MaxSessionDuration to IAM Role
fix: Description field is optional on return of IAM Role
2019-11-24 18:19:09 +00:00
Steve Pulec
72da9e96c2 Lint. 2019-11-21 17:53:58 -05:00
Matt Conway
d9c8bdb2a0 Add the ssh_public_key methods that were missing from the IAM implementation 2019-11-18 09:02:32 -05:00