Skip to content

Commit 56b0740

Browse files
authored
chore(ci): Support key-management in start-additional-kas action (#2903)
### Proposed Changes 1.) Add support for basic key management tests within the start-additional-kas github action ### Checklist - [ ] I have added or updated unit tests - [ ] I have added or updated integration tests (if appropriate) - [ ] I have added or updated documentation ### Testing Instructions
1 parent 971bf73 commit 56b0740

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/start-additional-kas/action.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,35 @@ inputs:
1717
description: 'Whether to enable ECC wrapping for TDFs'
1818
required: false
1919
type: boolean
20+
key-management:
21+
default: false
22+
description: 'Whether or not key_management is enabled for this KAS'
23+
type: boolean
24+
root-key:
25+
default: ''
26+
description: 'The root key to be used with key_management'
27+
type: string
2028

2129
runs:
2230
using: 'composite'
2331
steps:
32+
- name: Validate inputs
33+
if: ${{ inputs.key-management == 'true' && inputs.root-key == '' }}
34+
shell: bash
35+
run: |
36+
echo "Error: root-key is required when key-management is true."
37+
exit 1
2438
- uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7
2539
name: Start another KAS server in background
2640
with:
2741
run: >
2842
<opentdf-dev.yaml >opentdf-${{ inputs.kas-name }}.yaml yq e '
2943
(.server.port = ${{ inputs.kas-port }})
3044
| (.mode = ["kas"])
31-
| (.services.kas.ec_tdf_enabled = ${{ inputs.ec-tdf-enabled }})
45+
| (.services.kas.preview.ec_tdf_enabled = ${{ inputs.ec-tdf-enabled }})
46+
| (.services.kas.preview.key_management = ${{ inputs.key-management }})
47+
| (.services.kas.registered_kas_uri = "http://localhost:${{ inputs.kas-port }}")
48+
| (.services.kas.root_key = "${{ inputs.root-key }}")
3249
| (.sdk_config = {"client_id":"opentdf","client_secret":"secret","core":{"endpoint":"http://localhost:8080","plaintext":true}})
3350
'
3451
&& .github/scripts/watch.sh opentdf-${{ inputs.kas-name }}.yaml ./opentdf --config-file ./opentdf-${{ inputs.kas-name }}.yaml start

0 commit comments

Comments
 (0)