From bc61b23d913fde0cf9b10c1e1bd7950c29aacc8e Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 6 Sep 2022 17:38:51 -0700 Subject: [PATCH] Add deprecation notices to step-x-init binaries Fixes #1044 --- cmd/step-awskms-init/main.go | 3 +++ cmd/step-cloudkms-init/main.go | 3 +++ cmd/step-pkcs11-init/main.go | 3 +++ cmd/step-yubikey-init/main.go | 3 +++ 4 files changed, 12 insertions(+) diff --git a/cmd/step-awskms-init/main.go b/cmd/step-awskms-init/main.go index 48e2aa01..ee46ba94 100644 --- a/cmd/step-awskms-init/main.go +++ b/cmd/step-awskms-init/main.go @@ -34,6 +34,9 @@ func main() { // Initialize windows terminal ui.Init() + ui.Println("⚠️ This command is deprecated and will be removed in future releases.") + ui.Println("⚠️ Please use https://github.com/smallstep/step-kms-plugin instead.") + c, err := awskms.New(context.Background(), apiv1.Options{ Type: apiv1.AmazonKMS, Region: region, diff --git a/cmd/step-cloudkms-init/main.go b/cmd/step-cloudkms-init/main.go index aa483fc7..98d81ac0 100644 --- a/cmd/step-cloudkms-init/main.go +++ b/cmd/step-cloudkms-init/main.go @@ -65,6 +65,9 @@ func main() { // Initialize windows terminal ui.Init() + ui.Println("⚠️ This command is deprecated and will be removed in future releases.") + ui.Println("⚠️ Please use https://github.com/smallstep/step-kms-plugin instead.") + c, err := cloudkms.New(context.Background(), apiv1.Options{ Type: apiv1.CloudKMS, CredentialsFile: credentialsFile, diff --git a/cmd/step-pkcs11-init/main.go b/cmd/step-pkcs11-init/main.go index ed64e285..7595000c 100644 --- a/cmd/step-pkcs11-init/main.go +++ b/cmd/step-pkcs11-init/main.go @@ -151,6 +151,9 @@ func main() { // Initialize windows terminal ui.Init() + ui.Println("⚠️ This command is deprecated and will be removed in future releases.") + ui.Println("⚠️ Please use https://github.com/smallstep/step-kms-plugin instead.") + switch { case u.Get("pin-value") != "": case u.Get("pin-source") != "": diff --git a/cmd/step-yubikey-init/main.go b/cmd/step-yubikey-init/main.go index 62b18848..a06afe04 100644 --- a/cmd/step-yubikey-init/main.go +++ b/cmd/step-yubikey-init/main.go @@ -90,6 +90,9 @@ func main() { // Initialize windows terminal ui.Init() + ui.Println("⚠️ This command is deprecated and will be removed in future releases.") + ui.Println("⚠️ Please use https://github.com/smallstep/step-kms-plugin instead.") + pin, err := ui.PromptPassword("What is the YubiKey PIN?") if err != nil { fatal(err)