Conversation
| @@ -0,0 +1,303 @@ | |||
| """ | |||
| .. module: bless.aws_lambda.bless_lambda | |||
There was a problem hiding this comment.
This is copied almost entirely from the old forked version that was being used for hosts (about 4 years old). Its been modernized for Python3 and a few tweaks caused by changes to interfaces in the bless package, but not refactored otherwise
| REGION_PASSWORD_OPTION_SUFFIX = '_password' | ||
|
|
||
|
|
||
| class BlessLyftConfig(configparser.RawConfigParser, object): |
There was a problem hiding this comment.
Unfortunatley, Netfllix have altered the way configs work significantly in the past 4 years. This is just mostly lifted from the old files and modernized, but we should eventually refactor to take advantage of the netflix commits
|
@skiptomyliu I'm not going to merge this, but please do take a look. |
|
🔒 |
|
ptal @skiptomyliu @surbhishah |
|
I took a pass and went through comparisons of the old branch and now new. Looks good. |
| 'System entropy was {}, which is lower than the entropy_' | ||
| 'minimum {}. Using KMS to seed /dev/urandom'.format( | ||
| entropy, entropy_minimum_bits)) | ||
| response = kms_client.generate_random( |
There was a problem hiding this comment.
I noticed if entropy_check is True, then kms_client will not be initialized unless ca_private_key_password is set (https://github.com/lyft/bless/pull/43/files#diff-a69a8ab6712afafbc98a768d892b3e56R206)
This seems to be the same as the old branch and seems to be operating okay. But maybe a quick additional line:
if not kms_client:
kms_client = boto3.client('kms', region_name=region)
This is code patched on top of master to enable our host ssh to work. We still need to modernize the host bless client and the patches I've applied to try and fit into master and allow merging from netflix/bless master more cleanly.
Some very simple test cases added to just give us some coverage