Set ACL for upload to S3 backup

Proposal

Currently, Gitlab can backup to a S3 bucket in AWS. I would like to have the option to set an ACL. Currently we are required to set the ACL to bucket-owner-full-control, but as far as I can see, this isn't possible.

I was able to set the connection_options, which should be passed to fog-aws and add a custom header. But the headers should be [Hash<Symbol, String>] which isn't possible if I pass JSON to backup.upload.connection in the config of Gitlab.

I've set those settings in gitlab.yaml under backup.upload.connection:

'provider' => 'AWS',
'region' => '****',
'aws_access_key_id' => '****',
'aws_secret_access_key' => '****',
'connection_options':{"headers":{"x-amz-acl":"bucket-owner-full-control"}}

When I make a backup with EXCON_DEBUG=true I see the following headers passing:

:headers             => {
    :"x-amz-acl"                  => "bucket-owner-full-control"
    "Authorization"                => "REDACTED"
    "Content-Type"                 => "application/x-tar"
    "Host"                         => "****"
    "User-Agent"                   => "fog-core/2.1.0"
    "x-amz-acl"                    => "private"
...

The wrong header is (I think) because it should be a Symbol, but I can only pass String. However, there is already set a header x-amz-acl which I would like to override with bucket-owner-full-control.

Edited by SCornelissen