Guest User

fabric-ca-server-config

a guest
Nov 12th, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 18.19 KB | None | 0 0
  1. #############################################################################
  2. #   This is a configuration file for the fabric-ca-server command.
  3. #
  4. #   COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES
  5. #   ------------------------------------------------
  6. #   Each configuration element can be overridden via command line
  7. #   arguments or environment variables.  The precedence for determining
  8. #   the value of each element is as follows:
  9. #   1) command line argument
  10. #      Examples:
  11. #      a) --port 443
  12. #         To set the listening port
  13. #      b) --ca.keyfile ../mykey.pem
  14. #         To set the "keyfile" element in the "ca" section below;
  15. #         note the '.' separator character.
  16. #   2) environment variable
  17. #      Examples:
  18. #      a) FABRIC_CA_SERVER_PORT=443
  19. #         To set the listening port
  20. #      b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem"
  21. #         To set the "keyfile" element in the "ca" section below;
  22. #         note the '_' separator character.
  23. #   3) configuration file
  24. #   4) default value (if there is one)
  25. #      All default values are shown beside each element below.
  26. #
  27. #   FILE NAME ELEMENTS
  28. #   ------------------
  29. #   The value of all fields whose name ends with "file" or "files" are
  30. #   name or names of other files.
  31. #   For example, see "tls.certfile" and "tls.clientauth.certfiles".
  32. #   The value of each of these fields can be a simple filename, a
  33. #   relative path, or an absolute path.  If the value is not an
  34. #   absolute path, it is interpretted as being relative to the location
  35. #   of this configuration file.
  36. #
  37. #############################################################################
  38.  
  39. # Version of config file
  40. version: 0.1
  41.  
  42. # Server's listening port (default: 7054)
  43. port: 7054
  44.  
  45. # Enables debug logging (default: false)
  46. debug: false
  47.  
  48. # Size limit of an acceptable CRL in bytes (default: 512000)
  49. crlsizelimit: 512000
  50.  
  51. #############################################################################
  52. #  TLS section for the server's listening port
  53. #
  54. #  The following types are supported for client authentication: NoClientCert,
  55. #  RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven,
  56. #  and RequireAndVerifyClientCert.
  57. #
  58. #  Certfiles is a list of root certificate authorities that the server uses
  59. #  when verifying client certificates.
  60. #############################################################################
  61. tls:
  62.  # Enable TLS (default: false)
  63.   enabled: false
  64.   # TLS for the server's listening port
  65.   certfile:
  66.   keyfile:
  67.   clientauth:
  68.     type: noclientcert
  69.     certfiles:
  70. #############################################################################
  71. #  The CA section contains information related to the Certificate Authority
  72. #  including the name of the CA, which should be unique for all members
  73. #  of a blockchain network.  It also includes the key and certificate files
  74. #  used when issuing enrollment certificates (ECerts) and transaction
  75. #  certificates (TCerts).
  76. #  The chainfile (if it exists) contains the certificate chain which
  77. #  should be trusted for this CA, where the 1st in the chain is always the
  78. #  root CA certificate.
  79. #############################################################################
  80. ca:
  81.  # Name of this CA
  82.   name: undercroft
  83.   # Key file (is only used to import a private key into BCCSP)
  84.   keyfile:
  85.  # Certificate file (default: ca-cert.pem)
  86.   certfile:
  87.  # Chain file
  88.   chainfile:
  89. #############################################################################
  90. #  The gencrl REST endpoint is used to generate a CRL that contains revoked
  91. #  certificates. This section contains configuration options that are used
  92. #  during gencrl request processing.
  93. #############################################################################
  94. crl:
  95.  # Specifies expiration for the generated CRL. The number of hours
  96.   # specified by this property is added to the UTC time, the resulting time
  97.   # is used to set the 'Next Update' date of the CRL.
  98.   expiry: 24h
  99.  
  100. #############################################################################
  101. #  The registry section controls how the fabric-ca-server does two things:
  102. #  1) authenticates enrollment requests which contain a username and password
  103. #     (also known as an enrollment ID and secret).
  104. #  2) once authenticated, retrieves the identity's attribute names and
  105. #     values which the fabric-ca-server optionally puts into TCerts
  106. #     which it issues for transacting on the Hyperledger Fabric blockchain.
  107. #     These attributes are useful for making access control decisions in
  108. #     chaincode.
  109. #  There are two main configuration options:
  110. #  1) The fabric-ca-server is the registry.
  111. #     This is true if "ldap.enabled" in the ldap section below is false.
  112. #  2) An LDAP server is the registry, in which case the fabric-ca-server
  113. #     calls the LDAP server to perform these tasks.
  114. #     This is true if "ldap.enabled" in the ldap section below is true,
  115. #     which means this "registry" section is ignored.
  116. #############################################################################
  117. registry:
  118.  # Maximum number of times a password/secret can be reused for enrollment
  119.   # (default: -1, which means there is no limit)
  120.   maxenrollments: -1
  121.  
  122.   # Contains identity information which is used when LDAP is disabled
  123.   identities:
  124.      - name: admin
  125.        pass: adminpw
  126.        type: client
  127.        affiliation: ""
  128.        attrs:
  129.           hf.Registrar.Roles: "*"
  130.           hf.Registrar.DelegateRoles: "*"
  131.           hf.Revoker: true
  132.           hf.IntermediateCA: true
  133.           hf.GenCRL: true
  134.           hf.Registrar.Attributes: "*"
  135.           hf.AffiliationMgr: true
  136.  
  137. #############################################################################
  138. #  Database section
  139. #  Supported types are: "sqlite3", "postgres", and "mysql".
  140. #  The datasource value depends on the type.
  141. #  If the type is "sqlite3", the datasource value is a file name to use
  142. #  as the database store.  Since "sqlite3" is an embedded database, it
  143. #  may not be used if you want to run the fabric-ca-server in a cluster.
  144. #  To run the fabric-ca-server in a cluster, you must choose "postgres"
  145. #  or "mysql".
  146. #############################################################################
  147. db:
  148.   type: sqlite3
  149.   datasource: fabric-ca-server.db
  150.   tls:
  151.       enabled: false
  152.       certfiles:
  153.       client:
  154.         certfile:
  155.         keyfile:
  156. #############################################################################
  157. #  LDAP section
  158. #  If LDAP is enabled, the fabric-ca-server calls LDAP to:
  159. #  1) authenticate enrollment ID and secret (i.e. username and password)
  160. #     for enrollment requests;
  161. #  2) To retrieve identity attributes
  162. #############################################################################
  163. ldap:
  164.   # Enables or disables the LDAP client (default: false)
  165.    # If this is set to true, the "registry" section is ignored.
  166.    enabled: false
  167.    # The URL of the LDAP server
  168.    url: ldap://<adminDN>:<adminPassword>@<host>:<port>/<base>
  169.   # TLS configuration for the client connection to the LDAP server
  170.    tls:
  171.       certfiles:
  172.       client:
  173.          certfile:
  174.          keyfile:
  175.   # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes
  176.    attribute:
  177.      # 'names' is an array of strings containing the LDAP attribute names which are
  178.       # requested from the LDAP server for an LDAP identity's entry
  179.       names: ['uid','member']
  180.       # The 'converters' section is used to convert an LDAP entry to the value of
  181.       # a fabric CA attribute.
  182.       # For example, the following converts an LDAP 'uid' attribute
  183.       # whose value begins with 'revoker' to a fabric CA attribute
  184.       # named "hf.Revoker" with a value of "true" (because the boolean expression
  185.       # evaluates to true).
  186.       #    converters:
  187.       #       - name: hf.Revoker
  188.       #         value: attr("uid") =~ "revoker*"
  189.       converters:
  190.          - name:
  191.            value:
  192.      # The 'maps' section contains named maps which may be referenced by the 'map'
  193.       # function in the 'converters' section to map LDAP responses to arbitrary values.
  194.       # For example, assume a user has an LDAP attribute named 'member' which has multiple
  195.       # values which are each a distinguished name (i.e. a DN). For simplicity, assume the
  196.       # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'.
  197.       # Further assume the following configuration.
  198.       #    converters:
  199.       #       - name: hf.Registrar.Roles
  200.       #         value: map(attr("member"),"groups")
  201.       #    maps:
  202.       #       groups:
  203.       #          - name: dn1
  204.       #            value: peer
  205.       #          - name: dn2
  206.       #            value: client
  207.       # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be
  208.       # "peer,client,dn3".  This is because the value of 'attr("member")' is
  209.       # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of
  210.       # "group" replaces "dn1" with "peer" and "dn2" with "client".
  211.       maps:
  212.          groups:
  213.             - name:
  214.               value:
  215. #############################################################################
  216. # Affiliations section. Fabric CA server can be bootstrapped with the
  217. # affiliations specified in this section. Affiliations are specified as maps.
  218. # For example:
  219. #   businessunit1:
  220. #     department1:
  221. #       - team1
  222. #   businessunit2:
  223. #     - department2
  224. #     - department3
  225. #
  226. # Affiliations are hierarchical in nature. In the above example,
  227. # department1 (used as businessunit1.department1) is the child of businessunit1.
  228. # team1 (used as businessunit1.department1.team1) is the child of department1.
  229. # department2 (used as businessunit2.department2) and department3 (businessunit2.department3)
  230. # are children of businessunit2.
  231. # Note: Affiliations are case sensitive except for the non-leaf affiliations
  232. # (like businessunit1, department1, businessunit2) that are specified in the configuration file,
  233. # which are always stored in lower case.
  234. #############################################################################
  235. affiliations:
  236.    org1:
  237.      - department1
  238.       - department2
  239.    org2:
  240.      - department1
  241.  
  242. #############################################################################
  243. #  Signing section
  244. #
  245. #  The "default" subsection is used to sign enrollment certificates;
  246. #  the default expiration ("expiry" field) is "8760h", which is 1 year in hours.
  247. #
  248. #  The "ca" profile subsection is used to sign intermediate CA certificates;
  249. #  the default expiration ("expiry" field) is "43800h" which is 5 years in hours.
  250. #  Note that "isca" is true, meaning that it issues a CA certificate.
  251. #  A maxpathlen of 0 means that the intermediate CA cannot issue other
  252. #  intermediate CA certificates, though it can still issue end entity certificates.
  253. #  (See RFC 5280, section 4.2.1.9)
  254. #
  255. #  The "tls" profile subsection is used to sign TLS certificate requests;
  256. #  the default expiration ("expiry" field) is "8760h", which is 1 year in hours.
  257. #############################################################################
  258. signing:
  259.     default:
  260.       usage:
  261.        - digital signature
  262.       expiry: 8760h
  263.     profiles:
  264.       ca:
  265.          usage:
  266.           - cert sign
  267.            - crl sign
  268.          expiry: 43800h
  269.          caconstraint:
  270.            isca: true
  271.            maxpathlen: 0
  272.       tls:
  273.          usage:
  274.            - signing
  275.             - key encipherment
  276.             - server auth
  277.             - client auth
  278.             - key agreement
  279.          expiry: 8760h
  280.  
  281. ###########################################################################
  282. #  Certificate Signing Request (CSR) section.
  283. #  This controls the creation of the root CA certificate.
  284. #  The expiration for the root CA certificate is configured with the
  285. #  "ca.expiry" field below, whose default value is "131400h" which is
  286. #  15 years in hours.
  287. #  The pathlength field is used to limit CA certificate hierarchy as described
  288. #  in section 4.2.1.9 of RFC 5280.
  289. #  Examples:
  290. #  1) No pathlength value means no limit is requested.
  291. #  2) pathlength == 1 means a limit of 1 is requested which is the default for
  292. #     a root CA.  This means the root CA can issue intermediate CA certificates,
  293. #     but these intermediate CAs may not in turn issue other CA certificates
  294. #     though they can still issue end entity certificates.
  295. #  3) pathlength == 0 means a limit of 0 is requested;
  296. #     this is the default for an intermediate CA, which means it can not issue
  297. #     CA certificates though it can still issue end entity certificates.
  298. ###########################################################################
  299. csr:
  300.    cn: Undercroft
  301.    keyrequest:
  302.      algo: ecdsa
  303.      size: 256
  304.    names:
  305.       - C: US
  306.         ST: "North Carolina"
  307.         L:
  308.         O: Hyperledger
  309.         OU: Fabric
  310.    hosts:
  311.     - localhost
  312.    ca:
  313.       expiry: 131400h
  314.       pathlength: 0
  315.  
  316. ###########################################################################
  317. # Each CA can issue both X509 enrollment certificate as well as Idemix
  318. # Credential. This section specifies configuration for the issuer component
  319. # that is responsible for issuing Idemix credentials.
  320. ###########################################################################
  321. idemix:
  322.  # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an
  323.   # Idemix credential. The issuer will create a pool revocation handles of this specified size. When
  324.   # a credential is requested, issuer will get handle from the pool and assign it to the credential.
  325.   # Issuer will repopulate the pool with new handles when the last handle in the pool is used.
  326.   # A revocation handle and credential revocation information (CRI) are used to create non revocation proof
  327.   # by the prover to prove to the verifier that her credential is not revoked.
  328.   rhpoolsize: 1000
  329.  
  330.   # The Idemix credential issuance is a two step process. First step is to  get a nonce from the issuer
  331.   # and second step is send credential request that is constructed using the nonce to the isuser to
  332.   # request a credential. This configuration property specifies expiration for the nonces. By default is
  333.   # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration).
  334.   nonceexpiration: 15s
  335.  
  336.   # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes.
  337.   #  The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration)
  338.   noncesweepinterval: 15m
  339.  
  340. #############################################################################
  341. # BCCSP (BlockChain Crypto Service Provider) section is used to select which
  342. # crypto library implementation to use
  343. #############################################################################
  344. bccsp:
  345.     default: SW
  346.     sw:
  347.         hash: SHA2
  348.         security: 256
  349.         filekeystore:
  350.            # The directory used for the software file-based keystore
  351.             keystore: msp/keystore
  352.  
  353. #############################################################################
  354. # Multi CA section
  355. #
  356. # Each Fabric CA server contains one CA by default.  This section is used
  357. # to configure multiple CAs in a single server.
  358. #
  359. # 1) --cacount <number-of-CAs>
  360. # Automatically generate <number-of-CAs> non-default CAs.  The names of these
  361. # additional CAs are "ca1", "ca2", ... "caN", where "N" is <number-of-CAs>
  362. # This is particularly useful in a development environment to quickly set up
  363. # multiple CAs. Note that, this config option is not applicable to intermediate CA server
  364. # i.e., Fabric CA server that is started with intermediate.parentserver.url config
  365. # option (-u command line option)
  366. #
  367. # 2) --cafiles <CA-config-files>
  368. # For each CA config file in the list, generate a separate signing CA.  Each CA
  369. # config file in this list MAY contain all of the same elements as are found in
  370. # the server config file except port, debug, and tls sections.
  371. #
  372. # Examples:
  373. # fabric-ca-server start -b admin:adminpw --cacount 2
  374. #
  375. # fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml
  376. # --cafiles ca/ca2/fabric-ca-server-config.yaml
  377. #
  378. #############################################################################
  379.  
  380. cacount:
  381. cafiles:
  382. #############################################################################
  383. # Intermediate CA section
  384. #
  385. # The relationship between servers and CAs is as follows:
  386. #   1) A single server process may contain or function as one or more CAs.
  387. #      This is configured by the "Multi CA section" above.
  388. #   2) Each CA is either a root CA or an intermediate CA.
  389. #   3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA.
  390. #
  391. # This section pertains to configuration of #2 and #3.
  392. # If the "intermediate.parentserver.url" property is set,
  393. # then this is an intermediate CA with the specified parent
  394. # CA.
  395. #
  396. # parentserver section
  397. #    url - The URL of the parent server
  398. #    caname - Name of the CA to enroll within the server
  399. #
  400. # enrollment section used to enroll intermediate CA with parent CA
  401. #    profile - Name of the signing profile to use in issuing the certificate
  402. #    label - Label to use in HSM operations
  403. #
  404. # tls section for secure socket connection
  405. #   certfiles - PEM-encoded list of trusted root certificate files
  406. #   client:
  407. #     certfile - PEM-encoded certificate file for when client authentication
  408. #     is enabled on server
  409. #     keyfile - PEM-encoded key file for when client authentication
  410. #     is enabled on server
  411. #############################################################################
  412. intermediate:
  413.   parentserver:
  414.     url:
  415.     caname:
  416.   enrollment:
  417.     hosts:
  418.     profile:
  419.     label:
  420.   tls:
  421.     certfiles:
  422.     client:
  423.       certfile:
  424.       keyfile:
  425. #############################################################################
  426. # CA configuration section
  427. #
  428. # Configure the number of incorrect password attempts are allowed for
  429. # identities. By default, the value of 'passwordattempts' is 10, which
  430. # means that 10 incorrect password attempts can be made before an identity get
  431. # locked out.
  432. #############################################################################
  433. cfg:
  434.   identities:
  435.     passwordattempts: 10
Add Comment
Please, Sign In to add comment