1
0
mirror of https://github.com/minio/mc.git synced 2025-11-14 23:42:27 +03:00

Fix get-policy/put-policy invalid entries.

Also update documentation, to use subdomains for buckets as minio
server starts supporting subdomains.
This commit is contained in:
Harshavardhana
2015-02-23 02:00:58 -08:00
parent 237c3cdc38
commit c698b097aa
4 changed files with 48 additions and 27 deletions

View File

@@ -3,12 +3,11 @@
var AWS = require('aws-sdk');
var config = {
accessKeyId: "MINIO_ACCESS_ID",
secretAccessKey: "MINIO_SECRET_ID",
accessKeyId: "AC5NH40NQLTL4D2W92PM",
secretAccessKey: "H+AVh8q5G7hEH2r3WxFP135+Q19Aw8yXWel8IGh/HrEjZyTNx/n4Xw==",
endpoint: "localhost:9000",
region: "",
sslEnabled: false,
s3ForcePathStyle: true
};
AWS.config.update(config);
@@ -19,12 +18,12 @@ var statement = {
Sid: "ExampleStatemenent1",
Effect: "Allow",
Principal: {
AWS: "minio::Account-Id:user/Dave"
AWS: "minio::1111111:murphy"
},
Action: [
"s3.ListBucket",
"s3.GetObject",
"s3.PutObject",
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
],
Resource: [
"minio:::examplebucket"
@@ -37,7 +36,7 @@ var policy = {
}
var params = {
Bucket: 'new-bucket',
Bucket: 'newbucket',
Policy: JSON.stringify(policy),
}
@@ -50,7 +49,7 @@ s3.putBucketPolicy(params, function(err, data) {
});
var params = {
Bucket: 'new-bucket'
Bucket: 'newbucket'
};
s3.getBucketPolicy(params, function(err, data) {