aboutsummaryrefslogtreecommitdiff
path: root/test/s3/iam/setup_keycloak_docker.sh
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-11-12 22:14:50 -0800
committerGitHub <noreply@github.com>2025-11-12 22:14:50 -0800
commit508d06d9a5c763668ba149a8f1182e8552505c2b (patch)
treea34d21d801d2b71dc3c6968cbb4ff8568e0fa8da /test/s3/iam/setup_keycloak_docker.sh
parent50f067bcfd99ecf1821ba2d34fc2f109e90428bb (diff)
downloadseaweedfs-508d06d9a5c763668ba149a8f1182e8552505c2b.tar.xz
seaweedfs-508d06d9a5c763668ba149a8f1182e8552505c2b.zip
S3: Enforce bucket policy (#7471)
* evaluate policies during authorization * cache bucket policy * refactor * matching with regex special characters * Case Sensitivity, pattern cache, Dead Code Removal * Fixed Typo, Restored []string Case, Added Cache Size Limit * hook up with policy engine * remove old implementation * action mapping * validate * if not specified, fall through to IAM checks * fmt * Fail-close on policy evaluation errors * Explicit `Allow` bypasses IAM checks * fix error message * arn:seaweed => arn:aws * remove legacy support * fix tests * Clean up bucket policy after this test * fix for tests * address comments * security fixes * fix tests * temp comment out
Diffstat (limited to 'test/s3/iam/setup_keycloak_docker.sh')
-rwxr-xr-xtest/s3/iam/setup_keycloak_docker.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/s3/iam/setup_keycloak_docker.sh b/test/s3/iam/setup_keycloak_docker.sh
index 6dce68abf..99a952615 100755
--- a/test/s3/iam/setup_keycloak_docker.sh
+++ b/test/s3/iam/setup_keycloak_docker.sh
@@ -178,25 +178,25 @@ cat > iam_config.json << 'EOF'
{
"claim": "roles",
"value": "s3-admin",
- "role": "arn:seaweed:iam::role/KeycloakAdminRole"
+ "role": "arn:aws:iam::role/KeycloakAdminRole"
},
{
"claim": "roles",
"value": "s3-read-only",
- "role": "arn:seaweed:iam::role/KeycloakReadOnlyRole"
+ "role": "arn:aws:iam::role/KeycloakReadOnlyRole"
},
{
"claim": "roles",
"value": "s3-write-only",
- "role": "arn:seaweed:iam::role/KeycloakWriteOnlyRole"
+ "role": "arn:aws:iam::role/KeycloakWriteOnlyRole"
},
{
"claim": "roles",
"value": "s3-read-write",
- "role": "arn:seaweed:iam::role/KeycloakReadWriteRole"
+ "role": "arn:aws:iam::role/KeycloakReadWriteRole"
}
],
- "defaultRole": "arn:seaweed:iam::role/KeycloakReadOnlyRole"
+ "defaultRole": "arn:aws:iam::role/KeycloakReadOnlyRole"
}
}
}
@@ -207,7 +207,7 @@ cat > iam_config.json << 'EOF'
"roles": [
{
"roleName": "KeycloakAdminRole",
- "roleArn": "arn:seaweed:iam::role/KeycloakAdminRole",
+ "roleArn": "arn:aws:iam::role/KeycloakAdminRole",
"trustPolicy": {
"Version": "2012-10-17",
"Statement": [
@@ -225,7 +225,7 @@ cat > iam_config.json << 'EOF'
},
{
"roleName": "KeycloakReadOnlyRole",
- "roleArn": "arn:seaweed:iam::role/KeycloakReadOnlyRole",
+ "roleArn": "arn:aws:iam::role/KeycloakReadOnlyRole",
"trustPolicy": {
"Version": "2012-10-17",
"Statement": [
@@ -243,7 +243,7 @@ cat > iam_config.json << 'EOF'
},
{
"roleName": "KeycloakWriteOnlyRole",
- "roleArn": "arn:seaweed:iam::role/KeycloakWriteOnlyRole",
+ "roleArn": "arn:aws:iam::role/KeycloakWriteOnlyRole",
"trustPolicy": {
"Version": "2012-10-17",
"Statement": [
@@ -261,7 +261,7 @@ cat > iam_config.json << 'EOF'
},
{
"roleName": "KeycloakReadWriteRole",
- "roleArn": "arn:seaweed:iam::role/KeycloakReadWriteRole",
+ "roleArn": "arn:aws:iam::role/KeycloakReadWriteRole",
"trustPolicy": {
"Version": "2012-10-17",
"Statement": [
@@ -309,8 +309,8 @@ cat > iam_config.json << 'EOF'
"s3:ListBucket"
],
"Resource": [
- "arn:seaweed:s3:::*",
- "arn:seaweed:s3:::*/*"
+ "arn:aws:s3:::*",
+ "arn:aws:s3:::*/*"
]
},
{
@@ -330,8 +330,8 @@ cat > iam_config.json << 'EOF'
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": [
- "arn:seaweed:s3:::*",
- "arn:seaweed:s3:::*/*"
+ "arn:aws:s3:::*",
+ "arn:aws:s3:::*/*"
]
},
{
@@ -341,8 +341,8 @@ cat > iam_config.json << 'EOF'
"s3:ListBucket"
],
"Resource": [
- "arn:seaweed:s3:::*",
- "arn:seaweed:s3:::*/*"
+ "arn:aws:s3:::*",
+ "arn:aws:s3:::*/*"
]
},
{
@@ -362,8 +362,8 @@ cat > iam_config.json << 'EOF'
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": [
- "arn:seaweed:s3:::*",
- "arn:seaweed:s3:::*/*"
+ "arn:aws:s3:::*",
+ "arn:aws:s3:::*/*"
]
},
{