Can't decrypt Aurora MySQL Kinesis activity stream. (error:InvalidCiphertextException)

0

I'm stuck developing an application using AWS SDK for Go, and I'm unable to decrypt the Kinesis activity stream records coming from my Aurora MySQL db.

Following these steps to decrypt the record payloads, as I try to decrypt the record data key, I get error:InvalidCiphertextException

I'm currently trying to decrypt the record data key (in order to decrypt the payload) using my KMS key, via this call:

kmsSession.Decrypt(&kms.DecryptInput{CiphertextBlob: []byte(record.Key)}) With record.key being the data encryption key from the record I'm reading, as a string, parsed from the whole record.

As far as I know, for this usecase there is no need to specify the Encryption Context, or my KMS keyID (although I tried it anyway, getting the same error).

I'm opening the kms session as an user with AdministratorAccess policy group rights, and the user is in the Key Users and Key Administrator list for this KMS key.

Also, does the record data key needs to be base-64 decoded?

Any help is appreciated. Thanks!

已提問 2 年前檢視次數 88 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南