apache / apache/couchdb-erlfdb
Using `bytes` options for TLS rather than `path` does not appear to work
- Dominant language
- Erlang
- Stars
- 34
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
FDB allows for:
`tls_ca_path` `tls_ca_bytes`
`tls_key_path` `tls_key_bytes`
`tls_cert_path` `tls_cert_bytes`
When erlfdb inits using the `path` env values I can connect to the cluster and use the DB.
If I use the `bytes` options erlfdb 'seems' to connect and returns a database when `erlfdb:open(Cluster).`, but all further operations just hang. A simple transactional `set` ends up stuck in erlfdb:wait and never returns.
The only error I see in the fdb trace logs is a 1026 network error which is of course helpfully undocumented.
Rationale:
I currently have a branch which does a lazy init of erlfdb_nif and passes in the network options as they are pulled from a key server on init of the parent application. Currently I'm having to store keys to disk and pass in the `path` variants, but would definitely prefer that keys do no get saved to disk at all.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing erlfdb_nif initialization and the handling of the tls_ca_bytes, tls_key_bytes, and tls_cert_bytes options, then reproduce the difference between bytes and path configuration. Check the resulting erlfdb:open(Cluster), erlfdb:wait, and transactional set behavior alongside the FoundationDB trace showing network error 1026; done means byte-based TLS connections complete database operations without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- database, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100