Skip to content

Commit d4f6aaa

Browse files
authored
feat(core): key management operations (#533)
1 parent c552424 commit d4f6aaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3460
-109
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ build-test:
8787

8888
.PHONY: test-bats
8989
test-bats: build-test
90-
./e2e/resize_terminal.sh && bats ./tests
90+
./e2e/resize_terminal.sh && bats ./e2e
9191

9292
# Target for cleaning up the target directory
9393
.PHONY: clean

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ BATS is used to test the CLI from an end-to-end perspective. To run the tests yo
7171
prerequisites are met:
7272

7373
- bats is installed on your system
74-
- MacOS: `brew install bats-core bats-support bats-assert`
74+
- Follow bats-core advice [here](https://github.com/bats-core/homebrew-bats-core?tab=readme-ov-file#homebrew-bats-core)
7575
- The platform is running and provisioned with basic keycloak clients/users
7676
- See the [platform README](https://github.com/opentdf/platform) for instructions
7777

cmd/kas-grants.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/evertras/bubble-table/table"
88
"github.com/google/uuid"
99
"github.com/opentdf/otdfctl/pkg/cli"
10+
"github.com/opentdf/otdfctl/pkg/handlers"
1011
"github.com/opentdf/otdfctl/pkg/man"
1112
"github.com/spf13/cobra"
1213
)
@@ -41,7 +42,9 @@ func policy_assignKasGrant(cmd *cobra.Command, args []string) {
4142
rowID []string
4243
)
4344

44-
kas, err := h.GetKasRegistryEntry(ctx, kasID)
45+
kas, err := h.GetKasRegistryEntry(ctx, handlers.KasIdentifier{
46+
ID: kasID,
47+
})
4548
if err != nil || kas == nil {
4649
cli.ExitWithError("Failed to get registered KAS", err)
4750
}
@@ -100,7 +103,9 @@ func policy_unassignKasGrant(cmd *cobra.Command, args []string) {
100103
rowFQN []string
101104
)
102105

103-
kas, err := h.GetKasRegistryEntry(ctx, kasID)
106+
kas, err := h.GetKasRegistryEntry(ctx, handlers.KasIdentifier{
107+
ID: kasID,
108+
})
104109
if err != nil || kas == nil {
105110
cli.ExitWithError("Failed to get registered KAS", err)
106111
}

0 commit comments

Comments
 (0)