Open kgartland-rstudio opened 1 year ago
This is tricky.
The underlying issue is that credentials are serialized into JSON format before being written to disk. The DER certificates are binary, which cannot be safely converted into a string. This is what triggers the error above.
To resolve this issue, we'll need to rewrite the storage layer to recognize and handle DER certificates. One option is to store the absolute file path instead of the file contents. At this point in the code, there is no reference to the file path, so the refactor will bubble up to main.py
.
Another option would be to change the storage to something that can handle bytes, like Pickle.
Can we convert to an encoding that's JSON-safe? (We would also need to store the encoding)
Base64 might work. I'll run some experiments to verify.
Found while testing the --cacert fix, the
.der
cert never worked right withrsconnect add
. We can rundeploy
anddetails
with the.der
certs but cannotrsconnect add
.We added
.der
support here: https://github.com/rstudio/rsconnect-python/pull/336