Some S3 resources (access points, Object Lambda access points, multi-region
access points, jobs, storage lens, etc.) have ARNs that include a region and/or
account-id, e.g.:
arn:aws:s3:us-east-1:123456789012:accesspoint/my-ap
arn:aws:s3:us-east-1:123456789012:job/my-job-id
Today the code does not handle these. arn_verify/2 in src/iam/s3.pl hard
rejects any s3 ARN whose region or account-id is non-empty ("Region not
empty" / "AccountID not empty"), and the resource//0 grammar only parses
bucket and bucket/object resources — there is no accesspoint/…, job/…, etc.
Note the general ARN parser in src/iam/arn.pl already parses region +
account-id fine, so this work is confined to src/iam/s3.pl:
- relax
arn_verify/2 so region/account are allowed for the resource types
that require them (and still required-empty for bucket/object).
- extend the
resource//0 grammar to cover the additional S3 resource types.
Refs:
Some S3 resources (access points, Object Lambda access points, multi-region
access points, jobs, storage lens, etc.) have ARNs that include a region and/or
account-id, e.g.:
Today the code does not handle these.
arn_verify/2insrc/iam/s3.plhardrejects any
s3ARN whose region or account-id is non-empty ("Region notempty" / "AccountID not empty"), and the
resource//0grammar only parsesbucket and bucket/object resources — there is no
accesspoint/…,job/…, etc.Note the general ARN parser in
src/iam/arn.plalready parses region +account-id fine, so this work is confined to
src/iam/s3.pl:arn_verify/2so region/account are allowed for the resource typesthat require them (and still required-empty for bucket/object).
resource//0grammar to cover the additional S3 resource types.Refs: