Commit Graph

102 Commits

Author SHA1 Message Date
usmangani1
14980371d7
FIX:Add secrets Manager Tag resource Funtionality (#3392)
* FIX:Add secrets Manager Tag resoruce Funtionality

* Fixed review comments

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-22 11:14:32 +01:00
Jon Michaelchuck
2391a4ab97
[SecretsManager] Handle missing secrets versions (#3349)
* SecretsManager - handle missing secrets versions

The get_secret_value method should raise ResourceNotFoundException
if a secret exists but the provided VersionId does not.

* Run black

* 2.x support

* black fix?

* secret is not a dict. Fix error msg output.
2020-10-05 12:22:54 +01:00
Roman Dmytrenko
c1a7f29c62
Fix issue with wrong parameter signed to secret_binary during secret rotation in Secrets Manager (#3348)
* fix issue with wrong parameter signed to secret_binary

* reformat test
2020-10-05 11:10:32 +01:00
Bert Blommers
369f6bbfc9 3302 - Make Secret ARN persistent 2020-09-28 14:51:30 +01:00
Ninh Khong
061c609a8f
Fix secretsmanager random password wrong length (#3213)
* Enhance function get_parameter by parameter name, version or labels

* Fix random password with exclude characters return wrong length
2020-08-03 13:42:42 +01:00
Chris Kilding
943ecb7ea7
Support --filters option in secretsmanager:ListSecrets (#3173)
* Feature: Support --filters opton in secretsmanager:ListSecrets

* Implement some of the secret filters

* Check listSecrets filters combine with an implicit AND operator

* Test all filter and multi-value filter and multi-word filter

* Fix matcher behavior, restructure code

* Implement remaining listSecrets filter cases

* Linter fixes

* Use contains-in-any-order assertions for test_list_secrets

* Linter fix again

* Attempt Python 2 fix for assert_items_equal

* Remove docstrings from test_list_secrets tests as they make the test reports weird

* Test and handle listSecrets filter with no values
2020-07-31 15:31:18 +01:00
Kristopher Chun
fbc5769b74
Fix: SecretsManager - Added missing pop() override to get_secret_name… (#3057)
* Fix: SecretsManager - Added missing pop() override to get_secret_name_from_arn (#3056)

* Added test case for delete_secret_force_with_arn (#3057)

* Fixed lint for test_delete_secret_force_with_arn (#3057)
2020-06-10 08:54:03 +01:00
usmangani1
2433d64fe2
Fix: SecretsManager Added VersionIdsToStages key in describe_secret function (#3029)
* Fix: SecretsManager Added VersionIdsToStages key in describe_secret function

* Added more assertions

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-05-29 12:31:41 +01:00
=
b63110be9e handle description in describe secret operation, add tests 2020-04-24 21:47:11 +02:00
Tim
92bbc3fbac Adds initial support for secretsmanager update_secret
The support in this patch is preliminary and may or may not be feature complete.
It provides the basic support for update_secret so that future work can build
on it as needed.
2020-04-16 08:20:43 -07:00
Mike Grima
7e68b93091
Merge pull request #2601 from mwaaas/fix/get_policy
adding get policy endpoint
2019-12-09 14:11:50 -08:00
mwas
625f28c882 adding get policy endpoint 2019-11-26 06:09:24 +03:00
mwas
0e825a5048 lint 2019-11-23 13:02:00 +03:00
mwas
9decb8674d adding tests for describe secret with arn 2019-11-23 10:18:06 +03:00
mwas
b31f31d214 fixing fetch secret manager via arn 2019-11-23 09:29:30 +03:00
Alexander Campbell
7e468287a0 Match AWS's change from smart-quote to ASCII quote 2019-11-12 10:05:11 +11:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Alexander Campbell
6120a60263 Use escape sequence to express non-ASCII character 2019-10-18 10:17:49 +11:00
Alexander Campbell
8eba88d1af Fix python2 unicode-in-exceptions issue for tests 2019-10-16 15:16:38 +11:00
Alexander Campbell
9a54cea4f1 Work around python2 unicode exception str() issues 2019-10-16 14:44:41 +11:00
Alexander Campbell
d74f9e47c8 Add coding hint for python2 compatibility 2019-10-16 12:44:30 +11:00
Alexander Campbell
9d6a1ca81d Fix slightly incorrect message for some errors 2019-10-16 10:58:59 +11:00
Alexander Campbell
381e7b165f Raise appropriate error when secret exists but has no value 2019-10-16 10:55:03 +11:00
Bert Blommers
e8d60435fe #2366 - SecretsManager - put_secret_value should support binary values 2019-08-23 10:57:15 +01:00
A
2386d47fe3 SecretsManager secret value binary support (#2222) 2019-05-28 16:32:43 +01:00
Justin Kieber-King
bbd7fefb37 Feature: Secrets Manager put_secret_value and list_secret_version_ids (#2116)
* initial work

- adding put_secret_value and list_secret_versions

* Added support for versions in all functions except rotate_secret

* more work

- refactor rotate_secret method
  - now, adds a new version of the secret and points default version id to it
- updated implementation coverage readme
- element in list check to fix unit test
- fixed linting errors
- added tests, fixed exception, failing tests still
- secrets_manager/test_server fails when running whole suite,
  but not when running that individual test file

* fixed failing test_get_secret_value

* Removed test.py. Fixed condition statement.

* fixed default stages + adding AWSPREVIOUS

* remove old AWSPREVIOUS stages
2019-05-22 10:45:22 +01:00
Christopher Kilding
55fe629112 Feature: Secrets Manager restore-secret 2019-04-24 10:03:04 +01:00
Chris Kilding
8f21272e57 Use pytz instead of timezone 2019-04-18 17:27:13 +01:00
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
Chris K
89e4ab93ee Implement ListSecrets 2019-04-05 13:33:28 +01:00
zane
08d17a7a13 adding Tags support 2018-12-21 14:04:52 -08:00
zane
b485122ec6 refactor to store multiple scrects, use uuid 2018-10-25 15:16:40 -07:00
Neil Roberts
6985f27167 Moto-1781: Add unit tests to verify that rotation is enabled.
- Add standalone unit test to verify that rotation is enabled and the
rotation interval is correct.
- Add server test to verify that rotation is enabled and the rotation
interval is correct. Commented out until nested dict error is sorted.
- Fix incorrectly asserted message strings.
2018-08-15 17:11:58 -07:00
Neil Roberts
71ed78141a Moto-1781: Implement server unit tests.
*** Includes 2 commented out tests that generate errors pointing deeper
in the code. ***
2018-08-15 11:32:54 -07:00
Neil Roberts
4ced0ce0db Opportunistic update to unit test for consistency. 2018-08-15 11:22:07 -07:00
Neil Roberts
b2997304b4 Moto-1781: Implement standalone unit tests to cover bad parameters. 2018-08-15 11:20:29 -07:00
Neil Roberts
43277a59b9 Moto-1781: finish implementation of rotate_secret and add happy test.
- Implement RotateSecret to support initial setup of secret rotation.
Moto's implementation of secrets is currently flat and needs to gain
some dimension before full rotation can be simulated.
- Add the happy path unit test.
2018-08-15 11:04:44 -07:00
Neil Roberts
69a78ba7c9 Moto-1781: Create initial stub of rotate_secret and tests. 2018-08-15 10:52:30 -07:00
Neil Roberts
0b0d16e8ec Opportunistic update to unit test for consistency. 2018-08-15 10:33:38 -07:00
Neil Roberts
1f499971d1 Merge branch 'master' into add_describe_secret_to_secretsmanager 2018-08-14 11:01:47 -07:00
Neil Roberts
b2c672a074 Issue 1753: add server test for mismatched secret 2018-08-13 12:53:22 -07:00
Neil Roberts
85d3250b89 Issue 1753: add test for mismatched secret 2018-08-13 12:49:35 -07:00
Neil Roberts
1f3256ed40 Issue 1770: Deal with the friendly name properly
- Save friendly name in create_secret.
- Reference the saved friendly name in responses that have "Name" field.
- Verify the received secret_id matches the current value. Don't just
test for an empty string.
- Add test for mismatched secret_id.
2018-08-10 16:40:31 -07:00
Neil Roberts
cce3a678aa Implement secretsmanager.DescribeSecret and tests. 2018-08-06 14:40:33 -07:00
zane
6c7a22c7d7 Added get_random_password mock with tests 2018-07-18 00:27:53 -07:00
Zane Williamson
ba1ceee95f Adding create_secret, exception handle, fix (#1680) 2018-07-14 08:39:19 +01:00
zane
b1a8ae8299 Updating tests 2018-06-09 23:42:33 -07:00
zane
8ee7a9495d UPdate 2018-06-09 22:08:10 -07:00
zane
c4abd98ed3 Adding server test for get_secret_value 2018-06-07 22:53:34 -07:00
zane
6e893ff055 Adding response, urls and test 2018-06-07 22:31:44 -07:00