-
Stan Hu authored
This adds the AWS client directly to Workhorse and a new configuration section for specifying credentials. This makes it possible to use S3 buckets with KMS encryption and proper MD5 checksums. This is disabled by default. For this to be used: 1. GitLab Rails needs to send the `UseWorkhorseClient` and `RemoteTempObjectID` in the `/authorize` endpoint. (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29389) 2. S3 configuration must be specified in `config.toml`, or Rails must be configured to use IAM instance profiles (`use_iam_profile` in Fog connection parameters). S3 sessions are created lazily and cached for 10 minutes to avoid unnecessary local I/O access. When IAM instance profiles are used, this also cuts down the number of HTTP requests needed to request AWS credentials. Related issues: 1. https://gitlab.com/gitlab-org/gitlab-workhorse/issues/222 2. https://gitlab.com/gitlab-org/gitlab-workhorse/issues/185 3. https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/210
0671c96d