-
Add support for Policy
Id
to thePolicyDocument
(#29). -
Move the policy
Version
at the top of the serialised JSON policy document. -
Drop the minimal Node.js version requirement
-
Replace
npm
byvolta
as Node.js version manager. -
Introduce a matrix build on Node.js v18, v20, v22 (#30)
-
Extend the validation with policy document size quota (#6).
-
Extend the validation with the valid
Sid
values for IAM policy, KMS key policy, S3 bucket policy and SecretsManager secret policy (#5). -
Fix a bug where the root account principal was deserialised as an
ArnPrincipal
(#26).
🚨 BREAKING CHANGE
-
Consolidate
PolicyDocument.validateForAnyPolicy
,PolicyDocument.validateForIndentityPolicy
andPolicyDocument.validateForResourcePolicy
intoPolicyDocument.validate(PolicyType)
wherePolicyType
acceptsIAM
,KMS
,S3
andSecretsManager
(#6). -
Add support for the role principal #16
Replaces
ArnPrincipal
used for an IAM Role with ARNarn:aws:iam::123456789000:role/a/path/a_role
.Serialising
ArnPrincipal
will still produce a valid IAM Policy Statement AWS Principal JSON fragment{"AWS": "arn:aws:iam::123456789000:role/a/path/a_role"}
.Deserialising an AWS Principal JSON fragment
{ "AWS": "arn:aws:iam::123456789000:role/a/path/a_role" }
will now produce aRolePrincipal
instead of anArnPrincipal
. -
Add support for the user principal #16
Replaces
ArnPrincipal
used for an IAM User with ARNarn:aws:iam::123456789000:user/a/path/a_user
.Serialising
ArnPrincipal
will still produce a valid IAM Policy Statement AWS Principal JSON fragment{"AWS": "arn:aws:iam::123456789000:user/a/path/a_user"}
.Deserialising an AWS Principal JSON fragment
{ "AWS": "arn:aws:iam::123456789000:user/a/path/a_user" }
will now produce aUserPrincipal
instead of anArnPrincipal
.
- Add support for the CloudFront principal #24 reported and fixed (#25) by @araguacaima
- Export the
WildcardPrincipal
(#23 by @gabegorelick).
- Add support for the wildcard principal (#22 reported by @gabegorelick).
- Fix the GitHub Action that publishes the npm package to include the prepublish typescript compilation
- Add support for string value for
Condition
key values (#9) - Add support for string value for
Principal
type values (#10)
- Make
PolicyDocument.addStatement(Statement)
public
-
Add support for Condition
This adds an object model for the Condition element of an IAM Policy Statement. To build a Statement having a Condition:
new Statement({ effect: "Deny", ... conditions: [ new Condition("StringNotLike", "aws:userId", ["userId1", "userId2", ...]), ] })
- Initial release