From 48a71ae329765188cf241dc3662d028e78cc345d Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 14 Aug 2018 12:04:39 -0700 Subject: [PATCH] Issue 1753: Add support for DescribeSecret - Merge changes from upstream master. - Update get_secret_value to use helper method for validating secret identifier. - Update implementation coverage checklist. --- IMPLEMENTATION_COVERAGE.md | 4 ++-- moto/secretsmanager/models.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index 98a216c79..938cc3549 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -3645,11 +3645,11 @@ - [ ] put_attributes - [ ] select -## secretsmanager - 20% implemented +## secretsmanager - 27% implemented - [ ] cancel_rotate_secret - [X] create_secret - [ ] delete_secret -- [ ] describe_secret +- [X] describe_secret - [X] get_random_password - [X] get_secret_value - [ ] list_secret_version_ids diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py index 07b563633..c60feb530 100644 --- a/moto/secretsmanager/models.py +++ b/moto/secretsmanager/models.py @@ -47,7 +47,7 @@ class SecretsManagerBackend(BaseBackend): def get_secret_value(self, secret_id, version_id, version_stage): - if secret_id not in (self.secret_id, self.name): + if not self._is_valid_identifier(secret_id): raise ResourceNotFoundException() response = json.dumps({