aws / aws/aws-cdk

aws-servicecatalog: giveAccessToRole using wildcards when sharing Principal Names

Open
#29,770 4 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-servicecatalog effort/medium feature-request p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
71

Description

### Describe the feature

Allow to share AWS Service Catalog portfolio access with principal names that contains wildcards.
The feature seems to be possible given the following documentation link: https://docs.aws.amazon.com/servicecatalog/latest/adminguide/catalogs_portfolios_sharing_how-to-share.html#principal-name-share

![image](https://github.com/aws/aws-cdk/assets/224674/6c850f3f-f875-45cb-bac6-8294094f41c0)

![image](https://github.com/aws/aws-cdk/assets/224674/771744d5-ee7c-404d-a519-8429e9d8d896)

### Use Case

In the context of an AWS Organisation with SSO and multi-account permission set, the provisioned roles in the sub-accounts have an ARN pattern which contains each time a random number suffix (ex.: arn:aws:iam::${accountId}:role/${roleName}_{randomNumber}).

The ability to use [giveAccessToRole](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-servicecatalog/lib/portfolio.ts#L58) with a string ARN pattern would allow us to share access to the portfolio across the entire organisation account with the people having the permission set.

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.136.0

### Environment details (OS name and version, etc.)

macos 14

Contributor guide

Open the contributing guide

Research direction

Start in packages/aws-cdk-lib/aws-servicecatalog/lib/portfolio.ts at giveAccessToRole and compare its current ARN handling with the AWS Service Catalog principal-name sharing documentation. The change is done when role ARN patterns containing wildcards can be used for portfolio sharing, with behavior verified against the documented use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
authorization, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.