Skip to content

Commit

Permalink
Fix support for signing-certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoltis committed Aug 4, 2021
1 parent 665c062 commit 8e116e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions introspector/aws/transforms/iam/signing-certificate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ resources:
- CertificateBody
- Status
- UploadDate
resource_name: signing-certificate
category: Certificate
2 changes: 2 additions & 0 deletions introspector/aws/transforms/iam/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ resources:
parent_path: Arn
certificate_id:
path: CertificateId
resource_name:
value: signing-certificate
invert: true
subresources:
- type: signing-certificate
Expand Down
3 changes: 3 additions & 0 deletions introspector/aws/uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def _iam_uri_fn(resource_name: str, partition: str, account_id: str,
return f'{account_id}/PasswordPolicy'
elif resource_name == 'instance-profile':
return f'arn:{partition}:iam::{account_id}:{resource_name}/{kwargs["id"]}'
elif resource_name == 'signing-certificate':
return f'arn:{partition}:iam::{account_id}:{resource_name}/{kwargs["certificate_id"]}'
raise GFInternal(f'Failed IAM ARN ({resource_name}) {kwargs}')


Expand Down Expand Up @@ -72,6 +74,7 @@ def _require_account_id(args: Dict) -> str:
raise GFInternal(f'Invalid path {path}')
return path_parts[1]


def _security_group_by_name(partition: str, **kwargs) -> DbFn:
from introspector.models.resource import Resource, ResourceId

Expand Down

0 comments on commit 8e116e8

Please sign in to comment.