Skip to content

Commit aad57d1

Browse files
committed
Add STACKIT KMS support
Add encryption/decryption support using STACKIT KMS (Key Management Service). This follows the same pattern as existing KMS providers (AWS, GCP, Azure, HuaweiCloud). New files: - stackitkms/keysource.go: MasterKey implementation using STACKIT SDK - stackitkms/keysource_test.go: Unit tests - keyservice/stackitkms.go: StackitKmsKey protobuf-compatible types Modified files: - cmd/sops/main.go: --stackit-kms, --add-stackit-kms, --rm-stackit-kms flags - config/config.go: stackit_kms support in .sops.yaml - keyservice/keyservice.proto: StackitKmsKey message - keyservice/keyservice.go: KeyFromMasterKey conversion - keyservice/server.go: encrypt/decrypt handlers - stores/stores.go: serialization in encrypted file metadata - go.mod: STACKIT SDK dependency Key format: projects/<projectId>/regions/<regionId>/keyRings/<keyRingId>/keys/<keyId>/versions/<versionNumber> Signed-off-by: Stanislav Kopp <stanislav.kopp@digits.schwarz>
1 parent ecb67d2 commit aad57d1

12 files changed

Lines changed: 822 additions & 45 deletions

File tree

README.rst

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SOPS: Secrets OPerationS
22
========================
33

44
**SOPS** is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY
5-
formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, HuaweiCloud KMS, age, and PGP.
5+
formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, HuaweiCloud KMS, STACKIT KMS, age, and PGP.
66
(`demo <https://www.youtube.com/watch?v=YTEVyLXFiq0>`_)
77

88
.. image:: https://i.imgur.com/X0TM5NI.gif
@@ -604,13 +604,65 @@ You can also configure HuaweiCloud KMS keys in the ``.sops.yaml`` config file:
604604
hckms:
605605
- tr-west-1:abc12345-6789-0123-4567-890123456789,tr-west-2:def67890-1234-5678-9012-345678901234
606606
607+
Encrypting using STACKIT KMS
608+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
609+
610+
The STACKIT KMS integration uses the
611+
`STACKIT SDK for Go <https://github.com/stackitcloud/stackit-sdk-go>`_
612+
default credential provider chain which tries several authentication methods, in this order:
613+
614+
1. Static token or key flow credentials
615+
2. Environment variable ``STACKIT_SERVICE_ACCOUNT_TOKEN``
616+
3. Credentials file at ``~/.stackit/credentials.json``
617+
4. Token flow via service account key
618+
619+
For more details, see the `STACKIT KMS documentation <https://docs.stackit.cloud/products/security/kms/>`_.
620+
621+
STACKIT KMS uses a resource ID in the format:
622+
``projects/<projectId>/regions/<regionId>/keyRings/<keyRingId>/keys/<keyId>/versions/<versionNumber>``
623+
624+
You can list your KMS keys using the STACKIT CLI:
625+
626+
.. code:: bash
627+
628+
stackit beta kms key-ring list --project-id <project-id> --region eu01
629+
stackit beta kms key list --project-id <project-id> --region eu01 --key-ring-id <keyring-id>
630+
stackit beta kms key version list --project-id <project-id> --region eu01 --key-ring-id <keyring-id> --key-id <key-id>
631+
632+
Now you can encrypt a file using:
633+
634+
.. code:: sh
635+
636+
$ sops encrypt --stackit-kms projects/my-project/regions/eu01/keyRings/my-keyring/keys/my-key/versions/1 test.yaml > test.enc.yaml
637+
638+
Or using the environment variable:
639+
640+
.. code:: sh
641+
642+
$ export SOPS_STACKIT_KMS_IDS="projects/my-project/regions/eu01/keyRings/my-keyring/keys/my-key/versions/1"
643+
$ sops encrypt test.yaml > test.enc.yaml
644+
645+
And decrypt it using:
646+
647+
.. code:: sh
648+
649+
$ sops decrypt test.enc.yaml
650+
651+
You can also configure STACKIT KMS keys in the ``.sops.yaml`` config file:
652+
653+
.. code:: yaml
654+
655+
creation_rules:
656+
- path_regex: \.stackit\.yaml$
657+
stackit_kms: projects/my-project/regions/eu01/keyRings/my-keyring/keys/my-key/versions/1
658+
607659
Adding and removing keys
608660
~~~~~~~~~~~~~~~~~~~~~~~~
609661
610662
When creating new files, ``sops`` uses the PGP, KMS and GCP KMS defined in the
611-
command line arguments ``--kms``, ``--pgp``, ``--gcp-kms``, ``--hckms`` or ``--azure-kv``, or from
663+
command line arguments ``--kms``, ``--pgp``, ``--gcp-kms``, ``--hckms``, ``--stackit-kms`` or ``--azure-kv``, or from
612664
the environment variables ``SOPS_KMS_ARN``, ``SOPS_PGP_FP``, ``SOPS_GCP_KMS_IDS``,
613-
``SOPS_HUAWEICLOUD_KMS_IDS``, ``SOPS_AZURE_KEYVAULT_URLS``. That information is stored in the file under the
665+
``SOPS_HUAWEICLOUD_KMS_IDS``, ``SOPS_STACKIT_KMS_IDS``, ``SOPS_AZURE_KEYVAULT_URLS``. That information is stored in the file under the
614666
``sops`` section, such that decrypting files does not require providing those
615667
parameters again.
616668
@@ -654,9 +706,9 @@ disabled by supplying the ``-y`` flag.
654706
655707
The ``rotate`` command generates a new data encryption key and reencrypt all values
656708
with the new key. At the same time, the command line flag ``--add-kms``, ``--add-pgp``,
657-
``--add-gcp-kms``, ``--add-hckms``, ``--add-azure-kv``, ``--rm-kms``, ``--rm-pgp``, ``--rm-gcp-kms``,
658-
``--rm-hckms`` and ``--rm-azure-kv`` can be used to add and remove keys from a file. These flags use
659-
the comma separated syntax as the ``--kms``, ``--pgp``, ``--gcp-kms``, ``--hckms`` and ``--azure-kv``
709+
``--add-gcp-kms``, ``--add-hckms``, ``--add-stackit-kms``, ``--add-azure-kv``, ``--rm-kms``, ``--rm-pgp``, ``--rm-gcp-kms``,
710+
``--rm-hckms``, ``--rm-stackit-kms`` and ``--rm-azure-kv`` can be used to add and remove keys from a file. These flags use
711+
the comma separated syntax as the ``--kms``, ``--pgp``, ``--gcp-kms``, ``--hckms``, ``--stackit-kms`` and ``--azure-kv``
660712
arguments when creating new files.
661713
662714
Use ``updatekeys`` if you want to add a key without rotating the data key.
@@ -832,7 +884,7 @@ stdout.
832884
Using .sops.yaml conf to select KMS, PGP and age for new files
833885
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
834886
835-
It is often tedious to specify the ``--kms`` ``--gcp-kms`` ``--hckms`` ``--pgp`` and ``--age`` parameters for creation
887+
It is often tedious to specify the ``--kms`` ``--gcp-kms`` ``--hckms`` ``--stackit-kms`` ``--pgp`` and ``--age`` parameters for creation
836888
of all new files. If your secrets are stored under a specific directory, like a
837889
``git`` repository, you can create a ``.sops.yaml`` configuration file at the root
838890
directory to define which keys are used for which filename.
@@ -878,6 +930,10 @@ can manage the three sets of configurations for the three types of files:
878930
- path_regex: \.hckms\.yaml$
879931
hckms: tr-west-1:abc12345-6789-0123-4567-890123456789,tr-west-2:def67890-1234-5678-9012-345678901234
880932
933+
# stackit files using STACKIT KMS
934+
- path_regex: \.stackit\.yaml$
935+
stackit_kms: projects/my-project/regions/eu01/keyRings/my-keyring/keys/my-key/versions/1
936+
881937
# Finally, if the rules above have not matched, this one is a
882938
# catchall that will encrypt the file using KMS set C as well as PGP
883939
# The absence of a path_regex means it will match everything
@@ -1883,6 +1939,16 @@ To directly specify a single key group, you can use the following keys:
18831939
- tr-west-1:abc12345-6789-0123-4567-890123456789
18841940
- tr-west-1:def67890-1234-5678-9012-345678901234
18851941
1942+
* ``stackit_kms`` (comma-separated string, or list of strings): list of STACKIT KMS resource IDs
1943+
(format: ``projects/<projectId>/regions/<regionId>/keyRings/<keyRingId>/keys/<keyId>/versions/<versionNumber>``).
1944+
Example:
1945+
1946+
.. code:: yaml
1947+
1948+
creation_rules:
1949+
- stackit_kms:
1950+
- projects/my-project/regions/eu01/keyRings/my-keyring/keys/my-key/versions/1
1951+
18861952
To specify a list of key groups, you can use the following key:
18871953
18881954
* ``key_groups`` (list of key group objects): a list of key group objects.
@@ -2000,6 +2066,17 @@ A key group supports the following keys:
20002066
20012067
- key_id: tr-west-1:abc12345-6789-0123-4567-890123456789
20022068
2069+
* ``stackit_kms`` (list of objects): list of STACKIT KMS resource IDs.
2070+
Every object must have the following key:
2071+
2072+
* ``resource_id`` (string): the resource ID in format ``projects/<projectId>/regions/<regionId>/keyRings/<keyRingId>/keys/<keyId>/versions/<versionNumber>``.
2073+
2074+
Example:
2075+
2076+
.. code:: yaml
2077+
2078+
- resource_id: projects/my-project/regions/eu01/keyRings/my-keyring/keys/my-key/versions/1
2079+
20032080
* ``age`` (list of strings): list of Age public keys.
20042081
20052082
* ``pgp`` (list of strings): list of PGP/GPG key fingerprints.

cmd/sops/main.go

Lines changed: 81 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"github.com/getsops/sops/v3/gcpkms"
3737
"github.com/getsops/sops/v3/hckms"
3838
"github.com/getsops/sops/v3/hcvault"
39+
"github.com/getsops/sops/v3/stackitkms"
3940
"github.com/getsops/sops/v3/keys"
4041
"github.com/getsops/sops/v3/keyservice"
4142
"github.com/getsops/sops/v3/kms"
@@ -91,14 +92,14 @@ func main() {
9192
},
9293
}
9394
app.Name = "sops"
94-
app.Usage = "sops - encrypted file editor with AWS KMS, GCP KMS, HuaweiCloud KMS, Azure Key Vault, age, and GPG support"
95+
app.Usage = "sops - encrypted file editor with AWS KMS, GCP KMS, HuaweiCloud KMS, STACKIT KMS, Azure Key Vault, age, and GPG support"
9596
app.ArgsUsage = "sops [options] file"
9697
app.Version = version.Version
9798
app.Authors = []cli.Author{
9899
{Name: "CNCF Maintainers"},
99100
}
100-
app.UsageText = `sops is an editor of encrypted files that supports AWS KMS, GCP, HuaweiCloud KMS, AZKV,
101-
PGP, and Age
101+
app.UsageText = `sops is an editor of encrypted files that supports AWS KMS, GCP, HuaweiCloud KMS, STACKIT KMS,
102+
AZKV, PGP, and Age
102103
103104
To encrypt or decrypt a document with AWS KMS, specify the KMS ARN
104105
in the -k flag or in the SOPS_KMS_ARN environment variable.
@@ -117,6 +118,12 @@ func main() {
117118
HUAWEICLOUD_SDK_AK, HUAWEICLOUD_SDK_SK, HUAWEICLOUD_SDK_PROJECT_ID, or
118119
use credentials file at ~/.huaweicloud/credentials)
119120
121+
To encrypt or decrypt a document with STACKIT KMS, specify the
122+
STACKIT KMS resource ID in the --stackit-kms flag or in the
123+
SOPS_STACKIT_KMS_IDS environment variable.
124+
(Authentication is handled by the STACKIT SDK via environment variables,
125+
service account key files, or credentials file at ~/.stackit/credentials.json)
126+
120127
To encrypt or decrypt a document with HashiCorp Vault's Transit Secret
121128
Engine, specify the Vault key URI name in the --hc-vault-transit flag
122129
or in the SOPS_VAULT_URIS environment variable (for example
@@ -142,12 +149,12 @@ func main() {
142149
To use multiple KMS or PGP keys, separate them by commas. For example:
143150
$ sops -p "10F2...0A, 85D...B3F21" file.yaml
144151
145-
The -p, -k, --gcp-kms, --hckms, --hc-vault-transit, and --azure-kv flags are only
152+
The -p, -k, --gcp-kms, --hckms, --stackit-kms, --hc-vault-transit, and --azure-kv flags are only
146153
used to encrypt new documents. Editing or decrypting existing documents
147154
can be done with "sops file" or "sops decrypt file" respectively. The KMS and
148155
PGP keys listed in the encrypted documents are used then. To manage master
149-
keys in existing documents, use the "add-{kms,pgp,gcp-kms,hckms,azure-kv,hc-vault-transit}"
150-
and "rm-{kms,pgp,gcp-kms,hckms,azure-kv,hc-vault-transit}" flags with --rotate
156+
keys in existing documents, use the "add-{kms,pgp,gcp-kms,hckms,stackit-kms,azure-kv,hc-vault-transit}"
157+
and "rm-{kms,pgp,gcp-kms,hckms,stackit-kms,azure-kv,hc-vault-transit}" flags with --rotate
151158
or the updatekeys command.
152159
153160
To use a different GPG binary than the one in your PATH, set SOPS_GPG_EXEC.
@@ -582,6 +589,10 @@ func main() {
582589
Name: "hckms",
583590
Usage: "the HuaweiCloud KMS key ID (format: region:key-uuid) the new group should contain. Can be specified more than once",
584591
},
592+
cli.StringSliceFlag{
593+
Name: "stackit-kms",
594+
Usage: "the STACKIT KMS resource ID the new group should contain. Can be specified more than once",
595+
},
585596
cli.StringSliceFlag{
586597
Name: "azure-kv",
587598
Usage: "the Azure Key Vault key URL the new group should contain. Can be specified more than once",
@@ -635,6 +646,15 @@ func main() {
635646
}
636647
group = append(group, k)
637648
}
649+
stackitKmsIds := c.StringSlice("stackit-kms")
650+
for _, resID := range stackitKmsIds {
651+
k, err := stackitkms.NewMasterKey(resID)
652+
if err != nil {
653+
log.WithError(err).Error("Failed to add key")
654+
continue
655+
}
656+
group = append(group, k)
657+
}
638658
for _, url := range azkvs {
639659
k, err := azkv.NewMasterKeyFromURL(url)
640660
if err != nil {
@@ -950,6 +970,11 @@ func main() {
950970
Usage: "comma separated list of HuaweiCloud KMS key IDs (format: region:key-uuid)",
951971
EnvVar: "SOPS_HUAWEICLOUD_KMS_IDS",
952972
},
973+
cli.StringFlag{
974+
Name: "stackit-kms",
975+
Usage: "comma separated list of STACKIT KMS resource IDs",
976+
EnvVar: "SOPS_STACKIT_KMS_IDS",
977+
},
953978
cli.StringFlag{
954979
Name: "azure-kv",
955980
Usage: "comma separated list of Azure Key Vault URLs",
@@ -1143,6 +1168,14 @@ func main() {
11431168
Name: "rm-hckms",
11441169
Usage: "remove the provided comma-separated list of HuaweiCloud KMS key IDs (format: region:key-uuid) from the list of master keys on the given file",
11451170
},
1171+
cli.StringFlag{
1172+
Name: "add-stackit-kms",
1173+
Usage: "add the provided comma-separated list of STACKIT KMS resource IDs to the list of master keys on the given file",
1174+
},
1175+
cli.StringFlag{
1176+
Name: "rm-stackit-kms",
1177+
Usage: "remove the provided comma-separated list of STACKIT KMS resource IDs from the list of master keys on the given file",
1178+
},
11461179
cli.StringFlag{
11471180
Name: "add-azure-kv",
11481181
Usage: "add the provided comma-separated list of Azure Key Vault key URLs to the list of master keys on the given file",
@@ -1209,8 +1242,8 @@ func main() {
12091242
return toExitError(err)
12101243
}
12111244
if _, err := os.Stat(fileName); os.IsNotExist(err) {
1212-
if c.String("add-kms") != "" || c.String("add-pgp") != "" || c.String("add-gcp-kms") != "" || c.String("add-hckms") != "" || c.String("add-hc-vault-transit") != "" || c.String("add-azure-kv") != "" || c.String("add-age") != "" ||
1213-
c.String("rm-kms") != "" || c.String("rm-pgp") != "" || c.String("rm-gcp-kms") != "" || c.String("rm-hckms") != "" || c.String("rm-hc-vault-transit") != "" || c.String("rm-azure-kv") != "" || c.String("rm-age") != "" {
1245+
if c.String("add-kms") != "" || c.String("add-pgp") != "" || c.String("add-gcp-kms") != "" || c.String("add-hckms") != "" || c.String("add-stackit-kms") != "" || c.String("add-hc-vault-transit") != "" || c.String("add-azure-kv") != "" || c.String("add-age") != "" ||
1246+
c.String("rm-kms") != "" || c.String("rm-pgp") != "" || c.String("rm-gcp-kms") != "" || c.String("rm-hckms") != "" || c.String("rm-stackit-kms") != "" || c.String("rm-hc-vault-transit") != "" || c.String("rm-azure-kv") != "" || c.String("rm-age") != "" {
12141247
return common.NewExitError(fmt.Sprintf("Error: cannot add or remove keys on non-existent file %q, use the `edit` subcommand instead.", fileName), codes.CannotChangeKeysFromNonExistentFile)
12151248
}
12161249
}
@@ -1301,6 +1334,11 @@ func main() {
13011334
Usage: "comma separated list of HuaweiCloud KMS key IDs (format: region:key-uuid)",
13021335
EnvVar: "SOPS_HUAWEICLOUD_KMS_IDS",
13031336
},
1337+
cli.StringFlag{
1338+
Name: "stackit-kms",
1339+
Usage: "comma separated list of STACKIT KMS resource IDs",
1340+
EnvVar: "SOPS_STACKIT_KMS_IDS",
1341+
},
13041342
cli.StringFlag{
13051343
Name: "azure-kv",
13061344
Usage: "comma separated list of Azure Key Vault URLs",
@@ -1714,6 +1752,11 @@ func main() {
17141752
Usage: "comma separated list of HuaweiCloud KMS key IDs (format: region:key-uuid)",
17151753
EnvVar: "SOPS_HUAWEICLOUD_KMS_IDS",
17161754
},
1755+
cli.StringFlag{
1756+
Name: "stackit-kms",
1757+
Usage: "comma separated list of STACKIT KMS resource IDs",
1758+
EnvVar: "SOPS_STACKIT_KMS_IDS",
1759+
},
17171760
cli.StringFlag{
17181761
Name: "azure-kv",
17191762
Usage: "comma separated list of Azure Key Vault URLs",
@@ -1770,6 +1813,14 @@ func main() {
17701813
Name: "rm-hckms",
17711814
Usage: "remove the provided comma-separated list of HuaweiCloud KMS key IDs (format: region:key-uuid) from the list of master keys on the given file",
17721815
},
1816+
cli.StringFlag{
1817+
Name: "add-stackit-kms",
1818+
Usage: "add the provided comma-separated list of STACKIT KMS resource IDs to the list of master keys on the given file",
1819+
},
1820+
cli.StringFlag{
1821+
Name: "rm-stackit-kms",
1822+
Usage: "remove the provided comma-separated list of STACKIT KMS resource IDs from the list of master keys on the given file",
1823+
},
17731824
cli.StringFlag{
17741825
Name: "add-azure-kv",
17751826
Usage: "add the provided comma-separated list of Azure Key Vault key URLs to the list of master keys on the given file",
@@ -2235,7 +2286,7 @@ func getEncryptConfig(c *cli.Context, fileName string, inputStore common.Store,
22352286
}, nil
22362287
}
22372288

2238-
func getMasterKeys(c *cli.Context, kmsEncryptionContext map[string]*string, kmsOptionName string, pgpOptionName string, gcpKmsOptionName string, hckmsOptionName string, azureKvOptionName string, hcVaultTransitOptionName string, ageOptionName string) ([]keys.MasterKey, error) {
2289+
func getMasterKeys(c *cli.Context, kmsEncryptionContext map[string]*string, kmsOptionName string, pgpOptionName string, gcpKmsOptionName string, hckmsOptionName string, stackitKmsOptionName string, azureKvOptionName string, hcVaultTransitOptionName string, ageOptionName string) ([]keys.MasterKey, error) {
22392290
var masterKeys []keys.MasterKey
22402291
for _, k := range kms.MasterKeysFromArnString(c.String(kmsOptionName), kmsEncryptionContext, c.String("aws-profile")) {
22412292
masterKeys = append(masterKeys, k)
@@ -2253,6 +2304,13 @@ func getMasterKeys(c *cli.Context, kmsEncryptionContext map[string]*string, kmsO
22532304
for _, k := range hckmsKeys {
22542305
masterKeys = append(masterKeys, k)
22552306
}
2307+
stackitKmsKeys, err := stackitkms.NewMasterKeyFromResourceIDString(c.String(stackitKmsOptionName))
2308+
if err != nil {
2309+
return nil, err
2310+
}
2311+
for _, k := range stackitKmsKeys {
2312+
masterKeys = append(masterKeys, k)
2313+
}
22562314
azureKeys, err := azkv.MasterKeysFromURLs(c.String(azureKvOptionName))
22572315
if err != nil {
22582316
return nil, err
@@ -2279,11 +2337,11 @@ func getMasterKeys(c *cli.Context, kmsEncryptionContext map[string]*string, kmsO
22792337

22802338
func getRotateOpts(c *cli.Context, fileName string, inputStore common.Store, outputStore common.Store, svcs []keyservice.KeyServiceClient, decryptionOrder []string) (rotateOpts, error) {
22812339
kmsEncryptionContext := kms.ParseKMSContext(c.String("encryption-context"))
2282-
addMasterKeys, err := getMasterKeys(c, kmsEncryptionContext, "add-kms", "add-pgp", "add-gcp-kms", "add-hckms", "add-azure-kv", "add-hc-vault-transit", "add-age")
2340+
addMasterKeys, err := getMasterKeys(c, kmsEncryptionContext, "add-kms", "add-pgp", "add-gcp-kms", "add-hckms", "add-stackit-kms", "add-azure-kv", "add-hc-vault-transit", "add-age")
22832341
if err != nil {
22842342
return rotateOpts{}, err
22852343
}
2286-
rmMasterKeys, err := getMasterKeys(c, kmsEncryptionContext, "rm-kms", "rm-pgp", "rm-gcp-kms", "rm-hckms", "rm-azure-kv", "rm-hc-vault-transit", "rm-age")
2344+
rmMasterKeys, err := getMasterKeys(c, kmsEncryptionContext, "rm-kms", "rm-pgp", "rm-gcp-kms", "rm-hckms", "rm-stackit-kms", "rm-azure-kv", "rm-hc-vault-transit", "rm-age")
22872345
if err != nil {
22882346
return rotateOpts{}, err
22892347
}
@@ -2432,6 +2490,7 @@ func keyGroups(c *cli.Context, file string, optionalConfig *config.Config) ([]so
24322490
var azkvKeys []keys.MasterKey
24332491
var hcVaultMkKeys []keys.MasterKey
24342492
var hckmsMkKeys []keys.MasterKey
2493+
var stackitKmsMkKeys []keys.MasterKey
24352494
var ageMasterKeys []keys.MasterKey
24362495
kmsEncryptionContext := kms.ParseKMSContext(c.String("encryption-context"))
24372496
if c.String("encryption-context") != "" && kmsEncryptionContext == nil {
@@ -2456,6 +2515,15 @@ func keyGroups(c *cli.Context, file string, optionalConfig *config.Config) ([]so
24562515
hckmsMkKeys = append(hckmsMkKeys, k)
24572516
}
24582517
}
2518+
if c.String("stackit-kms") != "" {
2519+
stackitKmsKeys, err := stackitkms.NewMasterKeyFromResourceIDString(c.String("stackit-kms"))
2520+
if err != nil {
2521+
return nil, err
2522+
}
2523+
for _, k := range stackitKmsKeys {
2524+
stackitKmsMkKeys = append(stackitKmsMkKeys, k)
2525+
}
2526+
}
24592527
if c.String("azure-kv") != "" {
24602528
azureKeys, err := azkv.MasterKeysFromURLs(c.String("azure-kv"))
24612529
if err != nil {
@@ -2488,7 +2556,7 @@ func keyGroups(c *cli.Context, file string, optionalConfig *config.Config) ([]so
24882556
ageMasterKeys = append(ageMasterKeys, k)
24892557
}
24902558
}
2491-
if c.String("kms") == "" && c.String("pgp") == "" && c.String("gcp-kms") == "" && c.String("hckms") == "" && c.String("azure-kv") == "" && c.String("hc-vault-transit") == "" && c.String("age") == "" {
2559+
if c.String("kms") == "" && c.String("pgp") == "" && c.String("gcp-kms") == "" && c.String("hckms") == "" && c.String("stackit-kms") == "" && c.String("azure-kv") == "" && c.String("hc-vault-transit") == "" && c.String("age") == "" {
24922560
conf := optionalConfig
24932561
var err error
24942562
if conf == nil {
@@ -2508,6 +2576,7 @@ func keyGroups(c *cli.Context, file string, optionalConfig *config.Config) ([]so
25082576
group = append(group, kmsKeys...)
25092577
group = append(group, cloudKmsKeys...)
25102578
group = append(group, hckmsMkKeys...)
2579+
group = append(group, stackitKmsMkKeys...)
25112580
group = append(group, azkvKeys...)
25122581
group = append(group, pgpKeys...)
25132582
group = append(group, hcVaultMkKeys...)

0 commit comments

Comments
 (0)