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:
parent
b474778cf1
commit
5d8f60873d
|
@ -13,7 +13,6 @@ import base64
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from hashlib import sha256
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
|
@ -35,7 +34,6 @@ class PkgUploader:
|
||||||
|
|
||||||
def upload_pkg_to_r2(self, filename, upload_file_path):
|
def upload_pkg_to_r2(self, filename, upload_file_path):
|
||||||
endpoint_url = f"https://{self.account_id}.r2.cloudflarestorage.com"
|
endpoint_url = f"https://{self.account_id}.r2.cloudflarestorage.com"
|
||||||
token_secret_hash = sha256(self.client_secret.encode()).hexdigest()
|
|
||||||
|
|
||||||
config = Config(
|
config = Config(
|
||||||
region_name='auto',
|
region_name='auto',
|
||||||
|
@ -48,7 +46,7 @@ class PkgUploader:
|
||||||
"s3",
|
"s3",
|
||||||
endpoint_url=endpoint_url,
|
endpoint_url=endpoint_url,
|
||||||
aws_access_key_id=self.client_id,
|
aws_access_key_id=self.client_id,
|
||||||
aws_secret_access_key=token_secret_hash,
|
aws_secret_access_key=self.client_secret,
|
||||||
config=config,
|
config=config,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue