api7 / api7/lua-resty-etcd

How to configure etcd ssl connection

Open
#213 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
203
Forks
58
PR merge metrics
No merged PRs in 30d

Description

I tried to connect etcd with ssl certificate, but failed and reported an error.

  • code
local function connectEtcd()
    local conf = _M.conf
    local opt = {
        http_host = conf.etcd_endpoints,
        ssl_cert_path = conf.ssl_cert_path,
        ssl_key_path = conf.ssl_key_path,
        trusted_ca = conf.trusted_ca
    }
    local cli, err = etcd.new(opt)
    if not cli then
        return nil, err
    end
    return cli,nil
end
  • error
    SSL_do_handshake() failed (SSL: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:SSL alert number 42)

  • question

Is the parameter trusted_ca the path to ca.pem to be passed in?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides a connectEtcd snippet and the etcd.new entry point; start by tracing how its SSL options are handled and compare them with the reported handshake error. Determine the expected form of trusted_ca and document or test that configuration path, if the repository has a relevant location.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
distributed-systems, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.