天天看點

Fabric-CA Server服務端指令詳解

Hyperledger Fabric 證書頒發服務端的指令使用說明

用法:

fabric-ca-server [command]
           

可用指令:

init        初始化fabric-ca服務
  start       啟動fabric-ca服務
  version     顯示Fabric CA Server的版本資訊
           

辨別參數:

基礎配置

--address string                            fabric-ca-server的位址 (預設: "0.0.0.0")
  -b, --boot string                               使用`使用者名:密碼`的格式生成預設配置檔案所需的引導管理
  -H, --home string                               伺服器的主目錄 (預設: "/etc/hyperledger/fabric-ca")
      --loglevel string                           設定日志記錄級别 (info, warning, debug, error, fatal, critical)
  -p, --port int                                  fabric-ca-server的端口号 (預設: 7054)
      --registry.maxenrollments int               最大注冊數;如果未啟用LDAP,則有效 (預設: -1)
           

ca證書配置

--ca.certfile string                        PEM編碼的CA憑證檔案 (預設: "ca-cert.pem")
      --ca.chainfile string                       PEM編碼的CA鍊檔案 (預設: "ca-chain.pem")
      --ca.keyfile string                         PEM編碼的CA密鑰檔案
  -n, --ca.name string                            證書頒發機構名稱
      --cacount int                               非預設CA執行個體數
      --cafiles stringSlice                       逗号分隔的CA配置檔案清單
           

cfg配置

--cfg.affiliations.allowremove              允許動态删除從屬關系
      --cfg.identities.allowremove                允許動态删除辨別
      --cfg.identities.passwordattempts int       允許的密碼錯誤嘗試次數 (預設 10)
           

CORS配置

--cors.enabled                              為fabric-ca-server啟用CORS
      --cors.origins stringSlice                  以逗号分隔的通路控制清單允許源域
           

CRL配置

--crl.expiry duration                       gencrl請求生成的CRL的過期時間 (預設: 24小時)
      --crlsizelimit int                          可接受CRL的最大位元組 (預設: 512000)
      --csr.cn string                             對父級fabric-ca-server的證書簽名請求的公共名稱字段
      --csr.hosts stringSlice                     對父級fabric-ca-server的證書簽名請求中以逗号分隔的主機名清單
      --csr.keyrequest.algo string                指定密鑰算法
      --csr.keyrequest.size int                   指定密鑰大小
      --csr.serialnumber string                   對父級fabric-ca-server的證書簽名請求中的序列号
           

DB資料庫配置

--db.datasource string                      指定的資料庫資料源 (預設: "fabric-ca-server.db")
      --db.tls.certfiles stringSlice              逗号分隔的PEM編碼的可信證書檔案清單 (如: root1.pem,root2.pem)
      --db.tls.client.certfile string             啟用互相身份驗證時的PEM編碼證書檔案
      --db.tls.client.keyfile string              啟用互相身份驗證時的PEM編碼密鑰檔案
      --db.type string                            資料庫的類型;如: sqlite3, postgres, mysql (預設: "sqlite3")
           

idemix配置

--idemix.nonceexpiration string             nonce過期後的持續時間 (預設: "15s")
      --idemix.noncesweepinterval string          删除過期nonce的間隔 (預設: "15m")
      --idemix.rhpoolsize int                     Specifies revocation handle pool size (預設: 100)
           

中間CA節點配置

--intermediate.enrollment.label string      HSM操作中使用的标簽
      --intermediate.enrollment.profile string    用于頒發證書的簽名配置檔案的名稱
      --intermediate.enrollment.type string       注冊請求的類型: 'x509' or 'idemix' (預設: "x509")
      --intermediate.parentserver.caname string   fabric-ca-server連接配接的CA的名稱
  -u, --intermediate.parentserver.url string      父級fabric-ca-server的URL網址 (如: http://<username>:<password>@<address>:<port)
      --intermediate.tls.certfiles stringSlice    逗号分隔的PEM編碼的可信證書檔案清單(如: root1.pem,root2.pem)
      --intermediate.tls.client.certfile string   啟用互相身份驗證時的PEM編碼證書檔案
      --intermediate.tls.client.keyfile string    啟用互相身份驗證時的PEM編碼密鑰檔案
           

LDAP配置

--ldap.attribute.names stringSlice          要在LDAP搜尋中請求的LDAP屬性的名稱
      --ldap.enabled                              為身份驗證和屬性啟用LDAP用戶端
      --ldap.groupfilter string                   單個從屬組的LDAP組篩選器 (預設: "(memberUid=%s)")
      --ldap.tls.certfiles stringSlice            逗号分隔的PEM編碼的可信證書檔案清單(如: root1.pem,root2.pem)
      --ldap.tls.client.certfile string           啟用互相身份驗證時的PEM編碼證書檔案
      --ldap.tls.client.keyfile string            啟用互相身份驗證時的PEM編碼密鑰檔案
      --ldap.url string                           LDAP 用戶端的URL,如 ldap://adminDN:[email protected][:port]/base
      --ldap.userfilter string                    搜尋使用者時要使用的LDAP使用者篩選器(預設: "(uid=%s)")
           

TLS配置

--tls.certfile string                       伺服器偵聽端口的PEM編碼TLS證書檔案 (預設: "tls-cert.pem")
      --tls.clientauth.certfiles stringSlice      逗号分隔的PEM編碼的可信證書檔案清單(如: root1.pem,root2.pem)
      --tls.clientauth.type string                伺服器将遵循的TLS用戶端身份驗證政策。(預設: "noclientcert")
      --tls.enabled                               在偵聽端口上啟用TLS
      --tls.keyfile string                        伺服器監聽端口的PEM編碼TLS密鑰
           

可以使用

fabric-ca-server [command] --help

擷取更多關于這個指令的幫助說明

本文由小韋雲原創,轉載請注明出處:https://www.bctos.cn/doc/4/1835,否則追究其法律責任