cdklabs / cdk-verified-permissions

Amazon Verified Permissions L2 CDK Constructs
Apache License 2.0
17 stars 2 forks source link

addPoliciesFromPath() should custom descriptions rather than file path #196

Closed ncino-esselman closed 1 month ago

ncino-esselman commented 1 month ago

Currently if you lever addPoliciesFromPath() from the Policy store the description on each policy is defaulted to the absolute file path. This is ugly and also opens up information about the system that deploys the policies.

Possibly a cedar annotation in the policy itself or even just the file name instead of the path might be better

reste85 commented 1 month ago

Thanks @ncino-esselman, taking a look

ncino-esselman commented 1 month ago

Thanks. There are a few options and I might try exploring targeting a comments annotation in the file but honestly the easiest would just be the file name minus the extension instead of the full path. Happy to contribute as well if that works

reste85 commented 1 month ago

@ncino-esselman i've implemented a fix (https://github.com/cdklabs/cdk-verified-permissions/pull/202) for using the relative path instead of the absolute one. I would keep also the file extension, it brings more clarity. Meantime i'm working also on a possible annotation, but here i would like to spend some more time... i'll open a draft PR in few moments and then continue on it in the following days

reste85 commented 1 month ago

This is the draft pr i'm working on https://github.com/cdklabs/cdk-verified-permissions/pull/203 to add the annotation to specify the description of the policy

ncino-esselman commented 1 month ago

Awesome! Thank you so much

reste85 commented 1 week ago

@ncino-esselman we released also 0.1.1 version which contains an annotation to specify description of policy. See https://github.com/cdklabs/cdk-verified-permissions/pull/203

ncino-esselman commented 1 week ago

A+ !! Thank you