github.com/IBM-Blockchain/fabric-operator@v1.0.4/defaultconfig/ca/tlsca.yaml (about)

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