credhub-cli icon indicating copy to clipboard operation
credhub-cli copied to clipboard

Credhub Import Ignores Parse Errors

Open Salamandastron1 opened this issue 4 years ago • 1 comments

What version of the credhub server you are using? Server Version: 2.5.7

What version of the credhub cli you are using? CLI Version: 2.7.0

If you were attempting to accomplish a task, what was it you were attempting to do? I was attempting to import nested certificate variables. Cert, and Private key (PEM)

What did you expect to happen? I expected the credentials to be uploaded and if there is a value in yaml file that has incorrect indentation then I should be notified.

What was the actual behavior? The cli fails silently on parse errors and uploads all other credentials

Please confirm where necessary:

  • [ ] I have included a log output
  • [ ] My log includes an error message
  • [x] I have included steps for reproduction

Steps to reproduce:

credhub import -f secret-bad-indent.yml 
secret-bad-indent.yml 
credentials:
  - name: /concourse/np/poe-ssl-pem
    type: certificate
    value:
      certificate: |
        -----BEGIN CERTIFICATE-----
        
        -----END CERTIFICATE-----
    private_key: |
      -----BEGIN RSA PRIVATE KEY-----
      
      -----END RSA PRIVATE KEY-----
credhub import -f secret-good.yml 
secret-good.yml 
credentials:
  - name: /concourse/np/poe-ssl-pem
    type: certificate
    value:
      certificate: |
        -----BEGIN CERTIFICATE-----
        
        -----END CERTIFICATE-----
      private_key: |
        -----BEGIN RSA PRIVATE KEY-----
        
        -----END RSA PRIVATE KEY-----

If you are a PCF customer with an Operation Manager (PCF Ops Manager) please direct your questions to support (https://support.pivotal.io/)

Salamandastron1 avatar Jun 18 '20 15:06 Salamandastron1