Skip to content

Conversation

@tanvipenumudy
Copy link
Contributor

@tanvipenumudy tanvipenumudy commented Jan 17, 2024

What changes were proposed in this pull request?

Due to a known bug: 'HDDS-7449. Avoid overwriting bucket encryption properties when quota/replication config are set on an existing bucket', there can be consumers on a previous version of Ozone who could possibly run into this issue of losing bucket encryption properties when they (re)set quota or bucket replication configurations - which is a critical issue.

Through this patch, we can reset the BEK (bucket encryption key) of buckets affected by this bug through Ozone shell (ozone sh bucket set-encryption-key -k <enckey> <vol>/<buck>).

It does not change any other properties of the bucket or the properties of existing keys in the given bucket.

  • The properties of the older keys in the bucket remain as is.
  • If any keys are added to the bucket after the bucket loses its encryption (before resetting the BEK), the keys added to the bucket remain unencrypted.
  • The newer keys added to the bucket post resetting the BEK are encrypted using the BEK details provided (the fileEncryptionInfo object on the key-level gets generated as expected).

Under normal circumstances, we do not intend for users to (re)set bucket encryption post bucket creation. Therefore, the setter methods introduced, as well as the CLI class have been put behind a @Deprecated annotation.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10142

How was this patch tested?

@tanvipenumudy tanvipenumudy marked this pull request as ready for review January 22, 2024 13:44
@tanvipenumudy
Copy link
Contributor Author

@adoroszlai, @fapifta could you please take a look? Thanks

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tanvipenumudy for the patch.

@adoroszlai adoroszlai requested a review from fapifta January 22, 2024 17:28
@jojochuang jojochuang self-requested a review January 22, 2024 17:29
@adoroszlai adoroszlai changed the title HDDS-10142. Enable setting BEK for HDDS-7449 affected buckets HDDS-10142. Add hidden command to set bucket encryption key to fix HDDS-7449 Jan 23, 2024
@adoroszlai
Copy link
Contributor

Thanks @tanvipenumudy for updating the patch. I'll let others take a look before merging it.

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @tanvipenumudy

@adoroszlai adoroszlai merged commit f39b34d into apache:master Jan 24, 2024
@adoroszlai
Copy link
Contributor

Thanks @tanvipenumudy for the patch, @errose28 for the review.

Tejaskriya pushed a commit to Tejaskriya/ozone that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants