Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aws-iam] FederatedPrincipal conditions property should not be required. #11139

Closed
JordanDeBeer opened this issue Oct 26, 2020 · 4 comments · Fixed by #20621
Closed

[aws-iam] FederatedPrincipal conditions property should not be required. #11139

JordanDeBeer opened this issue Oct 26, 2020 · 4 comments · Fixed by #20621
Labels
@aws-cdk/aws-iam Related to AWS Identity and Access Management bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@JordanDeBeer
Copy link

When creating an iam.FederatedPrincipal, the conditions parameter is required. This property should be optional.

Reproduction Steps

new iam.FederatedPrincipal('cognito-identity.amazonaws.com')

What did you expect to happen?

The principal would be returned and the FederatedPrincipal added to the policy.

What actually happened?

lib/streamer-badge-live.ts:46:22 - error TS2554: Expected 2-3 arguments, but got 1.

46         principals: [new iam.FederatedPrincipal("aws-cognito")],
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@aws-cdk/aws-iam/lib/principals.d.ts:364:36
    364     constructor(federated: string, conditions: Conditions, assumeRoleAction?: string);
                                           ~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'conditions' was not provided.

Environment

  • **CLI Version :1.70.0
  • **Framework Version: 1.70.0
  • **Node.js Version:v12.18.3
  • **OS : Linux
  • **Language (Version):all

Other


This is 🐛 Bug Report

@JordanDeBeer JordanDeBeer added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 26, 2020
@github-actions github-actions bot added the @aws-cdk/aws-iam Related to AWS Identity and Access Management label Oct 26, 2020
@JordanDeBeer
Copy link
Author

There is the WebIdentityPrincipal class which allows accomplishes what I am trying to do. But most of the docs I had read mentioned the FederatedPrincipal.

@rix0rrr rix0rrr added effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2 labels Nov 2, 2020
@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Nov 6, 2020
@rix0rrr rix0rrr removed their assignment Jun 3, 2021
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 3, 2022
@cecheta
Copy link
Contributor

cecheta commented Jun 3, 2022

I've raised #20621 which should close this

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 4, 2022
@mergify mergify bot closed this as completed in #20621 Jun 9, 2022
mergify bot pushed a commit that referenced this issue Jun 9, 2022
Fixes #11139

This PR makes conditions in `FederatedPrincipal` optional.

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Jun 9, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

daschaa pushed a commit to daschaa/aws-cdk that referenced this issue Jul 9, 2022
)

Fixes aws#11139

This PR makes conditions in `FederatedPrincipal` optional.

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-iam Related to AWS Identity and Access Management bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants