TUN-7718: Update R2 Token to no longer encode secret

This is simply because we no longer use the legacy R2 secret that needed
this encoding.
This commit is contained in:
Sudarsan Reddy 2023-08-23 15:08:39 +01:00 committed by Jean Khawand
parent 3636e996d0
commit cd3bd18db9
1 changed files with 1 additions and 3 deletions

View File

@ -13,7 +13,6 @@ import base64
import logging
import os
import shutil
from hashlib import sha256
from pathlib import Path
from subprocess import Popen, PIPE
@ -35,7 +34,6 @@ class PkgUploader:
def upload_pkg_to_r2(self, filename, upload_file_path):
endpoint_url = f"https://{self.account_id}.r2.cloudflarestorage.com"
token_secret_hash = sha256(self.client_secret.encode()).hexdigest()
config = Config(
region_name='auto',
@ -48,7 +46,7 @@ class PkgUploader:
"s3",
endpoint_url=endpoint_url,
aws_access_key_id=self.client_id,
aws_secret_access_key=token_secret_hash,
aws_secret_access_key=self.client_secret,
config=config,
)