iam: OpenIdConnectProvider
ignores the @aws-cdk/aws-iam:oidcRejectUnauthorizedConnections
feature flag
#33251
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
While running snapshot tests, I noticed that starting from CDK v2.177.0, the GithubActionsProvider resource now includes a
RejectUnauthorized
property.According to the feature flags documentation for v2.177.0, a new feature flag called
@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections
should enable or disable this property.However, even after enabling the flag, the synthesized template still shows
"RejectUnauthorized": false
."GithubActionsProvider6504FFAA": { "DeletionPolicy": "Delete", "Properties": { "ClientIDList": [ "sts.amazonaws.com", ], "CodeHash": "62fa02efcaa700e1c247e1d3cc2aa0cd07a0808a9a3e3d2230e51f57a02233fb", + "RejectUnauthorized": false, "ServiceToken": { "Fn::GetAtt": [ "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", "Arn", ], }, "Url": "https://token.actions.githubusercontent.com", },
My cdk.json includes the following context:
Despite setting this flag to true, the resulting CloudFormation template shows "RejectUnauthorized": false.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
When
@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections
is set to true, I would expect the generated template to set"RejectUnauthorized": true
.Current Behavior
The synthesized CloudFormation template retains
"RejectUnauthorized": false
regardless of the feature flag being enabled.Reproduction Steps
Below is my code that creates this resource:
Possible Solution
No response
Additional Information/Context
I ran at my macOS and Github Actions' ubuntu-latest
CDK CLI Version
2.177.0 (build b396961)
Framework Version
"aws-cdk-lib": "2.177.0"
Node.js Version
v22.11.0
OS
macOS 15.1.1
Language
TypeScript
Language Version
5.7.3
Other information
No response
The text was updated successfully, but these errors were encountered: