diff --git a/lib/policy/resourcePolicySchema.json b/lib/policy/resourcePolicySchema.json index 87a2693d8..c24eb4b79 100644 --- a/lib/policy/resourcePolicySchema.json +++ b/lib/policy/resourcePolicySchema.json @@ -353,6 +353,10 @@ } }, "additionalProperties": false + }, + "IamPolicyItem": { + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" } }, "properties": { @@ -360,6 +364,9 @@ "type": "string", "const": "2012-10-17" }, + "Id": { + "$ref": "#/definitions/IamPolicyItem" + }, "Statement": { "oneOf": [ { diff --git a/tests/unit/models/BucketPolicy.spec.js b/tests/unit/models/BucketPolicy.spec.js index 42935a803..6d27f1fea 100644 --- a/tests/unit/models/BucketPolicy.spec.js +++ b/tests/unit/models/BucketPolicy.spec.js @@ -4,6 +4,7 @@ const BucketPolicy = require('../../../lib/models/BucketPolicy').default; const testBucketPolicy = { Version: '2012-10-17', + Id:'cd3ad3d9-2776-4ef1-a904-4c229d1642ee', Statement: [ { Effect: 'Allow',