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

getpolicy doesn't work with -p | --platform; Breaks Venafi Control Plane usage #504

Open
hawksight opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hawksight
Copy link

hawksight commented Jul 24, 2024

PROBLEM SUMMARY

> vcert getpolicy -p vcp -t $VCP_ACCESS_TOKEN -z "tlspk-peter/default"

Incorrect Usage: flag provided but not defined: -p

NAME:
   vcert getpolicy - To retrieve the certificate policy of a zone

USAGE:
    vcert getpolicy <Required Venafi Control Plane -OR- Trust Protection Platform Config> <Options>
           vcert getpolicy -u https://tpp.example.com -t <TPP access token> -z "<policy folder DN>"
       vcert getpolicy -p vcp -t <VCP access token> -z "<app name>\<CIT alias>"

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --apiKey value, -k value  REQUIRED/VaaS. Your API key for Venafi as a Service.  Example: -k aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
   --file value              Use to specify the location of a certificate policy specification. REQUIRED for the setpolicy action
   --starter                 Use to generate an empty policy specification file, when using this flag credentials should be avoided (default: false)
   --token value, -t value   REQUIRED/TPP/VaaS/Firefly. Your access token (or refresh token for getcred) for Trust Protection Platform, Venafi as a Service or Firefly. Example: -t Ab01Cd23Ef45Uv67Wx89Yz==
   --trust-bundle value      Use to specify a PEM file name to be used as trust anchors when communicating with the remote server.
   --url value, -u value     REQUIRED/TPP/Firefly/OIDC. The URL of the service.
                               TPP example: -u https://tpp.example.com
                               Firefly example: -u https://firefly.example.com
                               OIDC example: -u https://my.okta.domain//oauth2/v1/token
   --verbose                 Use to increase the level of logging detail, which is helpful when troubleshooting issues (default: false)
   --zone value, -z value    REQUIRED. Use to specify target zone for applying or retrieving certificate policy. In Trust Protection Platform this is the path (DN) of a policy folder and in Venafi as a Service this is the name of an Application and Issuing Template separated by a backslash. Example: -z Engineering\Internal Certs
   --help, -h                show help
vCert: 2024/07/24 14:28:02 flag provided but not defined: -p


> vcert getpolicy -t $VCP_ACCESS_TOKEN -z "tlspk-peter/default"
vCert: 2024/07/24 14:29:53 Warning: --platform not set. Attempting to best-guess platform from connection flags
vCert: 2024/07/24 14:29:53 vcert error: your data contains problems: failed to normalize URL: The specified TPP URL is invalid.
Expected TPP URL format 'https://tpp.company.com/vedsdk/'

STEPS TO REPRODUCE

See above ^

EXPECTED RESULTS

I should be able to use vcert getpolicy with TLS Protect Cloud / Venafi Control Place

ACTUAL RESULTS

Warning if not set:

Warning: --platform not set. Attempting to best-guess platform from connection flags

Error when set:

Incorrect Usage: flag provided but not defined: -p

ENVIRONMENT DETAILS

MacOSx:

> sw_vers
ProductName:		macOS
ProductVersion:		14.5
BuildVersion:		23F79

> vcert --version
vcert version v5.7.1

COMMENTS/WORKAROUNDS

No workarounds.

Please note that I raised this issue as a comment previosuly in issue #462.

@hawksight hawksight added the bug Something isn't working label Jul 24, 2024
@hawksight hawksight changed the title getpolicy doesn't work with -p | --platform breaks Venafi Control Place usage getpolicy doesn't work with -p | --platform; Breaks Venafi Control Plane usage Jul 24, 2024
@jyppy
Copy link
Contributor

jyppy commented Sep 4, 2024

vcert pickup has the same issue. It will throw an error if the -p | --platform switch is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants