Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit e9f73b9

Browse files
authored
cmd/kes: add support for migrating keys to minkms (#465)
This commit adds support for migrating keys to minkms via the `kes migrate` command. Migrating all keys of a KES backend to a MinKMS server can be done as following: ``` kes migrate --from src-config.yml --server 127.0.0.1:7373 --enclave minio --api-key k1:... ``` Currently, this implementation has the following limitations: - The HMAC key is not migrated. This requires support from MinKMS. However, HMAC keys are not used for S3 object encryption and have been added to KES recently. - Ciphertexts produced by KES cannot be decrypted auto. because they lack the key version prefix (e.g. 'v1:'). Future KES servers may use ciphertexts with key versions and MinKMS may accept a ciphertext without one. Signed-off-by: Andreas Auernhammer <github@aead.dev>
1 parent fe54489 commit e9f73b9

File tree

8 files changed

+221
-192
lines changed

8 files changed

+221
-192
lines changed

.github/workflows/go.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Set up Go
17-
uses: actions/setup-go@v3
17+
uses: actions/setup-go@v5
1818
with:
19-
go-version: 1.22.2
19+
go-version: 1.22.4
2020
check-latest: true
2121
id: go
2222
- name: Check out code
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
- name: Build and Lint
2525
env:
2626
GO111MODULE: on
@@ -32,17 +32,17 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: "Set up Go"
35-
uses: actions/setup-go@v3
35+
uses: actions/setup-go@v5
3636
with:
37-
go-version: 1.22.2
37+
go-version: 1.22.4
3838
id: go
3939
- name: Check out code
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141
- name: Lint
42-
uses: golangci/golangci-lint-action@v3
42+
uses: golangci/golangci-lint-action@v6
4343
with:
4444
version: latest
45-
args: --config ./.golangci.yml --timeout=2m
45+
args: --config ./.golangci.yml --timeout=5m
4646
test:
4747
name: Test ${{ matrix.os }}
4848
needs: Lint
@@ -52,13 +52,13 @@ jobs:
5252
os: [ubuntu-latest, windows-latest, macos-latest]
5353
steps:
5454
- name: Set up Go
55-
uses: actions/setup-go@v3
55+
uses: actions/setup-go@v5
5656
with:
57-
go-version: 1.22.2
57+
go-version: 1.22.4
5858
check-latest: true
5959
id: go
6060
- name: Check out code
61-
uses: actions/checkout@v3
61+
uses: actions/checkout@v4
6262
- name: Test
6363
env:
6464
GO111MODULE: on
@@ -70,14 +70,14 @@ jobs:
7070
runs-on: ubuntu-latest
7171
strategy:
7272
matrix:
73-
go-version: [1.21.9, 1.22.3]
73+
go-version: [1.21.11, 1.22.4]
7474
steps:
7575
- name: Set up Go ${{ matrix.go-version }}
76-
uses: actions/setup-go@v3
76+
uses: actions/setup-go@v5
7777
with:
7878
go-version: ${{ matrix.go-version }}
7979
- name: Check out code into the Go module directory
80-
uses: actions/checkout@v3
80+
uses: actions/checkout@v4
8181
- name: Get govulncheck
8282
run: go install golang.org/x/vuln/cmd/govulncheck@latest
8383
shell: bash

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v3
2222
with:
23-
go-version: 1.22.2
23+
go-version: 1.22.4
2424
check-latest: true
2525
- name: Set up QEMU
2626
uses: docker/setup-qemu-action@v1
@@ -30,4 +30,4 @@ jobs:
3030
uses: goreleaser/goreleaser-action@v3
3131
with:
3232
version: latest
33-
args: release --skip-publish --skip-sign --clean --snapshot --skip-before
33+
args: release --skip=publish,sign,before --clean --snapshot

cmd/kes/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func main() {
7171
"status": statusCmd,
7272
"metric": metricCmd,
7373

74-
"migrate": migrateCmd,
74+
"migrate": migrate,
7575
"update": updateCmd,
7676
}
7777

0 commit comments

Comments
 (0)