Jelajahi Sumber

update sts test

lang 4 tahun lalu
induk
melakukan
6e59efd43d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      Controller/CloudStorage.py

+ 2 - 2
Controller/CloudStorage.py

@@ -441,7 +441,7 @@ class CloudStorageView(View):
             sts_qs = StsCrdModel.objects.filter(uid=uid, channel=channel). \
                 values("addTime", "data")
             if sts_qs.exists():
-                endTime = int(sts_qs[0]["addTime"]) + 7100
+                endTime = int(sts_qs[0]["addTime"]) + 800
                 if reset == '0' and endTime > now_time:
                     print(endTime)
                     print(now_time)
@@ -481,7 +481,7 @@ class CloudStorageView(View):
             response = boto3_sts.get_federation_token(
                 Name='{role_name}'.format(role_name=uid + '_' + str(channel)),
                 Policy=json.dumps(Policy),
-                DurationSeconds=7200
+                DurationSeconds=900
             )
             ##############
             res = {