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