Commit 4bbe9f1
fix(ci): DSPX-3499 skip PQC key config when platform lacks PQC support (#3594)
## Summary
When the xtest workflow calls `start-up-with-containers` with
`pqc-enabled: true` against an older platform ref (e.g. `v0.9.0`), the
platform crashes on startup:
```
open kas-xwing-private.pem: no such file or directory
```
**Root cause:** `init-temp-keys.sh` (from the `pqc-enabled` tag) runs
`go run ./service/cmd/keygen` to generate PQC key files, but older
platform versions don't have that command — so the key files are never
created. The action then unconditionally injects PQC
keyring/cryptoProvider entries pointing to those missing files.
Even if the files were somehow present, older platforms don't support
`hpqt:*` key types at all.
**Fix:** Guard all PQC configuration behind a `kas-xwing-private.pem`
file-existence check:
1. **`test/start-up-with-containers/action.yaml`**
- Split `hpqt:*` algorithms out of the `>= 0.7.1` version gate in "Map
the config to the keys" — only add them to `allowed_algorithms` when the
key files exist
- Add an early-exit guard in "Enable PQ" step that emits a `::warning`
and skips PQC config when key files are absent
2. **`test/start-additional-kas/action.yaml`**
- Override `PQC_ENABLED=false` before the yq command when key files
don't exist, so the `with(select(...))` block naturally skips PQC
entries
**Addresses:**
https://github.com/opentdf/platform/actions/runs/27224175116/job/80411765728?pr=3592
## Test plan
- [ ] Re-run the xtest matrix for `v0.9.0` — platform should start
successfully without PQC keys
- [ ] Verify `main` (or any PQC-capable ref) still gets PQC keys
configured as before
- [ ] Confirm `::warning` annotation appears in the Actions log for
older refs
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Enhanced automated testing workflows with improved validation checks
for cryptographic key files and platform-specific algorithm
compatibility, ensuring reliable test execution across deployment
scenarios and reducing configuration errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: CoopAgent <coopagent@users.noreply.github.com>1 parent 8d446b3 commit 4bbe9f1
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
245 | 250 | | |
246 | 251 | | |
247 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
248 | 257 | | |
249 | 258 | | |
250 | 259 | | |
| |||
0 commit comments