github.com/cactusblossom/fabric-ca@v0.0.0-20200611062428-0082fc643826/docs/source/clientcli.rst (about)

     1  =======================
     2  Fabric-CA Client's CLI
     3  =======================
     4  
     5  ::
     6  
     7      Hyperledger Fabric Certificate Authority Client
     8      
     9      Usage:
    10        fabric-ca-client [command]
    11      
    12      Available Commands:
    13        affiliation Manage affiliations
    14        certificate Manage certificates
    15        enroll      Enroll an identity
    16        gencrl      Generate a CRL
    17        gencsr      Generate a CSR
    18        getcainfo   Get CA certificate chain and Idemix public key
    19        identity    Manage identities
    20        reenroll    Reenroll an identity
    21        register    Register an identity
    22        revoke      Revoke an identity
    23        version     Prints Fabric CA Client version
    24      
    25      Flags:
    26            --caname string                  Name of CA
    27            --csr.cn string                  The common name field of the certificate signing request
    28            --csr.hosts stringSlice          A list of comma-separated host names in a certificate signing request
    29            --csr.keyrequest.algo string     Specify key algorithm
    30            --csr.keyrequest.size int        Specify key size
    31            --csr.names stringSlice          A list of comma-separated CSR names of the form <name>=<value> (e.g. C=CA,O=Org1)
    32            --csr.serialnumber string        The serial number in a certificate signing request
    33            --enrollment.attrs stringSlice   A list of comma-separated attribute requests of the form <name>[:opt] (e.g. foo,bar:opt)
    34            --enrollment.label string        Label to use in HSM operations
    35            --enrollment.profile string      Name of the signing profile to use in issuing the certificate
    36            --enrollment.type string         The type of enrollment request: 'x509' or 'idemix' (default "x509")
    37        -H, --home string                    Client's home directory (default "$HOME/.fabric-ca-client")
    38            --id.affiliation string          The identity's affiliation
    39            --id.attrs stringSlice           A list of comma-separated attributes of the form <name>=<value> (e.g. foo=foo1,bar=bar1)
    40            --id.maxenrollments int          The maximum number of times the secret can be reused to enroll (default CA's Max Enrollment)
    41            --id.name string                 Unique name of the identity
    42            --id.secret string               The enrollment secret for the identity being registered
    43            --id.type string                 Type of identity being registered (e.g. 'peer, app, user') (default "client")
    44            --loglevel string                Set logging level (info, warning, debug, error, fatal, critical)
    45        -M, --mspdir string                  Membership Service Provider directory (default "msp")
    46        -m, --myhost string                  Hostname to include in the certificate signing request during enrollment (default "$HOSTNAME")
    47        -a, --revoke.aki string              AKI (Authority Key Identifier) of the certificate to be revoked
    48        -e, --revoke.name string             Identity whose certificates should be revoked
    49        -r, --revoke.reason string           Reason for revocation
    50        -s, --revoke.serial string           Serial number of the certificate to be revoked
    51            --tls.certfiles stringSlice      A list of comma-separated PEM-encoded trusted certificate files (e.g. root1.pem,root2.pem)
    52            --tls.client.certfile string     PEM-encoded certificate file when mutual authenticate is enabled
    53            --tls.client.keyfile string      PEM-encoded key file when mutual authentication is enabled
    54        -u, --url string                     URL of fabric-ca-server (default "http://localhost:7054")
    55      
    56      Use "fabric-ca-client [command] --help" for more information about a command.
    57  
    58  Identity Command
    59  ==================
    60  
    61  ::
    62  
    63      Manage identities
    64      
    65      Usage:
    66        fabric-ca-client identity [command]
    67      
    68      Available Commands:
    69        add         Add identity
    70        list        List identities
    71        modify      Modify identity
    72        remove      Remove identity
    73      
    74      -----------------------------
    75      
    76      Add an identity
    77      
    78      Usage:
    79        fabric-ca-client identity add <id> [flags]
    80      
    81      Examples:
    82      fabric-ca-client identity add user1 --type peer
    83      
    84      Flags:
    85            --affiliation string   The identity's affiliation
    86            --attrs stringSlice    A list of comma-separated attributes of the form <name>=<value> (e.g. foo=foo1,bar=bar1)
    87            --json string          JSON string for adding a new identity
    88            --maxenrollments int   The maximum number of times the secret can be reused to enroll (default CA's Max Enrollment)
    89            --secret string        The enrollment secret for the identity being added
    90            --type string          Type of identity being registered (e.g. 'peer, app, user') (default "user")
    91      
    92      -----------------------------
    93      
    94      List identities visible to caller
    95      
    96      Usage:
    97        fabric-ca-client identity list [flags]
    98      
    99      Flags:
   100            --id string   Get identity information from the fabric-ca server
   101      
   102      -----------------------------
   103      
   104      Modify an existing identity
   105      
   106      Usage:
   107        fabric-ca-client identity modify <id> [flags]
   108      
   109      Examples:
   110      fabric-ca-client identity modify user1 --type peer
   111      
   112      Flags:
   113            --affiliation string   The identity's affiliation
   114            --attrs stringSlice    A list of comma-separated attributes of the form <name>=<value> (e.g. foo=foo1,bar=bar1)
   115            --json string          JSON string for modifying an existing identity
   116            --maxenrollments int   The maximum number of times the secret can be reused to enroll
   117            --secret string        The enrollment secret for the identity
   118            --type string          Type of identity being registered (e.g. 'peer, app, user')
   119      
   120      -----------------------------
   121      
   122      Remove an identity
   123      
   124      Usage:
   125        fabric-ca-client identity remove <id> [flags]
   126      
   127      Examples:
   128      fabric-ca-client identity remove user1
   129      
   130      Flags:
   131            --force   Forces removing your own identity
   132      
   133  
   134  Affiliation Command
   135  =====================
   136  
   137  ::
   138  
   139      Manage affiliations
   140      
   141      Usage:
   142        fabric-ca-client affiliation [command]
   143      
   144      Available Commands:
   145        add         Add affiliation
   146        list        List affiliations
   147        modify      Modify affiliation
   148        remove      Remove affiliation
   149      
   150      -----------------------------
   151      
   152      Add affiliation
   153      
   154      Usage:
   155        fabric-ca-client affiliation add <affiliation> [flags]
   156      
   157      Flags:
   158            --force   Creates parent affiliations if they do not exist
   159      
   160      -----------------------------
   161      
   162      List affiliations visible to caller
   163      
   164      Usage:
   165        fabric-ca-client affiliation list [flags]
   166      
   167      Flags:
   168            --affiliation string   Get affiliation information from the fabric-ca server
   169      
   170      -----------------------------
   171      
   172      Modify existing affiliation
   173      
   174      Usage:
   175        fabric-ca-client affiliation modify <affiliation> [flags]
   176      
   177      Flags:
   178            --force         Forces identities using old affiliation to use new affiliation
   179            --name string   Rename the affiliation
   180      
   181      -----------------------------
   182      
   183      Remove affiliation
   184      
   185      Usage:
   186        fabric-ca-client affiliation remove <affiliation> [flags]
   187      
   188      Flags:
   189            --force   Forces removal of any child affiliations and any identities associated with removed affiliations
   190      
   191  
   192  Certificate Command
   193  =====================
   194  
   195  ::
   196  
   197      Manage certificates
   198      
   199      Usage:
   200        fabric-ca-client certificate [command]
   201      
   202      Available Commands:
   203        list        List certificates
   204      
   205      -----------------------------
   206      
   207      List all certificates which are visible to the caller and match the flags
   208      
   209      Usage:
   210        fabric-ca-client certificate list [flags]
   211      
   212      Examples:
   213      fabric-ca-client certificate list --id admin --expiration 2018-01-01::2018-01-30
   214      fabric-ca-client certificate list --id admin --expiration 2018-01-01T01:30:00z::2018-01-30T11:30:00z
   215      fabric-ca-client certificate list --id admin --expiration -30d::-15d
   216      
   217      Flags:
   218            --aki string          Get certificates for this AKI
   219            --expiration string   Get certificates which expire between the UTC timestamp (RFC3339 format) or duration specified (e.g. <begin_time>::<end_time>)
   220            --id string           Get certificates for this enrollment ID
   221            --notexpired          Don't return expired certificates
   222            --notrevoked          Don't return revoked certificates
   223            --revocation string   Get certificates that were revoked between the UTC timestamp (RFC3339 format) or duration specified (e.g. <begin_time>::<end_time>)
   224            --serial string       Get certificates for this serial number
   225            --store string        Store requested certificates in this location
   226