From a6b1f332083555a37dc2f8c2118f76e1ae440fff Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 17 Aug 2018 10:41:55 -0700 Subject: [PATCH 1/2] Ensure owner names are lowercase for new / updated certificates --- lemur/common/schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lemur/common/schema.py b/lemur/common/schema.py index 4e2c5306..ee765dc4 100644 --- a/lemur/common/schema.py +++ b/lemur/common/schema.py @@ -60,6 +60,8 @@ class LemurSchema(Schema): class LemurInputSchema(LemurSchema): @pre_load(pass_many=True) def preprocess(self, data, many): + if isinstance(data, dict) and data.get('owner'): + data['owner'] = data['owner'].lower() return self.under(data, many=many) From 7f9a035802e348715a13ae1a7236ad61a741f314 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 17 Aug 2018 10:59:01 -0700 Subject: [PATCH 2/2] Fix private key bytecode issue --- lemur/plugins/lemur_aws/iam.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lemur/plugins/lemur_aws/iam.py b/lemur/plugins/lemur_aws/iam.py index 53c3719d..677728bb 100644 --- a/lemur/plugins/lemur_aws/iam.py +++ b/lemur/plugins/lemur_aws/iam.py @@ -72,6 +72,8 @@ def upload_cert(name, body, private_key, path, cert_chain=None, **kwargs): name = name + '-' + path.strip('/') try: + if isinstance(private_key, bytes): + private_key = private_key.decode("utf-8") if cert_chain: return client.upload_server_certificate( Path=path,