sObject - Configuring CORS and Bucket Policies Using S3 Browser
Publisher: Psychz Networks, January 02,2025This guide explains configuring CORS (Cross-Origin Resource Sharing) and bucket policies for your sObject using S3Browser. These settings allow better access control and integration with web applications.
Prerequisites
- Install S3Browser
- Access Key and Secret Key for your sObject storage.
1. Configuring CORS
- Connect to Your Storage:
- Open S3Browser.
- Select your sObject storage account.
- Navigate to the Bucket:
- In the left-hand panel, locate and select the bucket for which you want to configure CORS.
- Edit CORS Settings:
- Right-click the bucket and select CORS Configuration.
- Enter the desired CORS configuration.
Example:<CORSConfiguration> <CORSRule> <AllowedOrigin>https://example.com</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedHeader>*</AllowedHeader> <ExposeHeader>ETag</ExposeHeader> <MaxAgeSeconds>3000</MaxAgeSeconds> </CORSRule> </CORSConfiguration>
- Save the Configuration:
- Click Apply or Save to upload the configuration.
2. Configuring Bucket Policies
- Navigate to the Bucket:
- In S3Browser, locate and select the desired bucket.
- Edit Bucket Policy:
- Right-click the bucket and select Edit Bucket Policy.
- Enter the policy in JSON format.
Example:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::/*", "Condition": { "IpAddress": { "aws:SourceIp": "192.168.1.0/24" } } } ] }
- Save the Policy:
- Click Apply or Save to upload the policy.
Tips for Using S3Browser
- Validate Policies: Use the validation feature in S3Browser to ensure policies are correctly formatted.
- Backup Settings: Export the current settings as a backup before applying new policies or configurations.
Need Help?
If you encounter any issues, ensure your credentials have the necessary permissions to modify bucket configurations. Contact our support team if you need further assistance by opening a ticket from the dashboard or write to us at support@psychz.net.