Last update:2025-05-19 10:34:39
This guide outlines how to configure access restrictions for specific accounts, ensuring they can only access storage bucket content from approved IP addresses. Access attempts from non-approved IP addresses are denied, protecting your content from unauthorized use.
For further details on IAM operations, please refer to the IAM documentation.
Suppose you need to restrict the sub-account “alvin” so it can access Object Storage only through the IP address “27.148.104.22”. Follow these steps:
Sign in to the CDNetworks console. Go to IAM > Permissions > Policies, then click Add Policy to create a new permission policy.
Select Visualized, choose Object Storage (wos) under Non-CDN Product Services, and click Next.
Choose Allow, All Actions, and All Resources.
Set a restriction condition:
Name your policy and continue by clicking Next.
Assign the policy to the “alvin” account and click Finish to complete the setup.
Log in with the sub-account “alvin.” When connecting from an unauthorized IP address (not “27.148.106.28”), there should be no buckets displayed, and a notification stating “There is no corresponding access rights” will appear if the configuration is correct.
Copy any accessible file URL from your storage bucket. Attempt to access it from a non-authorized IP address using the following command line:
curl -voa "http://test20240103.s3-cn-east-7.wcsapi.com/IMG_3413.jpeg?Signature=%AHYRGqm0WL%2FZc%3D&AWSAccessKeyId=Cis17pTPsW2rwYdxaUZ7RZpxype&Expires=14611"
A 403 Forbidden response confirms your IAM configuration is active and functioning correctly.