Add AWS IAM integration tests and refactor admin authorization (#8098)
* Add AWS IAM integration tests and refactor admin authorization - Added AWS IAM management integration tests (User, AccessKey, Policy) - Updated test framework to support IAM client creation with JWT/OIDC - Refactored s3api authorization to be policy-driven for IAM actions - Removed hardcoded role name checks for admin privileges - Added new tests to GitHub Actions basic test matrix * test(s3/iam): add UpdateUser and UpdateAccessKey tests and fix nil pointer dereference * feat(s3api): add DeletePolicy and update tests with cleanup logic * test(s3/iam): use t.Cleanup for managed policy deletion in CreatePolicy test
This commit is contained in:
@@ -341,6 +341,11 @@ type MockAssumedRoleUser struct {
|
||||
|
||||
// buildS3ResourceArn builds an S3 resource ARN from bucket and object
|
||||
func buildS3ResourceArn(bucket string, objectKey string) string {
|
||||
// If bucket is already an ARN, return it as-is
|
||||
if strings.HasPrefix(bucket, "arn:") {
|
||||
return bucket
|
||||
}
|
||||
|
||||
if bucket == "" {
|
||||
return "arn:aws:s3:::*"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user