haproxy

http://qiita.com/takech9203/items/5206f8e2572e95209bbc
http://qiita.com/toshihirock/items/51bed34f2ab56f49b2b0
http://d.hatena.ne.jp/rx7/20131202/p1

运用haproxy时,有下面3种方式,当ca服务器端设定tls为true的时候,
应该走第二种,很简单的方式,但是没有通过,我感觉是fabric自己的bug。
因为cli端要check证书里面的Common Name是否和url的host名一致,比如下面地址中的haproxy01,
可是fabric-ca提供的证书是fabric-ca服务器的host名。
fabric-ca-client enroll -u https://admin:adminpw@haproxy01:7056 -M admin/msp

                                      证书提供               证书不提供

1.fabric-ca-cli  ->https-> haproxy ->http> fabric-ca

                  证书不提供                   证书提供
2.fabric-ca-cli  ->https->  haproxy ->https-> fabric-ca

                                证书提供                      证书提供
3.fabric-ca-cli  ->https->  haproxy  ->https-> fabric-ca


haproxy.cfg关键配置
global
      tune.ssl.default-dh-param 2048
      。。。。。
defaults
      retries 2
      option redispatch
     。。。。。。
frontend https_frontend
      mode http
      bind *:7056 ssl crt /xxx/haproxy01.pem  #参照我的openssl文章里生成的证书
      option httpclose
      option forwardfor
      reqadd X-Forwarded-Proto:\ https
      default_backend ca_server

backend ca_server
      mode http
      balance roundrobin
      server ca01 127.0.0.1:7054

      server ca02 127.0.0.2:7055

---------------------------------------------------------------------------------------------------------

在sdk模式下,下面运行了tcp模式,可以顺利通过,不过fabric-ca-server-config.yaml的
tls.clientauth.type要设定成[NoClientCert或RequestClientCert或VerifyClientCertIfGiven]
              证书不提供           证书提供
sdk  ->https->  haproxy ->https-> fabric-ca

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值