Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 591305356
Change-Id: I38cc00905136b5135d7ba6cfa8712c2eab0d98b1
  • Loading branch information
jessieqliu authored and copybara-github committed Dec 15, 2023
1 parent c198c4b commit c4649e8
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 176 deletions.
10 changes: 6 additions & 4 deletions client/client_confspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ func TestSingleCreds(t *testing.T) {
ctx := context.Background()
tokenFile := testutil.CreateTempTokenFile(t)

uri := gcpKeyPrefix + "projects/test/locations/test/keyRings/test/cryptoKeys/testConfSpace"

noSplitConfig := &configpb.KeyConfig{
KekInfos: []*configpb.KekInfo{
{KekType: &configpb.KekInfo_KekUri{KekUri: testutil.TestConfSpaceKEKURI}},
{KekType: &configpb.KekInfo_KekUri{KekUri: uri}},
},
DekAlgorithm: configpb.DekAlgorithm_AES256_GCM,
KeySplittingAlgorithm: &configpb.KeyConfig_NoSplit{true},
Expand All @@ -118,23 +120,23 @@ func TestSingleCreds(t *testing.T) {
{
name: "single share with encrypt_and_decrypt_mode",
keyConfig: noSplitConfig,
credsURIPattern: testutil.TestConfSpaceKEKURI,
credsURIPattern: uri,
credsMode: configpb.CredentialMode_DEFAULT_ENCRYPT_AND_DECRYPT_MODE,
credsClient: createTestKMSClient(t, encryptAndDecrypt),
defaultClient: createTestKMSClient(t, errorOnly),
},
{
name: "single share with encrypt_only_mode",
keyConfig: noSplitConfig,
credsURIPattern: testutil.TestConfSpaceKEKURI,
credsURIPattern: uri,
credsMode: configpb.CredentialMode_ENCRYPT_ONLY_MODE,
credsClient: createTestKMSClient(t, encryptOnly),
defaultClient: createTestKMSClient(t, decryptOnly),
},
{
name: "single share with decrypt_only_mode",
keyConfig: noSplitConfig,
credsURIPattern: testutil.TestConfSpaceKEKURI,
credsURIPattern: uri,
credsMode: configpb.CredentialMode_DECRYPT_ONLY_MODE,
credsClient: createTestKMSClient(t, decryptOnly),
defaultClient: createTestKMSClient(t, encryptOnly),
Expand Down
Loading

0 comments on commit c4649e8

Please sign in to comment.