Skip to content

bug: mtls does not take effect #6896

Description

@whioue

Current Behavior

配置 ssl 资源同时配置了 client.ca 和 client.depth 参数,在upstream配置了client_cert和client_key。使用浏览器访问时并未配置对应证书,第一次响应返回400,查看日志发现错误:client certificate was not present,此现象正常;紧接着第二次再次访问发现可以获取到后置服务正常响应。

Expected Behavior

期望使用浏览器在未携带对应双向认证证书时,不能正常获取到响应结果。

Error Logs

client certificate was not present

Steps to Reproduce

1.配置路由并添加upstream,在upstream中配置client_cert和client_key
2.配置 ssl 资源同时配置了 client.ca 和 client.depth 参数
3.使用谷歌浏览器访问,第一次响应400,第二次正常获取到结果

Environment

  • APISIX version (run apisix version): V2.8
  • Operating system (run uname -a): Centos7
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions