[#562] Support TLS termination header for SSE-C #566
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#566
Loading…
Reference in a new issue
No description provided.
Delete branch "r.loginov/frostfs-s3-gw:feature/562-support_tls_termination"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #562
Added the ability to specify a header that is used to indicate that TLS has been completed at the proxy level.
The default header name is
X-Frostfs-TLS-Termination
.@ -362,3 +362,3 @@
}
func formEncryptionParamsBase(r *http.Request, isCopySource bool) (enc encryption.Params, err error) {
func (h *handler) formEncryptionParamsBase(r *http.Request, isCopySource bool) (enc encryption.Params, err error) {
question: At the moment, I have not found any tests for the
formEncryptionParamsBase
function. Should I add them?Any correct tests are appreciated :)
@ -381,0 +381,4 @@
if tlsTerminationStr := r.Header.Get(h.cfg.TLSTerminationHeader()); len(tlsTerminationStr) > 0 {
tlsTermination, err := strconv.ParseBool(tlsTerminationStr)
if err != nil {
h.reqLogger(r.Context()).Warn(logs.WarnInvalidTypeTLSTerminationHeader, zap.Error(err))
I'm not completely sure that you should just output a warning here, maybe you should return an error here after all.
On the one hand, there is an incorrect header from outside. On the other hand, this is not an SEC error in the context of AWS S3.
I suppose warning is enough. But can we also log
tlsTerminationStr
?56025dab9f
todea857cda8
LGTM
@ -196,6 +196,7 @@ There are some custom types used for brevity:
| `containers` | [Containers configuration](#containers-section) |
| `vhs` | [VHS configuration](#vhs-section) |
| `multinet` | [Multinet configuration](#multinet-section) |
| `sse_c` | [SSE-C configuration](#sse_c-section) |
I would use different section name. Maybe
encryption
ortls
something like that.sse_c
name too specific I supposedea857cda8
toefde9fe2e7
New commits pushed, approval review dismissed automatically according to repository settings
@ -637,0 +789,4 @@
}
}
func prepareRequestForEnctyption(algo, key, md5, tlsTermination string, reqWithoutTLS, reqWithoutSSE, isCopySource bool) *http.Request {
nitpick: typo in
Encryption
efde9fe2e7
tod6c451c782
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
d6c451c782
to128939c01e
New commits pushed, approval review dismissed automatically according to repository settings