Closed saprette closed 3 years ago
Hi @saprette. Thank you for creating this issue. We really appreciate you taking the time to provide details on how to reproduce, it makes looking into the issue a lot easier.
I took a look and think I was able to narrow down the issue.
openssl rand -hex 10 | xxd -r -p
) and retrieve it using conjur-api-go. I noticed that RetrieveSecret
works, but RetrieveBatchSecrets
results in a 500 and the same error you shared Encoding::UndefinedConversionError
.RetrieveSecret
) and batch (RetrieveBatchSecrets
). It seems that the show endpoint respects the resource mime_type and uses the Rails send_data
method, while the batch endpoint puts the secrets into JSON. I think it is here where things fall apart. See https://github.com/cyberark/conjur/blob/master/app/controllers/secrets_controller.rb#L47-L73.Here's what I'll do
If you would like to contribute the resolution of this bug, please allow me to point you to our contribution guide
Summary
Conjur OSS API server fails to GET binary values
Steps to Reproduce
Set a variable value to a pkcs12
Note that the CLI is able to add the variable to the pkcs12 value, and is also able to read it without breaking the file.
Use cyberark/secrets-provider-for-k8s:1.1.0 to update this secret
The job doing the update
Logs of the secrets-provider-for-k8s job
Matching logs in conjur-oss
Expected Results
conjur-oss does not have a UndefinedConversionError and secrets-provider-for-k8s is able to update my secret with the pkcs12 value
Reproducible
Always
Version/Tag number
repository: cyberark/conjur tag: 'v1.11.0'
repository: nginx tag: '1.15'
repository: postgres tag: '10.12'
Environment setup
OpenShift cluster version 4.5.19.
Additional Information
Note that we use such setup to fetch OK many different kinds of secrets, including json documents and SSL private keys