mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02:00
fix policy doc
+5
-5
@@ -297,7 +297,7 @@ aws --endpoint $AWS_ENDPOINT iam list-policies
|
||||
|
||||
```bash
|
||||
aws --endpoint $AWS_ENDPOINT iam get-policy \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
```
|
||||
|
||||
#### Attach a Managed Policy to a User
|
||||
@@ -305,7 +305,7 @@ aws --endpoint $AWS_ENDPOINT iam get-policy \
|
||||
```bash
|
||||
aws --endpoint $AWS_ENDPOINT iam attach-user-policy \
|
||||
--user-name bob \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
```
|
||||
|
||||
#### List Managed Policies Attached to a User
|
||||
@@ -319,7 +319,7 @@ aws --endpoint $AWS_ENDPOINT iam list-attached-user-policies --user-name bob
|
||||
```bash
|
||||
aws --endpoint $AWS_ENDPOINT iam detach-user-policy \
|
||||
--user-name bob \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
```
|
||||
|
||||
#### Delete a Managed Policy
|
||||
@@ -328,7 +328,7 @@ aws --endpoint $AWS_ENDPOINT iam detach-user-policy \
|
||||
|
||||
```bash
|
||||
aws --endpoint $AWS_ENDPOINT iam delete-policy \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
```
|
||||
|
||||
---
|
||||
@@ -411,7 +411,7 @@ aws --endpoint $AWS_ENDPOINT iam put-user-policy \
|
||||
# 6. Attach a managed policy (e.g., ReadOnlyPolicy is built-in or previously created)
|
||||
aws --endpoint $AWS_ENDPOINT iam attach-user-policy \
|
||||
--user-name alice \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
|
||||
# 7. Verify
|
||||
echo 's3.configure' | weed shell
|
||||
|
||||
+5
-5
@@ -157,7 +157,7 @@ Managed policies are standalone policies that can be attached to multiple users.
|
||||
# Attach a managed policy to user
|
||||
aws --endpoint $AWS_ENDPOINT iam attach-user-policy \
|
||||
--user-name alice \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
|
||||
# List attached managed policies for a user
|
||||
aws --endpoint $AWS_ENDPOINT iam list-attached-user-policies --user-name alice
|
||||
@@ -165,7 +165,7 @@ aws --endpoint $AWS_ENDPOINT iam list-attached-user-policies --user-name alice
|
||||
# Detach a managed policy
|
||||
aws --endpoint $AWS_ENDPOINT iam detach-user-policy \
|
||||
--user-name alice \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/ReadOnlyPolicy
|
||||
--policy-arn arn:aws:iam:::policy/ReadOnlyPolicy
|
||||
|
||||
# Create a managed policy
|
||||
aws --endpoint $AWS_ENDPOINT iam create-policy \
|
||||
@@ -177,11 +177,11 @@ aws --endpoint $AWS_ENDPOINT iam list-policies
|
||||
|
||||
# Get managed policy metadata
|
||||
aws --endpoint $AWS_ENDPOINT iam get-policy \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/MyManagedPolicy
|
||||
--policy-arn arn:aws:iam:::policy/MyManagedPolicy
|
||||
|
||||
# Delete a managed policy
|
||||
# Delete a managed policy (must be detached from all users first)
|
||||
aws --endpoint $AWS_ENDPOINT iam delete-policy \
|
||||
--policy-arn arn:aws:iam::seaweedfs:policy/MyManagedPolicy
|
||||
--policy-arn arn:aws:iam:::policy/MyManagedPolicy
|
||||
```
|
||||
|
||||
### Self-Service: User Managing Their Own Keys
|
||||
|
||||
Reference in New Issue
Block a user