Skip to content

Commit

Permalink
Get the KMS key from yaml (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBlack85 authored May 15, 2024
1 parent 7c22119 commit 38d59a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pg-migration-tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def decrypt_password(self, db, label) -> str:
self.query_one(label).update(f"Decrypting db password...")

try:
response = await asyncio.to_thread(client.decrypt, CiphertextBlob=base64.b64decode(db["db_password_encrypted"]), KeyId='alias/my-key')
response = await asyncio.to_thread(client.decrypt, CiphertextBlob=base64.b64decode(db["db_password_encrypted"]), KeyId=config["common"]["kms_key_id"])
decrypted_password = response['Plaintext'].decode('utf-8')

db["db_password"] = decrypted_password
Expand Down

0 comments on commit 38d59a6

Please sign in to comment.