Commit e5c320f
authored
fix(searchable): enforce TLS 1.2 on Elasticsearch domains (v1 transformer) (#3456)
## Description
The v1 `graphql-elasticsearch-transformer` creates Elasticsearch domains
without any `DomainEndpointOptions` — no `EnforceHTTPS`, no
`TLSSecurityPolicy`. AWS is deprecating TLS 1.0/1.1 support on April 20,
2026.
Adds `DomainEndpointOptions` with `TLSSecurityPolicy:
Policy-Min-TLS-1-2-2019-07` to the domain. Does NOT add `EnforceHTTPS`
to avoid breaking customers currently using HTTP.
Uses `as any` cast because `cloudform-types@4.2.0` lacks the
`DomainEndpointOptions` type, but CloudFormation supports it.
Related: aws-amplify/amplify-cli#14329
### Changes
- `packages/graphql-elasticsearch-transformer/src/resources.ts` — Added
`DomainEndpointOptions` with `TLSSecurityPolicy` to
`makeElasticsearchDomain()`
-
`packages/graphql-elasticsearch-transformer/src/__tests__/SearchableModelTransformer.test.ts`
— Added TLS 1.2 assertion test
### CDK / CloudFormation Parameters Changed
`AWS::Elasticsearch::Domain` → `DomainEndpointOptions.TLSSecurityPolicy`
set to `Policy-Min-TLS-1-2-2019-07` (previously no
`DomainEndpointOptions` at all)
### Validation
- Unit tests: 7/7 pass
- E2E: [batch
406490ab](https://us-east-1.console.aws.amazon.com/codesuite/codebuild/594813022831/projects/amplify-category-api-e2e-workflow/batch/amplify-category-api-e2e-workflow:406490ab-0d9d-4145-b1f0-e7b728838512?region=us-east-1)
— 69/82 passed, all 3 searchable tests passed, failures are pre-existing
(auth/schema)
- Companion V2 fix: category-api/opensearch-tls-1-2-support (PR against
main)
### Checklist
- [x] `yarn test` passes
- [x] Tests are changed or added
- [x] CDK/CloudFormation parameter changes called out
- [x] E2E test run linked1 parent e8f0aee commit e5c320f
2 files changed
Lines changed: 36 additions & 1 deletion
File tree
- packages/graphql-elasticsearch-transformer/src
- __tests__
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
497 | 500 | | |
498 | 501 | | |
499 | 502 | | |
| |||
504 | 507 | | |
505 | 508 | | |
506 | 509 | | |
507 | | - | |
| 510 | + | |
508 | 511 | | |
509 | 512 | | |
510 | 513 | | |
| |||
0 commit comments