Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'--csr service' returns encrypted private key with no-prompt option #538

Open
tall27 opened this issue Nov 18, 2024 · 1 comment
Open

'--csr service' returns encrypted private key with no-prompt option #538

tall27 opened this issue Nov 18, 2024 · 1 comment

Comments

@tall27
Copy link

tall27 commented Nov 18, 2024

PROBLEM SUMMARY
if I use '--csr service --no-prompt' flag, I get a private key encrypted.
same command with '--csr local --no-prompt' operates as expected (private key is not encrypted)

STEPS TO REPRODUCE
see problem summary

EXPECTED RESULTS
in both cases with --no-prompt , the private key should not be encrypted.

ACTUAL RESULTS

ENVIRONMENT DETAILS

vcert 5.7.1

COMMENTS/WORKAROUNDS

@tall27 tall27 added the bug Something isn't working label Nov 18, 2024
@luispresuelVenafi
Copy link
Contributor

Hi @tall27

I just tested this on VCert version:

$ vcert --version
vcert version v5.7.1

With no issue:

$ vcert enroll -k redacted-apki-key --cn test.venafi.com -z "redacted\\redacted-cit" --no-prompt --csr local
vCert: 2024/11/19 11:54:19 Warning: --platform not set. Attempting to best-guess platform from connection flags
vCert: 2024/11/19 11:54:20 Successfully connected to Venafi as a Service
vCert: 2024/11/19 11:54:20 Successfully read zone configuration redacted\\redacted-cit
vCert: 2024/11/19 11:54:20 Successfully created request for test.venafi.com
vCert: 2024/11/19 11:54:22 Successfully posted request for test.venafi.com, will pick up by redacted-pickup-id
vCert: 2024/11/19 11:54:23 Successfully retrieved request for redacted-pickup-id
-----BEGIN CERTIFICATE-----
MIIEvDCCA6SgAwIBAgIUE+sF2FQulkHoERrtMMSQKouT0mQwDQYJKoZIhvcNAQEL
BQAweDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDFZlbmFmaSwgSW5jLjERMA8GA1UE
CxMIQnVpbHQtaW4xPzA9BgNVBAMTNkRlZGljYXRlZCAtIFZlbmFmaSBDbG91ZCBC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g3NU7M+dMv7x668Aa5BPBH48AWoJYKkdCfCe
BUKA9D8ucYRXWPIZ3HqtdHxbofpJEuy9GuDDycVbiWIYB3Wb99ULG8TaMemL762R
8Woq1OKWu6UyfKexMAgft/YSqoc93QMxWUbOxCeLy3hNp635xT2KL48uET9ppuCK
79Ozn6zprVr30yg=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDvTCCAqWgAwIBAgIUZ9V3kA1cobRGvkQU5s3q8FJpZMAwDQYJKoZIhvcNAQEL
BQAwZjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDFZlbmFmaSwgSW5jLjERMA8GA1UE
CxMIQnVpbHQtaW4xLTArBgNVBAMTJERlZGljYXRlZCAtIFZlbmFmaSBDbG91ZCBC
...
HmzlSYQKH6KNPej4jPXY/i41kpCowCcq/Ppxf8vrwcvBalMt8vWec80fFUGmxTRW
wAe16xu2SAGUZisvdKrWFl6zf1+363E9RsaDCwfKGX6gm4W8dzuiqxxs4XSHCjnB
1zgxlKHIt2BXOhCtJAyq4GlZ4UzU0/RmavEc5rDoKKM4T8dN4W6qFByDywjBOk0f
Eg==
-----END CERTIFICATE-----
PickupID="redacted-pickup-id"

Note private key is not encrypted as expected.

Are you sure the flag is being passed correctly? Sometimes, the bash interpretation system is not helpful when passing values as string with double quotes or single quotes.

  • Could you provide a template of how you were executing the command?
  • Which platform were you aiming at? (in my case I was using Venafi Control Plane)

In the meantime I'll remove the bug label until we confirm indeed is a bug.

Thank you

@luispresuelVenafi luispresuelVenafi removed the bug Something isn't working label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants