s3: add server side encryption support#127
Merged
alltilla merged 3 commits intoaxoflow:mainfrom Jun 4, 2024
Merged
Conversation
Adding the server-side-encryption() and kms-key() options to the s3() destination. The server-side-encryption() supports only aws:kms at the moment. Fixes #4920. Signed-off-by: Arpad Kunszt <[email protected]>
bazsi
reviewed
May 25, 2024
Member
|
I have found just one problem that I pointed out in a review comment above. Other than that this looks good to me. |
With this the process should not fail if the JSON file was created with an earlier version and the `server-side-encryption` and the `kms-key` keys are missing. Signed-off-by: Arpad Kunszt <[email protected]>
As @alltilla pointed out using an old JSON and NOT setting the `kms-key` and/or `server-side-encryption` settings can cause an issue. Signed-off-by: Arpad Kunszt <[email protected]>
alltilla
added a commit
to alltilla/axosyslog
that referenced
this pull request
Jun 4, 2024
Signed-off-by: Attila Szakacs <[email protected]>
HofiOne
pushed a commit
to HofiOne/axosyslog
that referenced
this pull request
Mar 13, 2025
Signed-off-by: Attila Szakacs <[email protected]> Signed-off-by: Hofi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables to use the server side encryption on the s3() destination. It is a common pattern that data stored on the S3 bucket is encrypted at the rest.
S3 supports multiple server side encryption possibilities. This is only for the
aws:kmsmethod. In theoryaws:kms:dsseshould also work but as it uses the same arguments but I didn't test it so I disabled that intentionally.Check the s3api documentation for the details.
This means that the server-side-encryption() option accepts only
aws:kmsor an empty string, which is the default.The kms-key() should be:
alias/prefixFor example:
To be able to use the
aws:kmsencryption the AWS Role or User has to have the following permissions on the given key:Check this page on why the kms:Decrypt is mandatory.
Setting server-side-encryption() to
aws:kmswithout setting kms-key() will terminate the syslog-ng process.Setting kms-key() without setting server-side-encryption() emits a warning and ignores the kms-key(). The server side encryption will be disabled in this case.
It also worth mentioning that kms-key() cannot be changed after the create_multipart_upload executed. I am not sure what will happen if someone modifies the key and then just reloads the syslog-ng configuration. A normal restart would work as syslog-ng finishes the multipart upload during the shutdown.