diff --git a/coordinator/core/core.go b/coordinator/core/core.go index 2811b4d17..3f3c47cd3 100644 --- a/coordinator/core/core.go +++ b/coordinator/core/core.go @@ -14,7 +14,7 @@ import ( "github.com/edgelesssys/constellation/coordinator/store" "github.com/edgelesssys/constellation/coordinator/storewrapper" "github.com/edgelesssys/constellation/coordinator/util" - "github.com/edgelesssys/constellation/kms/pkg/kms" + "github.com/edgelesssys/constellation/kms/kms" "go.uber.org/zap" ) diff --git a/coordinator/kms/setup.go b/coordinator/kms/setup.go index 3efe3f94e..8232e4edf 100644 --- a/coordinator/kms/setup.go +++ b/coordinator/kms/setup.go @@ -6,11 +6,11 @@ import ( "net/url" "strconv" - "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/kms/aws" - "github.com/edgelesssys/constellation/kms/pkg/kms/azure" - "github.com/edgelesssys/constellation/kms/pkg/kms/gcp" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/kms/aws" + "github.com/edgelesssys/constellation/kms/kms/azure" + "github.com/edgelesssys/constellation/kms/kms/gcp" + "github.com/edgelesssys/constellation/kms/storage" kmspb "google.golang.org/genproto/googleapis/cloud/kms/v1" ) diff --git a/kms/docs/credentials.md b/kms/README.md similarity index 100% rename from kms/docs/credentials.md rename to kms/README.md diff --git a/kms/pkg/config/config.go b/kms/config/config.go similarity index 100% rename from kms/pkg/config/config.go rename to kms/config/config.go diff --git a/kms/pkg/kms/aws/aws.go b/kms/kms/aws/aws.go similarity index 97% rename from kms/pkg/kms/aws/aws.go rename to kms/kms/aws/aws.go index 9317283b9..42681d490 100644 --- a/kms/pkg/kms/aws/aws.go +++ b/kms/kms/aws/aws.go @@ -11,10 +11,10 @@ import ( awsconfig "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/kms" "github.com/aws/aws-sdk-go-v2/service/kms/types" - "github.com/edgelesssys/constellation/kms/pkg/config" - kmsInterface "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/kms/util" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + kmsInterface "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/kms/util" + "github.com/edgelesssys/constellation/kms/storage" ) const ( diff --git a/kms/pkg/kms/aws/aws_test.go b/kms/kms/aws/aws_test.go similarity index 98% rename from kms/pkg/kms/aws/aws_test.go rename to kms/kms/aws/aws_test.go index a375137d6..df88b6036 100644 --- a/kms/pkg/kms/aws/aws_test.go +++ b/kms/kms/aws/aws_test.go @@ -15,9 +15,9 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/kms" "github.com/aws/aws-sdk-go-v2/service/kms/types" - "github.com/edgelesssys/constellation/kms/pkg/config" - kmsInterface "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + kmsInterface "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/storage" "github.com/stretchr/testify/assert" ) diff --git a/kms/pkg/kms/azure/azure.go b/kms/kms/azure/azure.go similarity index 95% rename from kms/pkg/kms/azure/azure.go rename to kms/kms/azure/azure.go index 19ac5c83e..3d09bc55e 100644 --- a/kms/pkg/kms/azure/azure.go +++ b/kms/kms/azure/azure.go @@ -10,10 +10,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets" - "github.com/edgelesssys/constellation/kms/pkg/config" - "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/kms/util" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/kms/util" + "github.com/edgelesssys/constellation/kms/storage" ) const ( diff --git a/kms/pkg/kms/azure/hsm.go b/kms/kms/azure/hsm.go similarity index 96% rename from kms/pkg/kms/azure/hsm.go rename to kms/kms/azure/hsm.go index 60ed7db67..b88e201e3 100644 --- a/kms/pkg/kms/azure/hsm.go +++ b/kms/kms/azure/hsm.go @@ -12,10 +12,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys" "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys/crypto" - "github.com/edgelesssys/constellation/kms/pkg/config" - "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/kms/util" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/kms/util" + "github.com/edgelesssys/constellation/kms/storage" ) // Suffix for HSM Vaults. diff --git a/kms/pkg/kms/gcp/gcp.go b/kms/kms/gcp/gcp.go similarity index 97% rename from kms/pkg/kms/gcp/gcp.go rename to kms/kms/gcp/gcp.go index af5ebcbd3..f9b0e5e70 100644 --- a/kms/pkg/kms/gcp/gcp.go +++ b/kms/kms/gcp/gcp.go @@ -11,10 +11,10 @@ import ( "time" kms "cloud.google.com/go/kms/apiv1" - "github.com/edgelesssys/constellation/kms/pkg/config" - kmsInterface "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/kms/util" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + kmsInterface "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/kms/util" + "github.com/edgelesssys/constellation/kms/storage" "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" kmspb "google.golang.org/genproto/googleapis/cloud/kms/v1" diff --git a/kms/pkg/kms/gcp/gcp_test.go b/kms/kms/gcp/gcp_test.go similarity index 98% rename from kms/pkg/kms/gcp/gcp_test.go rename to kms/kms/gcp/gcp_test.go index 8f3718758..c6735296a 100644 --- a/kms/pkg/kms/gcp/gcp_test.go +++ b/kms/kms/gcp/gcp_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" - "github.com/edgelesssys/constellation/kms/pkg/config" - kmsInterface "github.com/edgelesssys/constellation/kms/pkg/kms" - "github.com/edgelesssys/constellation/kms/pkg/kms/util" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + kmsInterface "github.com/edgelesssys/constellation/kms/kms" + "github.com/edgelesssys/constellation/kms/kms/util" + "github.com/edgelesssys/constellation/kms/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/api/option" @@ -191,7 +191,6 @@ func TestGoogleKMS(t *testing.T) { // load responses mockKeyManagement.resps = []proto.Message{ &kmspb.CryptoKey{ - Name: fmt.Sprintf("projects/%s/locations/%s/keyRings/%s/cryptoKeys/%s", project, location, keyRing, kekName), }, &kmspb.EncryptResponse{ diff --git a/kms/pkg/kms/kms.go b/kms/kms/kms.go similarity index 100% rename from kms/pkg/kms/kms.go rename to kms/kms/kms.go diff --git a/kms/pkg/kms/util/crypto.go b/kms/kms/util/crypto.go similarity index 100% rename from kms/pkg/kms/util/crypto.go rename to kms/kms/util/crypto.go diff --git a/kms/pkg/kms/util/crypto_test.go b/kms/kms/util/crypto_test.go similarity index 100% rename from kms/pkg/kms/util/crypto_test.go rename to kms/kms/util/crypto_test.go diff --git a/kms/pkg/storage/awss3storage.go b/kms/storage/awss3storage.go similarity index 97% rename from kms/pkg/storage/awss3storage.go rename to kms/storage/awss3storage.go index ab3e0a0c2..861b45c57 100644 --- a/kms/pkg/storage/awss3storage.go +++ b/kms/storage/awss3storage.go @@ -10,7 +10,7 @@ import ( awsconfig "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3/types" - "github.com/edgelesssys/constellation/kms/pkg/config" + "github.com/edgelesssys/constellation/kms/config" ) // AWSS3Storage is an implementation of the Storage interface, storing keys in AWS S3 buckets. diff --git a/kms/pkg/storage/azurestorage.go b/kms/storage/azurestorage.go similarity index 98% rename from kms/pkg/storage/azurestorage.go rename to kms/storage/azurestorage.go index 41e608423..df79e5246 100644 --- a/kms/pkg/storage/azurestorage.go +++ b/kms/storage/azurestorage.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" - "github.com/edgelesssys/constellation/kms/pkg/config" + "github.com/edgelesssys/constellation/kms/config" ) // AzureStorage is an implementation of the Storage interface, storing keys in the Azure Blob Store. diff --git a/kms/pkg/storage/gcloudstorage.go b/kms/storage/gcloudstorage.go similarity index 100% rename from kms/pkg/storage/gcloudstorage.go rename to kms/storage/gcloudstorage.go diff --git a/kms/pkg/storage/gcloudstorage_test.go b/kms/storage/gcloudstorage_test.go similarity index 100% rename from kms/pkg/storage/gcloudstorage_test.go rename to kms/storage/gcloudstorage_test.go diff --git a/kms/pkg/storage/memfsstorage.go b/kms/storage/memfsstorage.go similarity index 100% rename from kms/pkg/storage/memfsstorage.go rename to kms/storage/memfsstorage.go diff --git a/kms/pkg/storage/memfsstroage_test.go b/kms/storage/memfsstroage_test.go similarity index 100% rename from kms/pkg/storage/memfsstroage_test.go rename to kms/storage/memfsstroage_test.go diff --git a/kms/pkg/storage/storage.go b/kms/storage/storage.go similarity index 100% rename from kms/pkg/storage/storage.go rename to kms/storage/storage.go diff --git a/kms/test/aws_test.go b/kms/test/aws_test.go index bf2cc0ed5..cafbfe131 100644 --- a/kms/test/aws_test.go +++ b/kms/test/aws_test.go @@ -14,9 +14,9 @@ import ( "github.com/aws/aws-sdk-go-v2/service/kms" "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3/types" - kmsconfig "github.com/edgelesssys/constellation/kms/pkg/config" - awsInterface "github.com/edgelesssys/constellation/kms/pkg/kms/aws" - "github.com/edgelesssys/constellation/kms/pkg/storage" + kmsconfig "github.com/edgelesssys/constellation/kms/config" + awsInterface "github.com/edgelesssys/constellation/kms/kms/aws" + "github.com/edgelesssys/constellation/kms/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/kms/test/azure_test.go b/kms/test/azure_test.go index ed90088a9..7fb72ccd0 100644 --- a/kms/test/azure_test.go +++ b/kms/test/azure_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/edgelesssys/constellation/kms/pkg/config" - "github.com/edgelesssys/constellation/kms/pkg/kms/azure" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + "github.com/edgelesssys/constellation/kms/kms/azure" + "github.com/edgelesssys/constellation/kms/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/kms/test/gcp_test.go b/kms/test/gcp_test.go index 1c290cfbc..42f327fee 100644 --- a/kms/test/gcp_test.go +++ b/kms/test/gcp_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/edgelesssys/constellation/kms/pkg/config" - "github.com/edgelesssys/constellation/kms/pkg/kms/gcp" - "github.com/edgelesssys/constellation/kms/pkg/storage" + "github.com/edgelesssys/constellation/kms/config" + "github.com/edgelesssys/constellation/kms/kms/gcp" + "github.com/edgelesssys/constellation/kms/storage" "github.com/stretchr/testify/assert" kmspb "google.golang.org/genproto/googleapis/cloud/kms/v1" )