You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STS session policy containing only GetObject must deny DeleteObjects
1213
+
${bucket_suffix} = Generate Random String 8 [LOWER]
1214
+
${bucket} = Set Variable sts-bucket-deleteobjects-${bucket_suffix}
1215
+
${key_suffix} = Generate Random String 8 [LOWER]
1216
+
${key} = Set Variable sts-deny-deleteobjects-${key_suffix}.txt
1217
+
${local_path} = Set Variable ${TEMP_DIR}/${key}
1218
+
Create File ${local_path} deleteobjects deny test content
1219
+
1220
+
# Create bucket and object with full STS temp-bucket role permissions.
1221
+
Assume Role And Configure STS Profile perm_access_key_id=${PERMANENT_ACCESS_KEY_ID} perm_secret_key=${PERMANENT_SECRET_KEY} role_arn=${STS_TEMP_BUCKET_ROLE_ARN}
# Restrict token to GetObject-only via session policy. DeleteObjects must return AccessDenied.
1228
+
${session_policy} = Set Variable {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:GetObject","Resource":"arn:aws:s3:::${bucket}/*"}]}
1229
+
Assume Role And Configure STS Profile policy_json=${session_policy} perm_access_key_id=${PERMANENT_ACCESS_KEY_ID} perm_secret_key=${PERMANENT_SECRET_KEY} role_arn=${STS_TEMP_BUCKET_ROLE_ARN}
Run Keyword And Continue On Failure Should Contain ${output} AccessDenied
1232
+
1233
+
# Cleanup using a full-permission token.
1234
+
Assume Role And Configure STS Profile perm_access_key_id=${PERMANENT_ACCESS_KEY_ID} perm_secret_key=${PERMANENT_SECRET_KEY} role_arn=${STS_TEMP_BUCKET_ROLE_ARN}
Revoking Permanent User Must Revoke Existing Session Token
1213
1241
# Create session tokens for both buckets, verify they work, then revoke permanent user secret and verify both fail.
1214
1242
Assume Role And Get Temporary Credentials perm_access_key_id=${PERMANENT_ACCESS_KEY_ID} perm_secret_key=${PERMANENT_SECRET_KEY} role_arn=${ICEBERG_ALL_ACCESS_ROLE_OBS_ARN}
0 commit comments