Skip to content

v3.0.0

Compare
Choose a tag to compare
@tdpauw tdpauw released this 07 Sep 20:44
· 20 commits to main since this release

Changelog

  • 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 and PolicyDocument.validateForResourcePolicy into PolicyDocument.validate(PolicyType) where PolicyType accepts IAM, KMS, S3 and SecretsManager (#6).

  • Add support for the role principal #16

    Replaces ArnPrincipal used for an IAM Role with ARN arn: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 a RolePrincipal instead of an ArnPrincipal.

  • Add support for the user principal #16

    Replaces ArnPrincipal used for an IAM User with ARN arn: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 a UserPrincipal instead of an ArnPrincipal.
    Full Changelog: v2.7.0...v3.0.0

Node.js Package

npm install --save-dev @thinkinglabs/aws-iam-policy@3.0.0