-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
actual_lrps internal_routes field does not get re-encrypted when rotating bbs_encryption_key #626
Comments
邮件已收到,我会尽快阅读并回复,谢谢
|
Hello,
As you can see, on the ActualLRP table, only the net_info is being reEncrypted. Yesterday I managed to reproduce the issue on a dev environment by rotating out of existence the key, that was used to encrypt the internal_routes column in the first place and today I added internal_routes to the Columns, cleared the diegodb from the broken records and rotated the keys again. This time the ActualLRP's endpoint worked fine and they were no broken records in the database. So yeah, seems like a simple fix, if I am not missing something and please correct me if I am. |
@sleepychild thank you for reporting this. Seems like a bug indeed. @klapkov this looks like the right place to make a fix. We need to make sure we also have a test for this. @klapkov would you be willing to make a PR for this fix? Please let me know if you have any more questions or need help. |
Hey @mariash, thanks for the response, I will make a PR with the fix and tests, but we will probably leave it for the next sprint, meaning in about 2 weeks. I hope that's okay with you. |
@klapkov thank you for this information. We consider this bug too important to wait for 2 weeks and we will be working on a fix. |
When encryption key is rotated internal_routes field was not getting re-encrypted and thus BBS was failing to read it from database. * Add a test to verify all text fields are being re-encrypted. cloudfoundry/diego-release#626
We pushed the fix, thank you for reporting this issue. |
@mariash , thank you for the quick response and fix. |
actual_lrps internal_routes field does not get re-encrypted when rotating bbs_encryption_key
Summary
Rotation of bbs_encryption_key makes the internal_routes field of the actual_lrps table unreadable.
Steps to Reproduce
Push an application. Rotate the bbs_encryption_key so that the one used to encrypt the internal_routes of your app is no longer in the encryption_keys list in the bbs config. Run
cfdot actual-lrps
and observe the following error.Error: BBS error Type 0: UnknownError Message: Key with label "{label of the key used to encrypt the internal_routes field when the lrp was created}" was not found
Diego repo
It's in the current bbs release. Probably introduced when internal_routes were introduced to the actual_lrps table.
cloudfoundry/bbs@2cfb94f
Environment Details
diego-release ~= 2.61.0 is where the issue manifested on our deployments
It could have been introduced prior to that.
Possible Causes or Fixes (optional)
None that I can think of.
Additional Text Output, Screenshots, contextual information (optional)
From the diegodb we take a list of actual-lrps that would be suspicious. They have crashed 200 times and are still CRASHED and have no cell_id. We order them from oldest to newest.
For all of the entries we execute
cfdot actual-lrps -p {process_guid}
. Showing only the one before the two broken and the one after for brevity.As we can see the actual-lrps old enough to have their initial encryption keys are failing. The even older entries that don't have the
internal_routes
field populated and those whose encrypting key is still available in the bbs config work.The text was updated successfully, but these errors were encountered: