Commit 92af268
authored
fix: checking
When using a custom bootstrap template, users may choose to store the
bootstrap version in a `SecureString` SSM parameter instead the default
`String` type. The CDK CLI currently doesn't request decryption, causing
it to fail when reading such parameters. While the parameter contains no
sensitive data, overly aggressively configured checkers might flag the
parameter.
This PR resolves #955, at least in most cases. It should now be possible
to use a custom bootstrap template and encrypt the CDK Bootstrap version
parameter.
The change adds `WithDecryption: true` to the SSM `getParameter` call.
The flag is safe to always set because it's ignored for unencrypted
parameters. When using AWS Managed Keys, SSM already has the necessary
decryption permissions by default via Key policy. Otherwise it is up to
the user to ensure sufficient decryption permissions.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 licenseCdkBootstrapVersion when the SSM parameter is encrypted (#1025)1 parent 647111e commit 92af268
File tree
3 files changed
+26
-3
lines changed- packages/@aws-cdk/toolkit-lib
- lib
- api/environment
- context-providers
- test/api/environment
3 files changed
+26
-3
lines changedLines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
159 | 175 | | |
0 commit comments