dnmfarrell / iamsim

A Prolog module that stores IAM policies and actions to simulate permissions.
MIT License
2 stars 1 forks source link

Add ARN parsing/matching #3

Closed dnmfarrell closed 18 minutes ago

dnmfarrell commented 1 day ago

Policy resource strings should be '*' or a valid ARN. Resource string arguments in the public API should be validated as ARNs.

Action - Resource matching can be made more specific by matching the action service (s3:GetObject) with the service in the resource ARN (arn:aws:s3:::foo).

The ARN format varies by service (e.g. s3 omits region and account, the resource format is bucket/object_path), so we need a way to augment ARN behavior with service-specific rules.