2019独角兽企业重金招聘Python工程师标准>>>

https://stackoverflow.com/questions/48937334/nginx-client-authentication-with-multiple-client-certificates

具体参考这个文章

I am trying to set up a NGINX to perform client authentication against multiple clients. The problem I have is that those clients will have different certificates, basically different Root CAs:

[clientA.crt] ClientA > IntermediateA > RootA
[clientB.crt] ClientB > IntermediateB1 > IntermediateB2 > RootB

answer:

The http://nginx.org/r/ssl_client_certificate directive is used to specify which certificates you trust for client-based authentication. Note that the whole list is basically sent every time a connection is attempted (use ssl_trusted_certificate as per the docs if that's not desired).

As per above, note that ssl_verify_depth basically controls how easy would it be to get into your system — if you set it at a high-enough value, and someone is able to obtain a certificate with one of the CAs that you trust, or through one of their intermediaries which they trust to generate their own certificates, then they'd be able to authenticate with your nginx, whether or not that's your desire.

As such, it'd normally be the practice that all certificates that are used for client-based authentication are generated by a privately sanctioned CA, hence, normally, there shouldn't be much of a length to the chain. If you want to equalise the depth number between the two CAs, to get the best protection from ssl_verify_depth, then it's conceivable to create an extra CA to add to the depth, then that CA to the trusted list instead of what's now an actual intermediary. (Note that it gets complicated once you involve a few intermediaries, the browser would need to know of their existence, which is usually cached, and can result in a number of ghost issues when non-cached.)

Also, note that you don't actually have to have a single CA in the specified file — it can include multiple unrelated "root" CAs, so, if you want to add multiple independent CAs, you don't actually have to bother creating another CA to certify them — you can just include such independent CAs as-is.

转载于:https://my.oschina.net/u/228832/blog/3032189

nginx 认证多个客户端的问题相关推荐

  1. nginx篇08-添加客户端证书认证

    本文主要介绍如何使用给nginx服务添加客户端证书认证从而实现双向加密. 对于一般的https网站来说,实际上https所使用的证书是属于单向验证,即客户端单向验证服务器的安全性,而服务器端是没有对客 ...

  2. PHP、Tomcat获取Nginx代理后的客户端真实IP

    PHP.Tomcat获取Nginx代理后的客户端真实IP 文章目录 PHP.Tomcat获取Nginx代理后的客户端真实IP 一.PHP获取Nginx代理后客户端真实IP Nginx配置 PHP配置 ...

  3. 吉大正元php,吉大正元CA认证服务器与客户端以及配置文档

    [实例简介] 吉大正元CA认证服务器与客户端以及配置文档,有服务器和客户端,有配置文档,一般人都可以看得懂. [实例截图] [核心代码] I网关报文认证Java版BSDemo ├── Debugger ...

  4. 网站配置了Cloudflare代理后,如何配置Nginx获取的真实客户端IP地址?

    网站配置了Cloudflare代理后,如何配置Nginx获取的真实客户端IP地址? 这是一个很简单的问题,如何在后台获取真实的访问者IP地址? 网站为了避免有些不怀好意的访问者,不得不自动分析一下客户 ...

  5. Tomcat下HTTPS双向认证配置以及客户端调用案例

    1:生成服务器端的keystore和truststore文件 (1)以jks格式生成服务器端包含Public key和Private Key的keystore文件 keytool -genkey -a ...

  6. php ngx_http_auth_basic_module,nginx认证模块ngx_http_auth_basic_module

    ngx_http_auth_basic_module模块基于"HTTP Basic Authentication"协议完成用户认证. 模块指令: auth_basic auth_b ...

  7. 安装nginx,php8,nfs,oralce19c客户端

    目录 一.安装nginx 二.安装php 1.安装php8插件 2.安装下载php8 三.安装nfs 四.安装19C客户端 a.安装oracle19c客户端 b. php连接oracle 19c数据库 ...

  8. NGINX中如何根据客户端IP地址控制访问

    NGINX Web 服务器安全加固有多种方法,其中一种是基于 IP 地址的访问控制.本指南解释了如何通过在 NGINX 中基于客户端的 IP 地址控制访问来保护 Web 应用程序. NGINX中基于客 ...

  9. QtJava笔记-Qt与Java进行SSL双向认证(Qt客户端,Java服务端)

    这里使用Java作为服务端,使用Qt作为客户端. 程序运行截图如下: 这里的证书Qt使用的p12,Java使用的jks,看以前的博文生成. 源码打包下载地址: https://github.com/f ...

最新文章

  1. 为什么那么多程序员不敢学Python?
  2. mysql 索引与约束_MySQL之索引与约束条件
  3. 原来deepin部署环境还是那么简单(只不过要用root权限)
  4. 网站建设难?三个技巧来帮你!
  5. oracle网络公开课《存储技术》课件和视频共享下载
  6. 【LeetCode笔记】78. 子集(Java、dfs)
  7. 零基础学习什么编程语言比较合适?别的不说,听说大佬都学了这个!
  8. 利用SqlBuikCopy实现数据批量写入
  9. oracle查看数据库所有列,sql – 如何查看oracle数据库中表的列的所有元数据?
  10. sata接口 图解 定义_SATA定义及接口
  11. 微软Office 2013:会受企业待见的最佳新功能
  12. 智慧工厂是什么 智慧工厂方案举例 智慧工厂案例
  13. iOS-百度语音识别
  14. 美通企业日报 | 中国最佳创新公司50名榜单发布;柯锐世全新亚洲总部在上海启用...
  15. 基于深度学习的花卉检测与识别系统(YOLOv5清新界面版,Python代码)
  16. sp/计算机产品与流通,计算机产品与流通杂志
  17. 嵌入式Linux关闭串口打印-屏蔽串口打印
  18. jetson nano 风扇自动调速
  19. 山东大学软件学院大学物理期末考试回忆版
  20. 先梳理好思维,再动手实战这样会事半功倍

热门文章

  1. poj 1523 SPF (无向图 的 割点)
  2. 【一个实体对象不能由多个 IEntityChangeTracker 实例引用】原因及解决方法
  3. 二叉树的非递归遍历(c/c++)
  4. java的动态代理机制详解
  5. 配置虚拟主机 和 打war包
  6. 监控Spark应用方法简介
  7. KeyMob移动广告聚合平台助力开发者,提供广告聚合服务
  8. 我用的/etc/vimrc
  9. Matrix calculus
  10. jQuery 操作DOM总结,DOM Core操作,HTML-DOM操作和CSS-DOM操作