Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tengine Xquic 模块支持校验客户端证书 #1946

Open
fbwfbi opened this issue Jun 21, 2024 · 1 comment
Open

Tengine Xquic 模块支持校验客户端证书 #1946

fbwfbi opened this issue Jun 21, 2024 · 1 comment
Assignees

Comments

@fbwfbi
Copy link

fbwfbi commented Jun 21, 2024

Why you need it?

跟 https/http2 的相关配置一样,可以校验客户端证书,实现双向认证

How it could be?

配置 xquic 的监听器,可以配置 ssl_certificatessl_certificate_key 来配置服务端证书,但是通过 ssl_client_certificate ssl_verify_client ssl_verify_depth 三个指令无法实现客户端证书校验。在 tengine xquic 模块中实现相关功能,使其能落地生效。

Other related information

目前 xquic 模块的代码中,有注册证书设置的回调函数 .conn_cert_cb = ngx_http_v3_cert_cb

xqc_transport_callbacks_t ngx_xquic_transport_callbacks = {

    .server_accept = ngx_xquic_conn_accept,
    .server_refuse = ngx_xquic_conn_refuse,
    .write_socket = ngx_xquic_server_send,
#if defined(T_NGX_XQUIC_SUPPORT_SENDMMSG)
    .write_mmsg  = ngx_xquic_server_send_mmsg,
#endif
    .conn_update_cid_notify = ngx_http_v3_conn_update_cid_notify,
    .conn_cert_cb = ngx_http_v3_cert_cb,
};

但目前 xquic 没有提供开启客户端证书校验的方法

@fbwfbi
Copy link
Author

fbwfbi commented Sep 17, 2024

@lianglli 目前 tengine 实现的 xquic 模块里面,所有的配置 xquic 的 server 块都共用同一个 xquic engine 对象,导致处理新建连接配置 TLS 证书时,只能通过回调函数 .conn_cert_cb = ngx_http_v3_cert_cb 来处理;而 ngx_http_v3_cert_cb 只配置服务端证书,无法配置客户端证书校验等参数;如果后面 xquic 支持配置双向认证,是否还会继续共用一个 engine 对象?全局使用一个 engine 的对象的好处有哪些?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants